5

I have a magento website that is using Belvg Gifts extension but when the extension is active ite redirects to cart page when you are filling information on the onepage checkout step.

I check the errors using firebug console I get the following

POST http://www.floridawinestore.com/checkout/onepage/saveMethod/ 403 (Session Expired)  prototype.js:1530

I conctacted the developer of the extension but said it works well but even when I install it using default Magento template it does not work. I have also tested with sevaral other templates but the same thing.

Here is the extension

http://www.floridawinestore.com/Belvg_Gifts-v.1.0.0.zip

If someone can help solve fix this extension I'll greatly appreciate

Thanks

Stifboy
  • 415
  • 5
  • 18

2 Answers2

3

I had the same problem, manage to make it work like this:
Go to app/code/core/Mage/Checkout/controllers/OnepageController.php

Somewhere around line 76 you will find: protected function _expireAjax()

Comment this lines:

$action = $this->getRequest()->getActionName();
if (Mage::getSingleton('checkout/session')->getCartWasUpdated(true)
&& !in_array($action, array('index', 'progress'))) {
$this->_ajaxRedirectResponse();
return true;
}

Hope this will help you,

Regards!

Marius
  • 197,939
  • 53
  • 422
  • 830
Raul
  • 54
  • 1
  • 1
    Recommending modification of a core Magento file is strongly in conflict with best practices. – parhamr Nov 18 '15 at 23:12
  • I created custom OnepageController.php that extends this, then copied this function without the lines above. – djames May 26 '17 at 19:17
0

I had the same issue and the solution was to check in

System > Configuration > Sales > Checkout > Shopping Cart

and make sure that After Adding a Product Redirect to Shopping Cart is set to "No".

Apparently this redirects the user to the cart for some reason that I could not figure out.

My Network log in Chrome was saying that once the user tried to create an account the system was trying to save the address before the user wrote anything else and the redirect was triggered at JS level and not in PHP as @Raul suggested above.

Dharmik Ponda
  • 173
  • 4
  • 13
Mike
  • 323
  • 3
  • 13