I've been struggling with this issue for a few hours now and thought to see if anyone else has any ideas on why it could be happening.

When I try to add a product to the cart, I get a 404 error with POST {URL}/addtocart/index/add/uenc/aHR0cHM6Ly93d3cuc2dzZGV2LmNvLnVrL2luZGV4LnBocC9lYzIwMDAtMi10b24tZm9sZGluZy1lbmdpbmUtY3JhbmU,/product/2495/form_key/7r9A9LoJ4Hbzbuwr/ 404 (Not Found)

I've tried the cookie fix (change cookie lifetime to 86400) but this hasn't resolved it. I've also tried various browsers, the product adds to cart on the category page perfectly however it gives me that error on the product page. I've also checked my templates for <?php echo $this->getBlockHtml('formkey'); ?> and can confirm it's present on both the cart page and the view.phtml template.

Any help is much appreciated!


as per magento default add to cart url is yourdomain.com/checkout/cart/add/uenc/aHR0cDovL21hZ2VudG8tZGVtby5sZXhpY29ubi5jb20vaG9tZS1kZWNvci9iZWQtYmF0aC9jYXJuZWdpZS1hbHBhY2EtdGhyb3cuaHRtbD9fX19TSUQ9VQ,,/product/383/form_key/ff89b79a59dc5da7/

are you using any module or something for add to cart? if yes then disable it and check it.

  • I was using an Ajax Cart module which I've disabled and retested, I get the same 404 when I try to add a product to the cart from the product page. – Jazz Singh Jun 17 at 7:43
  • check with default theme may be some customization into theme – Sunil Patel Jun 17 at 7:47

Check if your block containing the formkey is not cached. You can remove a particular block cache by using below code :

<reference name="needed block">
    <action method="setCacheLifetime" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.