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

'Page Not Found' when adding/removing products from Cart

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › 'Page Not Found' when adding/removing products from Cart

Tagged: 404, page not found, shopping cart, Update Cart, WP eStore

  • This topic has 14 replies, 5 voices, and was last updated 13 years, 3 months ago by Zain.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • January 9, 2011 at 10:20 pm #2475
    raistlin
    Member

    Good Day,

    I am experiencing an error when products are added or removed from the Shopping Cart.

    When you add or remove a product you get delivered to a ‘Page not Found’ page. The item remains in order (adding or removing from cart) but the page reloads as ‘Page not Found’. :/

    Any suggestions or pointers in the right direction would be greatly appreciated! :D

    Kind thanks in advance,

    January 10, 2011 at 3:10 am #27873
    wpCommerce
    Moderator

    Can you please post a link to the page where you are having the issue?

    January 10, 2011 at 3:27 am #27874
    raistlin
    Member

    Of course! My apologies,

    [http://bit.ly/ex1U1Z]

    Thank you so much, your time is greatly appreciated.

    January 10, 2011 at 3:34 am #27875
    amin007
    Participant

    If you are using “Automatic Redirection” to the checkout page can you please post a link to your checkout page too?

    January 10, 2011 at 3:38 am #27876
    raistlin
    Member

    Unfortunately it appears that the “Automatic redirection to checkout page” is not checked on the Settings page.

    January 10, 2011 at 7:08 am #27877
    amin007
    Participant

    Some setup on your server is not complete. When doing a HTTP POST to the same page it seem to give a 404 error. Not sure if the URL rewriting on your .htaccess is screwed a bit. Can you please post the content of the .htaccess file from the root of your site?

    Also, if you use the automatic redirection option do you still get this issue?

    Here is a link to a post where another user faced this issue and it turned out to be a badly configured server issue:

    https://support.tipsandtricks-hq.com/forums/topic/estore-error-forbidden-page-when-pressing-add-to-cart-button

    Alternatively, try the following as an workaround:

    Please do step 1-5 from the following post and then see if that works:

    https://support.tipsandtricks-hq.com/forums/topic/how-to-create-a-specific-checkout-page-for-estore

    January 10, 2011 at 6:34 pm #27878
    raistlin
    Member

    When I enable the automatic redirection option it does route to the specified URL in the options page. Here’s the code from the root .htaccess file:

    # BEGIN WordPress

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteRule ^index.php$ - [L]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . /index.php [L]

    </IfModule>

    # END WordPress

    Thank you so very much :)

    Cheers,

    January 11, 2011 at 4:46 am #27879
    amin007
    Participant

    Your .htaccess file looks good. Are you using a windows server?

    January 12, 2011 at 1:31 am #27880
    raistlin
    Member

    The website is hosted via HostMonster [http://www.hostmonster.com] which I believe operates Linux servers.

    January 14, 2011 at 4:56 am #27881
    raistlin
    Member

    Good Day,

    Just thought I’d drop by to clarify that Hostmonster does use Linux servers (I apologize after re-reading what was written prior it was not clear).

    I’ve been digging around the forums over the past day or so and found this snippet:

    Hi This plug in is very useful and easy to use. but I have problem with it after I change my theme and I can not solve the problem. The them I use know RT-Theme 11 1.0 from theme forest the problem is when clicking the add to cart button the theme responses its 404 not found page. And when I go back to the page and refresh it I see the product I desire is added to the cart. the other problem is that when I try to remove the product from cart I found myself at the home page of my site.


    I solved the problem

    $products variable is used in the theme for its own purpose and I replaced them with $wp_shopping_cart_products and my problem resolved

    Not sure if this could be relevant at all but I went through and tried disabling all other plugins etc but didn’t have any luck. It doesn’t appear that there is a predefined custom post field in the theme for $product to replace either.

    Thanks again :)

    Cheers,

    January 14, 2011 at 5:43 am #27882
    amin007
    Participant

    Just out of curiosity… can you please do the theme switching test explained here and let me know if that makes any difference?

    https://support.tipsandtricks-hq.com/forums/topic/test-to-identy-a-conflicting-theme-or-plugin

    January 15, 2011 at 9:35 pm #27883
    raistlin
    Member

    Hello again!

    The theme is definitely the culprit here for this project. Went through the motions of cleaning it up a bit but unfortunately didn’t have any luck. :/

    In lieu of your previous comment though, I went ahead and enabled the redirect upon adding to cart option (which had worked), and set the URL set to “#”. Kind of an unorthodox fix, but it should do the trick. The only issue that remained was receiving the 404 error upon removing an individual product. I noticed that the “Clear All” button seemed to behave appropriately with this runaway theme even though the individual remove did not.

    I just added display prop to the following in the eStore CSS:

    .eStore_remove_item_button{

    width:20px;

    height:20px;

    display:none;

    }

    This should work out for the time being until I can figure out a way to have the individual remove button achieve the same effect.

    Thanks again for an amazing product!

    Cheers,

    February 6, 2012 at 9:54 am #27884
    Zain
    Participant

    Hi,

    Just a quick message to say “Thank You” to raistlin for this thread!

    I was experiencing exactly the same problem on a client’s site. Trying to use the WP eStore plugin and a theme that had a default cart built in was definitely causing a 404 error when trying to update the shopping cart. (The theme was Kid’s Toys from Theme Forest, if you’re wondering!)

    Disabling the theme’s default cart (i.e. removing the files and all functions references) does fix the problem.

    As raistlin notes:

    Quote:
    $products variable is used in the theme for its own purpose and I replaced them with $wp_shopping_cart_products and my problem resolved.

    Question: Would it be possible to change the $product variable in the plugin to be unique (and so resolve any future conflicts)?

    Cheers,

    Zain

    February 6, 2012 at 10:35 am #27885
    admin
    Keymaster

    We don’t have a global $product variable. I am not sure what that theme is trying to do but a product should not be accessed via this $product variable.

    February 6, 2012 at 6:36 pm #27886
    Zain
    Participant

    Good answer. ;) I’m not sure either, although something was really messing up the eStore plugin. I managed to fix it(i.e. hack the living daylights out of the theme)… I’m just glad for raistlin’s observations! Phew. :D

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 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