Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest estelle

Add To Basket Fails (intermittent Problem, Some Customers Only, Perhap

Recommended Posts

Guest estelle

STAFF NOTE PLEASE READ 2 AUGUST 2009: This should not be an issue in recent versions of CubeCart. The vast majority of support tickets pointing to this issue have simply had incorrect configuration file paths. If this issue is of concern to you please raise a support ticket and we will check your store for you.

Update: A proposed fix has been posted here within this thread. If you try out the changes, please report back and let us know if it resolved the problem for you!

A few customers have reported being unable to add items to their basket, at my own store and also at other CubeCart 4 stores. What happens is that they click the 'Add to basket' button on a product page, the page reloads but the item does not show within the Shopping Cart box (and if the customers goes to view their cart, it will show as being empty). I believe the problem can also occur when clicking the 'Buy' button within a category.

We need to find a permanent fix to this problem ASAP, because many shopper who run into this issue will simply leave your store rather than contacting you for assistance.

If anyone else experiences this issue and is willing to help resolve it, please post here or contact me directly ASAP!! This problem is intermittent and as of yet I have no idea of the exact cause. CubeCart staff will most likely be unable to fix the problem unless we can explain exactly how to reproduce it.

Please... if anyone experiences this problem... we need your help! Please post here or contact me ASAP and provide the following information if possible. If you experience this problem yourself, please DO NOT DELETE YOUR COOKIES. Instead, try to answer all 5 questions below. If shoppers at your store experience this problem, ask them what operating system and browser they are using, and ask them to try deleting their cookies (as this may correct the problem and allow them to place their order).

INFORMATION NEEDED

1. Does your store have the SEO mod enabled, if so what setting?

2. What operating system and browser were you using when the problem occurred?

3. What 'ccUser' browser cookies are stored in your browser for your domain? Instructions follow..

Mozilla Firefox: Firstly make sure you are viewing the page where you are unable to add the product to your basket. If you have the Web Developer toolbar installed, simply click Cookies -> View Cookie Information. If you don't, go to Tools -> Options -> Privacy, and click the 'Show Cookies' button. A new window will open, enter your domain name within the search field at the top (e.g. expandingbrain.com). Look for any cookies with a Cookie Name of ccUser (there may be more than one!). Click on each 'ccUser' cookie in turn and view the cookie information shown at the bottom of the window. For each 'ccUser' cookie, make a note of the first few characters of the 'Content' string and also the values for 'Domain', 'Path' and 'Expires'.

Microsoft Internet Explorer: I haven't been able to figure out how to get detailed information about individual cookies (without installing anything). Anyone else know?

4. Details of what you were doing with the store before the problem arose?

- When was your last visit to the store before the problem arose - several hours, days or weeks before?

- Did you start your shopping session by first going to the store homepage, or did you start by going straight to a product page or category page etc (e.g. you may have typed in the URL or clicked on a link in an email that took you direct to one of these pages instead of the store homepage)?

5. Anything else that may possibly be relevant!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have experienced this problem myself (just once) at my own store, so I have included my own answers to the questions above.

1. Does your store have the SEO mod enabled, if so what setting?

Yes - Apache RewriteRule Supported

2. What operating system and browser were you using when the problem occurred?

Windows XP, Firefox 2

3. What 'ccUser' browser cookies are stored in your browser? Instructions follow..

My store had 2 'ccUser' cookies (the second cookie was obviously dodgy and most likely responsible for the inability to add items to the cart, however I have not been able to reproduce this dodgy cookie)

First 'ccUser' cookie:

Value: c2b....

Host: cubecart.expandingbrain.com

Path: /

Expires: At End Of Session

Second 'ccUser' cookie:

Value: (nothing, blank!!!!)

Host: cubecart.expandingbrain.com

Path: /cubecart-3-mods/add-edit-orders-with-add-customer/

Expires: At End Of Session

4. Details of what you were doing with the store before the problem arose?

I think I hadn't visited the store in several days, and may have started my shopping session by clicking on a link that took me direct to this page... however I am not sure!

5. Anything else that may possibly be relevant!

-

Share this post


Link to post
Share on other sites

Guest Rselbo

Estelle ~

Thank you for addressing this issue. We have had this issue since upgrading to version 4 and have finally narrowed down the issue. Every customer that had been phoning or emailing (at least 2-3 per day) that had this issue had been using AOL.

I've installed the AOL browser but the site appears to work fine for me, despite every email we've received on this issue ending in @aol.com. My boss has a friend (whose ISP is AOL) try and purchase through our store and it wouldn't work. Add To Basket failed every time for him. I've already asked my boss for more information on this to post here.

After speaking with AOL they have acknowledged it is there problem and will work to fix it ~ though no estimation as to when. How they can fix the issue without seeing our source code I don't know, but I can almost guarantee that the next time you receive an "Add To Basket" problem the ISP will be AOL.

I'll post more information shortly, I'll be speaking to my boss a little later this evening and will be sure to bring this up. If we have 3 calls per day I hate to think how many don't even bother calling and just go elsewhere :whistle:

Cheers

Share this post


Link to post
Share on other sites
Guest estelle

@Rselbo - For anyone who experiences this problem and is browsing with Firefox and is willing to put in a little time to help you resolve the problem.... ask if they can provide details about their browser cookies (I have provided detailed instructions above, under question 3)

Share this post


Link to post
Share on other sites
Guest RyanG

At first I thought I was going mental.. I had the store working fine, and had started customising the skin. Turned SEO's on whilst I was at it. Next thing I know, completely unable to add products.

And here's the neat part;

1. Turn SEO's off.

2. Add products to basket.

3. Turn SEO's on.

4. Refresh page - all items are still in the cart - UNTIL (!!!) you go to an SEO enabled page, then they all disappear.

This has only happened to me on my system - Fedora 8 w/ Firefox. I can use the site fine within RDP on a Win2k3 box w/ IE7.

INFORMATION NEEDED

1. Does your store have the SEO mod enabled, if so what setting?

Yes - RewriteRule

2. What operating system and browser were you using when the problem occurred?

Broken under Firefox 2.0.0.10 & Fedora 8

3. What 'ccUser' browser cookies are stored in your browser for your domain? Instructions follow..

In the above scenario, I have 1 ccUser cookie before I visit an SEO enabled page, and 2 after I change to an SEO page - 1 of them blank, the other different to the previous ccUser.

4. Details of what you were doing with the store before the problem arose?

Store is new (devel), may have never worked with SEO's enabled.

5. Anything else that may possibly be relevant!

Have removed .htaccess, disabled SEO, enabled SEO, added .htaccess - many times over with different combinations.

Share this post


Link to post
Share on other sites
Guest RyanG

Just a bit more info;

Tested on Windows XP w/ Firefox 2.0.0.11 without any issues. This may be a Firefox version issue. I'm trying to find someone else around here with an older version.

Hmmm.... It works now.. /facepalm

Talk about frustrating.

Share this post


Link to post
Share on other sites
Guest dxm

Just to chime in here, my client who I have just finished a cubecart install for has reported aol customers having problems with the cart also.

All I know at this point is that a couple of aol users have been unable to add items to the cart, i.e. when they try and check out their cart is empty.

We're using 4.1.0RC2 by the way and I'd rather not update if I don't need to (going through the changelogs now).

Share this post


Link to post
Share on other sites
Guest RyanG

It definitely appears to be a cookie issue. I've had it happen to me several times a day whilst working on it. If I delete all the cookies for that domain, visit a non-SEO page, then add a product, it works.

Can't help with why it's breaking though, sorry.

Share this post


Link to post
Share on other sites
Guest estelle

I believe I have fixed this issue at my store, I have not had any reports of problems since I made the following changes.

Anyone who has a s has received reports from your store customers that they add items to their basket, then the basket contents are lost (at any time, either while they are browsing or when they checkout), please try adding the following changes to your store:

EDIT FILE classes/session/cc_session.php (make a BACKUP of this file first!!)

FIND this:

		if (!empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

			$this->destroySession($GLOBALS[CC_SESSION_NAME]);

		}

REPLACE with this:


		/* Fix session bug - remove this block...

		if (!empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

			$this->destroySession($GLOBALS[CC_SESSION_NAME]);

		}

		*/



FIND this:


	function destroySession($sessionId) {

		setcookie(CC_SESSION_NAME);

REPLACE with this:


	function destroySession($sessionId) {

		/* Fix session bug - clear cookies properly */

		/* setcookie(CC_SESSION_NAME); */

		setcookie(CC_SESSION_NAME, '', time()-3600, $GLOBALS['rootRel']);

FIND this:


			$expires = ($length>0) ? (time()+$length) : 0;

			setcookie($name, $value, $expires, $GLOBALS['rootRel']);

REPLACE with:


			$expires = ($length>0) ? (time()+$length) : 0;

			/* Fix session bug - delete cookies first to get rid of any junk cookies created by session bug */

			setcookie($name, '', time()-3600);

			setcookie($name, $value, $expires, $GLOBALS['rootRel']);

Share this post


Link to post
Share on other sites

Well this is known issue it will me managed in the next releases. :D

Share this post


Link to post
Share on other sites
Guest djbotox

... worked for me!!!! Thanks a lot!!! Highly appreciated!!

Share this post


Link to post
Share on other sites

Hi guys, Estelle has some great stuff here. If you want to keep using the IP check but disable it for AOL browsers use:

if (strpos($_SERVER['HTTP_USER_AGENT'],'AOL') == false && !empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

I'll make sure thats present in the next release. AOL... we love it.

Share this post


Link to post
Share on other sites
Guest RyanG

Hi guys, Estelle has some great stuff here. If you want to keep using the IP check but disable it for AOL browsers use:

if (strpos($_SERVER['HTTP_USER_AGENT'],'AOL') == false && !empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

I'll make sure thats present in the next release. AOL... we love it.

Well I can tell you right now this isn't an AOL-only issue. My testing was all internal and I've got nothing at all associated with AOL.

I'll install the hack above and see if it fixes my issue.

Share this post


Link to post
Share on other sites
Guest Rselbo

Worked like a charm for us :D Just bought a new mod from Estelles store also and I'm sure that will work first time without hassle too.

Share this post


Link to post
Share on other sites
Guest StudioX64

I was stuck on this problem, or at least something very similar when I started on the path to upgrading my cc3 site to cc4. The problem was that clicking on the 'add to basket' button in IE7 worked just fine, however in Firefox the View Basket button flashed but nothing ever got added. After following the instructions in this thread, I checked the cookies present on my computer and found under my domain 2 x ccuser cookies. One which was on my base url, and the second one which had a path set to /test/. Basically whilst upgrading all my skins using the trial of cc4 I placed the test copy at www.mydomain.com/test. Thus I also had a copy at www.mydomain.com (the v3 one). Two cookies were subsequently created on my machine under the same domain with two different paths, however cubecart named both cookies ccuser. Thus when my /test/ site was trying to add, it would look in my cookies, under my domain name, and see only the first cookie titled ccuser, then try and use the data from within. Deleting the first cookie thus resolved my problem.

I cannot say for sure how the two cookies came to co-exist, as I don't think cc3 generates a ccuser cookie, but I might be wrong. Anyway, if you are having the same problem, please check that you don't have any dupes with differing paths. Worked for me :(

Share this post


Link to post
Share on other sites
Guest

Hi

@ Developers: When did or will this be included in the package?

Adam

Share this post


Link to post
Share on other sites
Guest Cerus

I'm still experiencing some similar issues, possibly related to website payments pro.

When the customer goes to payment processes, choosing the direct payment option results in the message "Your shopping cart is currently empty.", choosing the paypal option processes normally.

Edit:

In debug mode, this shows up at the payment method screen (choosing between paypal and direct payment) Probably unrelated though, as this same information pops up for payment methods that do work.

$basket Variables: (unserialize($cc_session->ccUserData['basket']))

No Data!



$cc_session->ccUserData Variables:



...

	[basket] => N;

...

Share this post


Link to post
Share on other sites
Guest

I'm having the same problem - not able to add a product to the cart- but only when I've added product options to that product. How do I fix it so that I can add the product to the cart, and still have product options? (I'm using 4.2.0)

EDIT: Problem solved. I had an old skin and the code was wrong.

Share this post


Link to post
Share on other sites
Guest RenateH

I'm having this problem as well. My store is not live yet and it does seem to be related to a particular product. I added a few of a different product while checking that my tax stuff works (it's on testing format) and they went into the basket fine, then I switched to this other product and it shows up in the basket on the product page but when you go into view basket, it is empty. I'm also getting some lightbox css errors that I am going to track down now, but they are just warnings so probably not related. I hope this gets tracked down soon, if I can help in any way, just shout

Renate

Seo is ReWrite

Using Firefox 2.0.0.12 and Vista - no AOL

I have no idea what this cookie information means, but here it is:

__utma

Value 24722988.453329875.1199391521.1199391521.1199391521.1

Host .gottalovebeads.com

Path /

Secure No

Expires Sat, 02 Jan 2010 20:18:40 GMT

* Edit Cookie

* Delete Cookie

Name __utmz

Value 24722988.1199391521.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)

Host .gottalovebeads.com

Path /

Secure No

Expires Fri, 04 Jul 2008 08:18:40 GMT

* Edit Cookie

* Delete Cookie

Name PHPSESSID

Value 3ee114033b1167149406a332d96b4bf1

Host www.gottalovebeads.com

Path /

Secure No

Expires At End Of Session

* Edit Cookie

* Delete Cookie

Name ccAdmin

Value e44688ae06f732c964aecddf7bdd74b8

Host www.gottalovebeads.com

Path /

Secure No

Expires At End Of Session

* Edit Cookie

* Delete Cookie

Name ccUser

Value 3ee114033b1167149406a332d96b4bf1

Host www.gottalovebeads.com

Path /

Secure No

Expires Sat, 29 Mar 2008 14:16:45 GMT

* Edit Cookie

* Delete Cookie

Share this post


Link to post
Share on other sites
Guest RenateH

Estelle, are you still having this problem. I can consistently produce it on my store by doing the following:

. add a product to the cart, it appears added

.view cart, product is there

.click empty cart, product goes away (so far all is correct)

. Click continue shopping

. add a product from the product page, the product appears to be added to the cart,

. 'view cart' the cart is empty. It's like the switch doesn't reset before adding the next item.

. click continue shopping

.add product

. view cart (you get them both now, the one that disappeared and the one just added.)

I reported this via bug tracker but they said they couldn't replicate it, to submit a ticket (I'm just past the end of my support period) . I just know I cannot go live with this cart if this kind of thing keeps happening. I don't know if this is the only instance, cause I don't remember when it crept in before, but this sequence acts this way every time.

Renate

Share this post


Link to post
Share on other sites
Guest estelle

Renate, I believe I have been able to fix this problem at my store. I have had no further reports of this problem at my store (even from customers who experience the problem at other CubeCart stores).

FIRST FIX. If you are not already running the latest version of CubeCart 4, download the latest version and get the classes/session/cc_session.php file from it. Upload this new cc_session.php file. ** Test your store thoroughly to see if the problem remains **

SECOND FIX. IF the problem remains, make the following changes to your classes/session/cc_session.php file. This should fix the problem. ** After making the changes below, you should again thoroughly test your store to see if the problem has been resolved. **

FIND this:

		setcookie(CC_SESSION_NAME);

REPLACE with this:


		/* Fix session bug - clear cookies properly */

		/* setcookie(CC_SESSION_NAME); */

		setcookie(CC_SESSION_NAME, '', time()-3600, $GLOBALS['rootRel']);



FIND this:


			$expires = ($length>0) ? (time()+$length) : 0;

			setcookie($name, $value, $expires, $GLOBALS['rootRel']);

REPLACE with this:


			$expires = ($length>0) ? (time()+$length) : 0;

			/* Fix session bug - delete cookies first to get rid of any junk cookies created by session bug */

			setcookie($name, '', time()-3600);

			setcookie($name, $value, $expires, $GLOBALS['rootRel']);





THIRD AND FINAL FIX.  IF the problem remains, (e.g. if the problem continues to occur during your testing, or if the problem goes away for you but you later receive reports from customers at your store that they are experiencing the same problem), then apply the following change also.




		$client_ip = get_ip_address();

		if (strpos($_SERVER['HTTP_USER_AGENT'],'AOL') == false && !empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

			$this->destroySession($GLOBALS[CC_SESSION_NAME]);

		}

REPLACE with this:


		/* Fix session bug - remove this block...

		$client_ip = get_ip_address();

		if (strpos($_SERVER['HTTP_USER_AGENT'],'AOL') == false && !empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

			$this->destroySession($GLOBALS[CC_SESSION_NAME]);

		}

		*/

EDIT 19th June 08: Corrected mistake in first change shown above.

Share this post


Link to post
Share on other sites
Guest RenateH

Hmm, now I'm really in trouble. None of that code exists. I'm running 4.2.1 Is that the version you are talking about?

Renate

Renate, I believe I have been able to fix this problem at my store. I have had no further reports of this problem at my store (even from customers who experience the problem at other CubeCart stores).

FIRST FIX. If you are not already running the latest version of CubeCart 4, download the latest version and get the classes/session/cc_session.php file from it. Upload this new cc_session.php file. ** Test your store thoroughly to see if the problem remains **

SECOND FIX. IF the problem remains, make the following changes to your classes/session/cc_session.php file. This should fix the problem. ** After making the changes below, you should again thoroughly test your store to see if the problem has been resolved. **

FIND this:

		setcookie(CC_SESSION_NAME, '', time()-3600, $GLOBALS['rootRel']);

REPLACE with this:


		/* Fix session bug - clear cookies properly */

		/* setcookie(CC_SESSION_NAME); */

		setcookie(CC_SESSION_NAME, '', time()-3600, $GLOBALS['rootRel']);



FIND this:


			$expires = ($length>0) ? (time()+$length) : 0;

			setcookie($name, $value, $expires, $GLOBALS['rootRel']);

REPLACE with this:


			$expires = ($length>0) ? (time()+$length) : 0;

			/* Fix session bug - delete cookies first to get rid of any junk cookies created by session bug */

			setcookie($name, '', time()-3600);

			setcookie($name, $value, $expires, $GLOBALS['rootRel']);





THIRD AND FINAL FIX.  IF the problem remains, (e.g. if the problem continues to occur during your testing, or if the problem goes away for you but you later receive reports from customers at your store that they are experiencing the same problem), then apply the following change also.




		$client_ip = get_ip_address();

		if (strpos($_SERVER['HTTP_USER_AGENT'],'AOL') == false && !empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

			$this->destroySession($GLOBALS[CC_SESSION_NAME]);

		}

REPLACE with this:


		/* Fix session bug - remove this block...

		$client_ip = get_ip_address();

		if (strpos($_SERVER['HTTP_USER_AGENT'],'AOL') == false && !empty($result[0]['ip']) && ($result[0]['ip'] !== $client_ip || $result[0]['browser'] !== $_SERVER['HTTP_USER_AGENT'])) {

			$this->destroySession($GLOBALS[CC_SESSION_NAME]);

		}

		*/

Share this post


Link to post
Share on other sites
Guest Rselbo

Hmm, now I'm really in trouble. None of that code exists. I'm running 4.2.1 Is that the version you are talking about?

Renate

FIND this:

		setcookie(CC_SESSION_NAME, '', time()-3600, $GLOBALS['rootRel']);

REPLACE with this:


		/* Fix session bug - clear cookies properly */

		/* setcookie(CC_SESSION_NAME); */

		setcookie(CC_SESSION_NAME, '', time()-3600, $GLOBALS['rootRel']);
I had the same issue, with the code Estelle posted not being found. Hopefully Estelle can confirm this for me however I think its just a copy & paste error when Estelle posted her message. I believe it should be as below:- FIND this:

		setcookie(CC_SESSION_NAME);

REPLACE with this:


		/* Fix session bug - clear cookies properly */

		/* setcookie(CC_SESSION_NAME); */

		setcookie(CC_SESSION_NAME, '', time()-3600, $GLOBALS['rootRel']);

Share this post


Link to post
Share on other sites
Guest dazza100

Hi Estelle

I have been reading your post and was hoping you can help me.

I am using the latest version of CC4 I have had 2 customers today contact me stating when they go to checkout the basket empties. They have not been much help with diagnosing the problem but one of them was using internet explorer told here to clear cookies and she managed to place an order. Is this the same as the issue in you post as the problem you mentioned is that the products won’t add to basket rather than the products being added and then removed. But maybe they did not notice the products were added as customers are not redirected to the basket after adding the products.

Thank You in advance for your attention.

Regards

Darren

Share this post


Link to post
Share on other sites
Guest petemasson

I've got this problem too. Running on 4.2.1 and have tried all of Estelles fixes. I've finally managed to narrow the problem down so that I can replicate it, at least on one shop.

1) I can only make it happen in IE6 (not IE7, firefox, safari)

2) Add a product to basket, and the view basket button flashes, but there is nothing there

3) Solution is to click "continue shopping", whereupon you can then start adding items to the basket.

4) Subsequent adds are fine, until you start again in a new browser window.

Looking at the debug information, the difference between IE6 and IE7 following the same steps seem to start in the $_COOKIE variables - IE6 doesn't set ccUser, whereas IE7 does set ccUser and IE6 does only once you've clicked continue shopping once.

Another shop, also running 4.2.1 doesn't replicate the problem, although I have occasionally had phone calls suggesting that it does - mostly from AOL users.

Any ideas anyone??? Please?!?

Pete

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...