Cart summary at top of page shows wrong number

General ShopSite user discussion

Cart summary at top of page shows wrong number

Postby thunsinger » Tue Aug 31, 2010 4:52 pm

We are in the home stretch of a new site and cart upgrade, but have a few kinks. One that I cannot resolve is as follows:

Add item to cart and it shows that there is 1 item in cart in the top display
Close browser
Reopen browser - cart says 0 items
Go to cart and item is there

Where is the problem? I do not want customers to re-add the item, go to the cart and see a duplicate.
Thanks!
thunsinger
 
Posts: 19
Joined: Tue Aug 31, 2010 4:43 pm

Re: Cart summary at top of page shows wrong number

Postby Jim » Tue Aug 31, 2010 8:21 pm

The mini-cart content is kept in a cookie in the shoppers browser. There can be several things going on that may change the way the mini cart is displayed.
1. Most important is that cookies cannot be read by a different domain than the domain that sets the cookie. So if your store is at mydomain.com but your shopping cart is at myhosts.domain.com the minicart will not work. The shopping cart would have to be at mydomain.com
2. The javascript code for the minicart on store pages tries to read the cookie and if it can it will display the minicart. If the browser has closed and been reopened the cookie may not be able to be read. The cookies are set to expire at a certain point so if it has been longer than that period of time the cookie will no longer be valid and wouldn't be read so the minicart contents can't be displayed..
3. The same browser must be used to display the store pages as what was used to put the item in the cart. Since the cookie is set in the browser by the shopping cart it will only be available in that browser. So for example you can't add the item to the cart with Internet explorer and expect to see the minicart if you go to the site with Firefox or even Internet Explorer on a different computer.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Cart summary at top of page shows wrong number

Postby thunsinger » Sat Sep 11, 2010 6:37 am

Thank you Jim. Darn cookies! I am quite sure you got to the heart of the issue. :D
thunsinger
 
Posts: 19
Joined: Tue Aug 31, 2010 4:43 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 5 guests