Can you share the code you are using to add a product to the cart? And also the code you are using to display the number of items in the cart? Also, can you check your log file to see if you are experiencing any errors.
Ok, well, looking at the site you've linked to, clicking add to cart does appear to be adding products to the order as the response from this in dev tools is showing a valid cart so I think your issue is to do with your cart rendering.
From what I can tell, navigating to your cart page, you don't appear to be rendering the cart at all. You are displaying the section headers, but I don't see any markup related to the cart markup you have referenced above anywhere in your cart page. My guess would be that this code isn't actually being used so I'd double check your templates are setup correctly and are linked to your cart page or if this code is inside a partial, make sure the partial is being rendered in your cart page template.
Cart Empty
Hello
I have installed Tea commerce on an existing site. Have installed the package but not the starter kit as the website already exists.
I have followed the installation steps (creation of store, country, currency etc..) and also inspired from the starter kit to build up the cart.
However I am having an empty cart after 'Add to basket'.
I am unsure of the page : /base/TC/FormPost.aspx Where can it be found?
Can anyone help please?
thanks
Hi aaeda
Can you share the code you are using to add a product to the cart? And also the code you are using to display the number of items in the cart? Also, can you check your log file to see if you are experiencing any errors.
Many thanks
Matt
Hello Matt
Yes sure. Please see below.
Cannot see any error as such in the logs. Note that we are on the trial version to test everything before buying the license.
thanks for your help.
Ok, that seems ok to me, and using the demo version should work fine locally so don't think that's the issue.
The
/base/TC/FormPost.aspx
URL is just something that exists so you shouldn't need to worry about this.Just to check, you are using Umbraco v7 right? And can you share the code that you are using to render the cart?
Many thanks
Matt
Hello Matt
Yes using umbraco version 7. For the cart, I have created the same as what's there on the demo site. please see below.
@using TeaCommerce.Umbraco.Web @inherits Umbraco.Web.Mvc.UmbracoTemplatePage @{ Layout = "CartStepMaster.cshtml"; IPublishedContent currentPage = Model.Content; IPublishedContent nextStep = currentPage.Children.FirstOrDefault();
//store id long storeId = long.Parse( currentPage.GetPropertyValue
Order order = TC.GetCurrentOrder( storeId, false ); @order; } @section Cartcontent { @if ( order != null ) {
aaaa
Your cart
@orderLine.UnitPrice.WithoutDiscounts} @orderLine.UnitPrice.Value Unit price:@orderLine.TotalPrice.WithPreviousDiscounts} @orderLine.TotalPrice.Value Total price:@order.SubtotalPrice.WithPreviousDiscounts} @order.SubtotalPrice.Value@order.ShipmentInformation.TotalPrice.WithoutDiscounts} @order.ShipmentInformation.TotalPrice.Value@order.PaymentInformation.TotalPrice.WithoutDiscounts} @order.PaymentInformation.TotalPrice.Value@order.TotalPrice.WithPreviousDiscounts} @order.TotalPriceYour discount codes: @string.Join( ", ", order.DiscountCodes.Select( d => "\"" + d.Code + "\"" ) )
}Have a discount code?
}
}
thanks
Hello Matt
Please see below the link for the test site.
http://emcarsport6872.dev.ehost.mu/en/sports/swimming/textiles/shorts/star-kick-logo-planel-junior-navy-jaffa/
thanks
Hi aaeda,
Ok, well, looking at the site you've linked to, clicking add to cart does appear to be adding products to the order as the response from this in dev tools is showing a valid cart so I think your issue is to do with your cart rendering.
From what I can tell, navigating to your cart page, you don't appear to be rendering the cart at all. You are displaying the section headers, but I don't see any markup related to the cart markup you have referenced above anywhere in your cart page. My guess would be that this code isn't actually being used so I'd double check your templates are setup correctly and are linked to your cart page or if this code is inside a partial, make sure the partial is being rendered in your cart page template.
Hope this helps
Matt
is working on a reply...