Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore F.A.Q/Instructions › "Your shopping cart is empty" Upon Checkout
Tagged: add to cart button, cache, PHP Session, shopping cart empty
- This topic has 25 replies, 9 voices, and was last updated 9 years, 5 months ago by rosspdavis.
-
AuthorPosts
-
August 26, 2010 at 1:19 am #1738wpCommerceModerator
If you are getting the “Your shopping cart is empty” error while checking out through PayPal then it could be for one of the following reasons:
1. The PHP Session on your server is not working correctly.
2. Your site URL and WordPress blog URL are not specified the same in the General settings of WordPress.
Now let’s have a quick explanation of the two issues and how to identify them:
1. PHP Session Issue
If you are having a PHP session issue on your site then the plugin won’t be able to keep the item information in the session variable (even if you see the items are being added). So anyone clicking on the payment button and checking out through PayPal will get the error as the shopping cart could not submit any item information to the gateway.
How to identify if you are having this issue?
a) Add a product to the shopping cart.
b) Check to make sure that the item appears in the cart.
c) Now, navigate away from this page and go to another post or page.
d) Navigate back to the page where you have the shopping cart displaying the items in your cart.
e) Can you still see the items in the shopping cart?
If you can’t then it means the item information got lost which indicates that you may have a PHP session not working related issue. The shopping cart stores the item information in the PHP session so if your session is working correctly then the items shouldn’t have disappeared.
How to Solve this issue?
Simply contacting your hosting provider should be good enough to get your PHP session issue fixed. Here is another post that might be of some help with this:
You can easily point out this issue by navigating away from the page (after adding a product in the cart) and again coming back to the same page. If the item is still not in the cart means you have the PHP session issue. You need to contact you hosting provider to fix this.
2. Incorrect server setup
Say, you have specified the following in the “General Settings” of your WordPress dashboard:
Site URL: http://www.example.com
WordPress blog URL: http://example.com
Notice that one is missing the “www”? That’s the problem. Both of them should use the same value. So you can either use “http://example.com” in both fields or use “http://www.example.com” in both fields (Just don’t mix them).
The following URL will explain this in full details as to why this is an issue:
December 5, 2010 at 7:30 pm #23683vfontjrMemberI ran into this issue with WordPress 3.02 on one of my multi-site domains. It took a while to figure out, but I fixed it through the Super Admin menu by editing the site details. I wrote about how to fix it in this blog post: How to Set Up the eStore Plugin in WordPress 3.x Multi-site: [http://wp.me/p1cwOP-ae]
I hope it’s alright to post the link to the blog article. If not, please delte the post. I won’t be offended. I just want to help others who are having the same problem.
December 5, 2010 at 11:46 pm #23684amin007ParticipantThank you for sharing this info. It will definitely help others who may face this in the future.
March 11, 2011 at 9:15 pm #23685kairosMemberI’m getting the “Either your shopping cart is empty or the PHP Session on your server is not working correctly.” error when I click the Check Out With PayPal button.
I don’t think it’s PHP related because the cart seems to be keeping the products when they are added to it, it’s just not going through to Paypal. Therefore, I wondering if it’s a server setup issue.
My wordpress general settings are:
Wordpress Address (URL) [http://www.handwriteforcash.com]
Site Address (URL) [http://www.handwriteforcash.com]
Also, I have a single hosting account with multiple domains and each site has its own wordpress installation. I have the handwriteforcash.com domain pointing to the kairosventuregroup.com/handwriteforcash/ folder where the wordpress files for this site are stored. kairosventuregroup.com is the root.
Do you see a problem?
March 12, 2011 at 12:27 am #23686amin007ParticipantYour site setup is fine. PHP Session values are somehow getting lost when it goes to the payment submission page. Since you site is in testing state can you disable all plugins on the site except eStore and let me know if it makes a difference when you try to checkout? Sometimes a plugin can start a new Session without checking for the existing one which can empty out the session.
March 12, 2011 at 2:26 pm #23687kairosMemberI disabled every plugin but estore – same error message.
Previously, I was loosing the items in the cart when I would navigate to another page. I called my hosting provider (fat cow) and they confirmed the session code but noticed I was missing a /tmp folder to store values, so they added the following folder
root/cgi-bin/tmp
However, when I look in this folder it says “no files”. Should there be files in it? Could it be a permission problem?
March 12, 2011 at 11:17 pm #23688amin007ParticipantSent you an email to get site access so I can investigate it.
May 3, 2011 at 3:41 am #23689amin007ParticipantTurned out to be a PHP session issue on the server.
July 5, 2012 at 12:09 pm #23690newmoMemberHi,
I’m having a similar issue.
The images display in the shopping cart correctly and when I click Checkout with Paypal I get an error message which says “Either your shopping cart is empty or the PHP Session on your server is not working correctly.”
I have called my web host and they have said my php session is set up correctly.
They also added the following code to the php.ini file that was suggested in another forum post – session.save_path = /tmp
I have also double checked that my WordPress and Site address are the same in General Settings page in WordPress. (both are http://www.wetrax.com.au)
Any ideas why I’m getting this error message?
My product page is – [http://www.wetrax.com.au/test-ecommerce-2/]
My shopping cart is here – [http://www.wetrax.com.au/shopping-cart/]
July 6, 2012 at 5:15 am #23691adminKeymasterPlease do the following:
Open the “eStore_advanced_configs.php” file and look for the following line of code:
define('WP_ESTORE_ENABLE_NEW_CHECKOUT_REDIRECTION', '0');
Once you find it change it to the following:
define('WP_ESTORE_ENABLE_NEW_CHECKOUT_REDIRECTION', '1');
Let me know how you go after that.
July 7, 2012 at 1:53 am #23692newmoMemberThanks,
I’ve uploaded and activated a fresh build, where is the file that I need to change the above code in?
July 7, 2012 at 3:32 am #23693adminKeymasterSorry, I missed the name of the file… I updated the previous post and corrected it. Anyway, the name of the file that you will be editing is “eStore_advanced_configs.php”
July 9, 2012 at 11:33 am #23694newmoMemberNo worries,
I’ve activated the fresh build and uploaded the amended “eStore_advanced_configs.php” file.
Now the “Checkout with Paypal” button doesn’t seem to click through to anything?
July 9, 2012 at 12:50 pm #23695IvyMemberCan you please make sure the version of the eStore you are using is 6.8.1. If not please load a new build of the plugin (see the link below).
https://support.tipsandtricks-hq.com/forums/topic/re-install-or-load-a-fresh-build-of-the-plugins
July 10, 2012 at 11:00 am #23696newmoMemberGreat, thanks for your help.
Re-installed a new version and now all the products are pulling through correctly. Everything is working fine now. Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.