Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Empty Shopping Cart Error When Checking Out with PayPal

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › Empty Shopping Cart Error When Checking Out with PayPal

Tagged: back, button, cart, checkout, clears, empty cart, PayPal, PHP Session, return

  • This topic has 13 replies, 7 voices, and was last updated 13 years, 8 months ago by admin.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • November 11, 2010 at 5:42 pm #2211
    fudgenaround
    Member

    Something weird is happening. with certain items during the checkout the cart is lost and I get the following message:

    Either your shopping cart is empty or the PHP Session on your server is not working correctly. Please check this article

    This happens when I add certain products to the cart only. I was working on the cart yesterday and it was fine and today I am getting this error. I am using FireFox 3.6.12. When I try to place an order with another browser such as Chrome or IE it works fine.

    Here is the website: http://fudgenaround.com/index.php/order-fudge/

    If I add Chocolate Brick and check out it is fine but if I add Mint Brick and checkout it thinks my shopping cart is empty.

    Any clue? I know the PHP Session is working cuz I host dozens of websites that use it on the same server. I’m running IIS6 on Win2k3 Server. I’m thinking there is something funky going on with the browser but not sure why it happens only with certain products

    November 16, 2010 at 4:49 am #26418
    amin007
    Participant

    My apologies for missing this post.

    Lets try this tweak first to make sure that the issue is related to what I think it is:

    Open the “eStore_payment_submission.php” file and search for the following line of code:

    reset_eStore_cart();

    When you find it just delete it (there will be a few occurrences so delete them all).

    Now do a checkout and let me know how it behaves. yes the cart will not get cleared after the purchase but I have a solution for that.

    November 16, 2010 at 4:23 pm #26419
    fudgenaround
    Member

    I commented out all the calls to reset_eStore_cart() on eStore_payment_submission.php but the issue is still happening in FireFox. I didn’t delete the lines incase we had to put them back in there but they are still currently disabled on the website. I commented out the check function that checks if session is working or if the cart is empty and when it went to paypal the shopping cart was actually empty.

    Any other ideas?

    November 16, 2010 at 4:32 pm #26420
    fudgenaround
    Member

    okay, something weird is happening. I logged out as admin and then tried the shopping cart and now I am able to check out. I went through and removed all the comments to the reset cart function and tried it again and I am able to check out. I also logged back in as admin and tried the cart again and no problems now.

    not sure how I got stuck but it seems to be working now on all browsers and FireFox too.

    November 17, 2010 at 1:22 am #26421
    amin007
    Participant

    I can’t really explain it just yet as I haven’t been able to identify a pattern so please keep an eye out to see what changes in the server causes this weird behavior.

    November 18, 2010 at 1:12 am #26422
    fudgenaround
    Member

    I almost think its a browser/cookie issue cuz it went away as soon as I logged out as admin and on the other browsers Chrome and IE i never logged in as admin

    November 21, 2010 at 4:38 pm #26423
    fudgenaround
    Member

    okay… its back! When using FF, I added some items to the cart and when I went to go check out the cart was empty. I thought it was the admin logged in thing again and logged out and cleared out the cart. added new items and when i clicked on check out was getting the empty cart message again.

    any ideas on how to track this bug down?

    November 22, 2010 at 12:58 am #26424
    wpCommerce
    Moderator

    Ok, I just jumped on your order page – http://fudgenaround.com/index.php/order-fudge/

    After adding a product to the cart I clicked on checkout and it was trying to submit all the product information from – http://www.fudgenaround.com/wp-content/plugins/wp-cart-for-digital-products/eStore_payment_submission.php

    You can see that there is a difference between the two URL. One has www and another doesn’t have.

    we added product from the URL with no WWW but during checkout eStore is trying submit data from the 2nd URL (where no product has been added resulting an empty cart error). I guess you are using www version for WP URL and no www for the site URL. Please make sure the WP URL and the site URL are same in your General settings of WordPress.

    The cause and effect is explained in detail here:

    https://support.tipsandtricks-hq.com/forums/topic/incorrect-server-setup-related-to-url-rewriting-cause-and-effect

    November 22, 2010 at 10:03 pm #26425
    fudgenaround
    Member

    that was it! damn URLs. I had the entry for the products page as “/index.php/order-fudge/” and now I updated it to “http://www.fudgenaround.com/index.php/order-fudge/” to make sure the www is in the URL now.

    Thank you so much for helping me. it was drivin me nutz and I couldn’t figure it out.

    January 5, 2011 at 9:38 pm #26426
    teamilluminati
    Member

    I just finished reading this earlier post:

    “Lets try this tweak first to make sure that the issue is related to what I think it is:

    Open the “eStore_payment_submission.php” file and search for the following line of code:

    reset_eStore_cart();

    When you find it just delete it (there will be a few occurrences so delete them all).

    Now do a checkout and let me know how it behaves. yes the cart will not get cleared after the purchase but I have a solution for that.”

    Amin, can you please describe what that solution is?

    thanks,

    Ernest

    January 5, 2011 at 9:49 pm #26427
    teamilluminati
    Member

    oops! sorry, i forgot to include the URL where i’m having the issue. it’s a site i’m building that’s currently in sandbox mode, at http://latinhymns.com/store

    the problem only appears in firefox. i have already changed my eStore_payment_submission.php file as you recommended, and that seemed to clear up the issue. however, now the shopping cart remains full even after checkout.

    thanks,

    ernest

    April 5, 2011 at 2:25 pm #26428
    bastywebb
    Spectator

    I didn’t like the fact that, if a user clicked the back button or the ‘cancel and return to merchant’ link on paypal their cart would be empty. So I followed the advice here and went to the eStore_payment_submission.php file and commented out all 3 occurrences of:

    reset_eStore_cart();

    My solution to ensuring that the cart eventually gets cleared when payment is complete was to put the reset_eStore_cart() function at the top of my thank you page. To do that, I created a file in my theme called page-thank-you.php which was a copy of page.php. My slug for the thank you page is thank-you, so anyone else would adapt the name of the file like so page-your-thank-you-page-slug.php

    September 5, 2011 at 3:22 am #26429
    dlavine
    Member

    None of the solutions that I’ve found so far work. Can someone please tell me why the cart empty error is happening at the following location online: http://www.sweettaterpiepublishing.com/wordpress/?page_id=2

    September 5, 2011 at 8:07 am #26430
    admin
    Keymaster

    Uncheck the “Use Fancy Redirection on Checkout” option from the eStore settings and try it out.

  • Author
    Posts
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