Forums / General Questions / Products disappearing in shopping cart

Products disappearing in shopping cart

Locked

Started by lerpsu on 18 Jul 2010, 3:55 PM · Views: 3,713

Results 1 to 20 of 38
This thread is locked. New replies are disabled.
18 Jul 2010, 3:55 PM
#1
lerpsu avatar

lerpsu

New Zenner

Join Date:
Jul 2010
Posts:
7
Plugin Contributions:
0

Products disappearing in shopping cart

Hello everyone, this is my first post here.

I got problem on my website. When I add products to cart everything works just fine.

Here comes the problem: when I click my starting page link, Zen-Cart starts new session for some reason and generates me new 'zenid'. This will cause an empty shopping cart.

I'm using Zen-Cart 1.3.9D.

18 Jul 2010, 9:07 PM
#2
lovingexpress avatar

lovingexpress

New Zenner

Join Date:
Jul 2010
Location:
Spokane, WA
Posts:
25
Plugin Contributions:
0

Re: Products disappearing in shopping cart

I'm having a similar problem.. if you add something to my cart it looks like it works but then when the page refreshes it says "Your Shopping Cart is empty." :shocking: and that's when I cry.. lol.

"With hurricanes, tornadoes, fires out of control, mud slides, and flooding tearing up the country, and with the threat of bird flu and terrorist attacks, "Are we sure this is a good time to take God out of the Pledge of Allegiance?"

19 Jul 2010, 6:44 AM
#3
lerpsu avatar

lerpsu

New Zenner

Join Date:
Jul 2010
Posts:
7
Plugin Contributions:
0

Re: Products disappearing in shopping cart

I have tried almost everything with this...I even uploaded all the Zen-Cart files again but it didn't help.

I have noticed that my site is not the only one with this problem. I visited in some other Zen-Cart shops and some of them have same problem. When you add something to cart it works but in some point it is starting a new session and site generates you new zenid.

I hope you understand what I mean ;)

19 Jul 2010, 11:10 AM
#4
lovingexpress avatar

lovingexpress

New Zenner

Join Date:
Jul 2010
Location:
Spokane, WA
Posts:
25
Plugin Contributions:
0

Re: Products disappearing in shopping cart

I wonder if it's something you either have to turn on or install separately like a mod? I didn't see it in the install manual but hey I'm blond it could have been anywhere in there.

"With hurricanes, tornadoes, fires out of control, mud slides, and flooding tearing up the country, and with the threat of bird flu and terrorist attacks, "Are we sure this is a good time to take God out of the Pledge of Allegiance?"

19 Jul 2010, 12:31 PM
#5
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: Products disappearing in shopping cart

are you adding items to the cart as a customer who is logged in? or as a non-logged in visitor?

Are you leaving long periods of time between adding items to the cart and then going to the home page?

Is this happening on a bought/custom template or does this happen even to the green standard template?

do you have an URLs we can look at and test?

Have i asked enough questions? lol

19 Jul 2010, 12:44 PM
#6
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: Products disappearing in shopping cart

do you have cookies enabled in your browser?
does ZENID appear all the time in the URL on every page click?

See i have just logged into one of my test sites that i have not touched for months.. and the items i left in my cart are still there... as it is supposed to be.. and thats a 1.3.9a site manually upgraded to 1.3.9d

19 Jul 2010, 8:15 PM
#7
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,569
Plugin Contributions:
59

Re: Products disappearing in shopping cart

We recently upgraded a client to 1.3.9d from 1.3.8a. His website is very popular so we are getting a half dozen reports of this issue per day. The customer will add a product to their cart and then when they add another product, it will appear in their cart under a new session (this is confirmed by checking whose online). They will only be able to see the products added under the first session.

However, often if they go back to the product's page that isn't showing in their cart, it will switch back to the other session but you can never view those products in the cart (clicking the shopping cart takes you back to the other session).

The problem doesn't happen consistently as we are still getting many orders, but the reports cannot be denied.

We fixed the init_sessions.php bug in 1.3.9d and made sure the cache URL in the admin config is set properly, however we are using the database to store sessions anyways.

Telling customers to open and close the browser does not always work and obviously isn't a viable solution as we cannot be there to tell every customer to try this.

We ARE using Simple SEO URLs.

19 Jul 2010, 8:19 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Products disappearing in shopping cart

And if you turn OFF the url-rewrites ... ?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Jul 2010, 8:25 PM
#9
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,569
Plugin Contributions:
59

Re: Products disappearing in shopping cart

DrByte:

And if you turn OFF the url-rewrites ... ?
This is a live site, so we can't do that. I did merge the html_output.php file as per the instructions for SSU and 1.3.9d.

Are others reporting the same issue without using SEO URLs?

19 Jul 2010, 8:35 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Products disappearing in shopping cart

I can't replicate the problem with the URL you sent me by PM.
5 times I added something to my cart, and every one got added to the cart fine. Tested in Safari on Mac and Firefox on Mac. Both latest versions.
I do notice that you've got tons of addons and customizations installed, including a minifying tool and lots of ajax.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Jul 2010, 8:37 PM
#11
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,569
Plugin Contributions:
59

Re: Products disappearing in shopping cart

DrByte:

I can't replicate the problem with the URL you sent me by PM.
5 times I added something to my cart, and every one got added to the cart fine. Tested in Safari on Mac and Firefox on Mac. Both latest versions.
I do notice that you've got tons of addons and customizations installed, including a minifying tool and lots of ajax.
Yes, there are many customizations but none affect the sessions except for SSU. I've just emailed that author (yellow1912) to see if he has had similar reports. I'll keep this thread updated.

