Forums / General Questions / Sometimes when I click "buy now", "Your shopping cart is empty" appears

Sometimes when I click "buy now", "Your shopping cart is empty" appears

Locked

Started by ashely on 13 Apr 2010, 2:42 PM · Views: 4,865

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
13 Apr 2010, 2:42 PM
#1
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Sometimes when I click "buy now", "Your shopping cart is empty" appears

Hello everybody,

When I click "add to cart" or "buy now" on the product listing page, sometimes the product is just not added to my cart, and the page switches to my empty shopping cart page. Then I have to go back and click to buy the product again till it is finally added to the cart.

I don't know what could be the cause of it. Does anybody encounter this before? I really need your help!

Many thanks in advance,
Ashely

14 Apr 2010, 12:41 PM
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,324
Plugin Contributions:
40

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

Ashely:

Hello everybody,

When I click "add to cart" or "buy now" on the product listing page, sometimes the product is just not added to my cart, and the page switches to my empty shopping cart page. Then I have to go back and click to buy the product again till it is finally added to the cart.

I don't know what could be the cause of it. Does anybody encounter this before? I really need your help!

Many thanks in advance,
Ashely
What version PHP?

~Melanie

15 Apr 2010, 5:37 PM
#3
litepockets avatar

litepockets

Zen Follower

Join Date:
Apr 2008
Location:
Covington, Washington, United States
Posts:
206
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

Hi Melanie,

I'm experiencing the same problem. At times I may have to click add to cart 2-3 times before it actually does add to the cart. My server is running php 5.2.6, let me know what add'l info you might need to help diagnose the problem :)

15 Apr 2010, 5:41 PM
#4
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,324
Plugin Contributions:
40

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

litepockets:

Hi Melanie,

I'm experiencing the same problem. At times I may have to click add to cart 2-3 times before it actually does add to the cart. My server is running php 5.2.6, let me know what add'l info you might need to help diagnose the problem :)

Have link?

15 Apr 2010, 7:18 PM
#6
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

Hi,

Thanks for your replies.

mprough:

What version PHP?

~Melanie

My PHP version is 5.2.9.

litepockets:

Hi Melanie,

I'm a dunce, I didn't search deep enough apparently... Found http://www.zen-cart.com/forum/showthread.php?t=113844 which was the offending problem.

I tried the method saitomedia posted - by adding "php_flag suhosin.session.encrypt off" into the .htaccess alongside the public_html folder. But then the website is just down and says there's an internal error. So I'm not sure if my problem is not the same one they posted about, or if I misunderstood something and did it in a wrong way...
Have you got it solved, litepockets?

Thanks again,
Ashely

15 Apr 2010, 8:27 PM
#7
litepockets avatar

litepockets

Zen Follower

Join Date:
Apr 2008
Location:
Covington, Washington, United States
Posts:
206
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

Hi Ashley, please post .htaccess file

17 Apr 2010, 2:41 AM
#8
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

litepockets:

Hi Ashley, please post .htaccess file

I just created a new .htaccess file in which I write the following text:
php_flag suhosin.session.encrypt off

I put this file just under my root folder where the public_html is there too.

Is there anything wrong here?

Thanks again,
Ashely

17 Apr 2010, 4:59 AM
#9
litepockets avatar

litepockets

Zen Follower

Join Date:
Apr 2008
Location:
Covington, Washington, United States
Posts:
206
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

The .htaccess goes in the same directory that holds you admin directory, includes directory, images directory, etc. This is called your store root directory. In some cases it may be different than your real "root" directory. For example, a domain with zen-cart installed like https://www.domain.com/store/ would have "store" as their root directory. Inside store, u would find the admin folder, images, etc.
Posted via Mobile Device

17 Apr 2010, 5:31 PM
#10
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

litepockets:

The .htaccess goes in the same directory that holds you admin directory, includes directory, images directory, etc. This is called your store root directory. In some cases it may be different than your real "root" directory. For example, a domain with zen-cart installed like https://www.domain.com/store/ would have "store" as their root directory. Inside store, u would find the admin folder, images, etc.
Posted via Mobile Device

Thanks much for your reply. Sorry for confusing you.

But I tried putting the modified .htaccess into the root folder too. However, the same problem occurred - "500 Internal Server Error". I think I must get something wrong in the .htaccess. The content is as follows:

php_flag suhosin.session.encrypt off

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[xxxx])
RewriteCond %{REQUEST_URI} !\.[a-zA-Z]{2,4}$
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/admin.* [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors.* [NC]
# Don't rewrite cPanel directories
RewriteCond %{REQUEST_URI} !/cpanel.* [NC]
RewriteCond %{REQUEST_URI} !/frontend.* [NC]
# Handle all other URIs using Zen Cart (index.php)
RewriteRule (.*) index.php?%{QUERY_STRING} [L]

I just added "php_flag suhosin.session.encrypt off" on the first line of the existing file..

Many thanks again for your time and patience, litepockets.

Ashely

17 Apr 2010, 7:35 PM
#11
litepockets avatar

litepockets

Zen Follower

Join Date:
Apr 2008
Location:
Covington, Washington, United States
Posts:
206
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

Couple of things... 1- where did the rest of the content in you htaccess file come from?
2- I assume since you said you had not had an htaccess file previously that you don't have any seo friendly url modules installed on your cart?

Fir the sake if troubleshooting, back up the htaccess you have now, and then delete all but the string we added to fix your problem. This will tell us if your current htaccess file is causing the errors. If problems go away then we need to fix the other elements of the htaccess. If not, we need to look elsewhere.
Posted via Mobile Device

18 Apr 2010, 12:11 AM
#12
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

Hello,

litepockets:

1- where did the rest of the content in you htaccess file come from?

The rest of the content comes from the module of ceon_uri_mapping_3.2.3_for_zc.

litepockets:

Fir the sake if troubleshooting, back up the htaccess you have now, and then delete all but the string we added to fix your problem.

I have tried this - deleting all but the first line "php_flag suhosin.session.encrypt off". However, the same error occurs... So I think the problem is outside of the .htacess file, but something to do with the sever/admin settings? I totally have not idea on this...

Many thanks again..!!!!

Ashely

18 Apr 2010, 12:34 AM
#13
litepockets avatar

litepockets

Zen Follower

Join Date:
Apr 2008
Location:
Covington, Washington, United States
Posts:
206
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

I just re-read your error. Internal error 500 indicates permission issues. Have you enabled debug tool and checked debug cache logs? It might show a php file or whatever that can't be executed possibly due to pemissions?
Posted via Mobile Device

18 Apr 2010, 2:17 AM
#14
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

I enabled the enable_error_logging.php file and also checkd the debug cache logs, but there's no error detected...

19 Apr 2010, 9:35 PM
#15
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

I contacted with my host provider and they confirmed they haven't installed Suhosin. So I think that's why the method doesn't work and the error appears... Litepockets, thank you for your great patience and help anyway.

Then what could be wrong? Why the products are not added to the cart from time to time?

Anyone have ideas?

21 Apr 2010, 6:14 PM
#16
ashely avatar

ashely

New Zenner

Join Date:
Apr 2010
Posts:
43
Plugin Contributions:
0

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

The problem seems to be finally addressed!! :-D
Someone helped me.

The following is what I did:

I created a 'php.ini' file in the main shop directory (the root folder), root/admin and root/includes, with the code:
output_buffering = On

Hope it helps.

Thanks again for those who have helped me on this issue.

Ashely

21 Apr 2010, 6:38 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Sometimes when I click "buy now", "Your shopping cart is empty" appears

Thanks for the update and for posting the solution to this problem ... that is always a help to others ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!