19 Jul 2010, 9:59 PM
#12
lovingexpress avatar

lovingexpress

New Zenner

Join Date:
Jul 2010
Location:
Spokane, WA
Posts:
25
Plugin Contributions:
0

Re: Products disappearing in shopping cart

mine is https://www.yours-by-design.com

I have "force cookies" on but it is still doing it...

"With hurricanes, tornadoes, fires out of control, mud slides, and flooding tearing up the country, and with the threat of bird flu and terrorist attacks, "Are we sure this is a good time to take God out of the Pledge of Allegiance?"

19 Jul 2010, 10:18 PM
#13
lovingexpress avatar

lovingexpress

New Zenner

Join Date:
Jul 2010
Location:
Spokane, WA
Posts:
25
Plugin Contributions:
0

Re: Products disappearing in shopping cart

could this be the problem? This is in the description of the product.. it's supposed to be paypal's cart button.. but I think it may be psychotic... LOL.. I tried deleting it but it was worse....

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="AXMSWPPXHWRM8">
<table>
<tr><td><input type="hidden" name="on0" value="11 oz white">11 oz white</td></tr><tr><td><select name="os0">
	<option value="1 Photo and Text">1 Photo and Text $13.00</option>
	<option value="2 Photos and Text">2 Photos and Text $14.00</option>
	<option value="3 Photos and Text">3 Photos and Text $15.00</option>
	<option value="4 Photos and Text">4 Photos and Text $16.00</option>
	<option value="5 Photos and Text">5 Photos and Text $17.00</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Enter Your Personalized Text">Enter Your Personalized Text</td></tr><tr><td><input type="text" name="os1" maxlength="60"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

"With hurricanes, tornadoes, fires out of control, mud slides, and flooding tearing up the country, and with the threat of bird flu and terrorist attacks, "Are we sure this is a good time to take God out of the Pledge of Allegiance?"

19 Jul 2010, 10:25 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Products disappearing in shopping cart

That's a PayPal-Hosted-Button, and is NOT generated by Zen Cart.

Zen Cart is NOT designed to work with "Paypal hosted buttons", since that turns PayPal into your shopping cart program, completely bypassing Zen Cart.
If you've got embedded "paypal hosted buttons" in your products, then NATURALLY Zen Cart will never see products purchased via those buttons.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Jul 2010, 1:24 AM
#15
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,569
Plugin Contributions:
59

Re: Products disappearing in shopping cart

I've seen issues where an incorrectly formatted XHTML form will not pass the expected information to the shopping cart page.

That may help some people but has nothing to do with ZC 1.3.9d.

20 Jul 2010, 8:47 AM
#16
lerpsu avatar

lerpsu

New Zenner

Join Date:
Jul 2010
Posts:
7
Plugin Contributions:
0

Re: Products disappearing in shopping cart

I got it work by changing my home page links. Previously my home page link code was:

<a href="' . HTTP_SERVER . DIR_WS_CATALOG '">Home page</a>

and this made home page links look like http://example.com. This is the default code in Zen-Cart.

I changed my home page link code to following:

<a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'index.php?mainpage=&zenid=' . $_REQUEST['zenid'] . '">Home page</a>

and that made my home page link look like http://example.com/index.php?main_page=&zenid=1234567890asdf.

This causes new problem which is not relevant. If user's first click at my shop is "Home page", Zen-cart won't generate zenid properly. However everything works just fine but it might cause problems with some mods, I don't know. This is not big problem because I don't think anyone would have a reason to click first my home page link.

This is happening only when customer is non-logged visitor. I don't have any mods turned on and I have even turned my SEO off.

Apparently this won't help others but it worked for me.

20 Jul 2010, 8:15 PM
#17
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,569
Plugin Contributions:
59

Re: Products disappearing in shopping cart

numinix:

Yes, there are many customizations but none affect the sessions except for SSU. I've just emailed that author (yellow1912) to see if he has had similar reports. I'll keep this thread updated.
The author has released a new version but states that this issue happens regardless of SSU.
The main issue is why would Zen Cart create a second session for the same IP if a live session still exists?

Should we try enabling the "Check IP Address" feature?

20 Jul 2010, 9:26 PM
#18
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,569
Plugin Contributions:
59

Re: Products disappearing in shopping cart

Ok, further testing while the bug was occurring found that disabling SSU resolved the issue. However, all of our SEO work requires this module so we need to look to the author to fix the problem.

Are others who are experiencing this problem also using Simple SEO URLs or some other SEO URLs script? Does disabling the script help?

20 Jul 2010, 9:34 PM
#19
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,943
Plugin Contributions:
3

Re: Products disappearing in shopping cart

k, could you also try this as a potential fix

in the extra_configures directory,
create a file called override_cookie_path.php
that contains

<?php
define('CUSTOM_COOKIE_PATH', '/');

and try again with SSU on

20 Jul 2010, 9:35 PM
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Products disappearing in shopping cart

your store is setting two separate cookies, one with the store URL, and one with the store path and one with the store path followed by SSU URI like -c-46

one example, from the URL you shared privately, which sets two separate cookies, is this: 'http://www.domain_name.com/store/rubik-s-cube-c-19_38/rubik-s-cube-p-201

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.