PHOENIX-MEDIA / Magento-PageCache-powered-by-Varnish

Community version which is available on Magento Connect (http://www.magentocommerce.com/magento-connect/pagecache-powered-by-varnish.html)
89 stars 49 forks source link

Problems with Add to cart #58

Open xavitriu opened 7 years ago

xavitriu commented 7 years ago

As other users happen to them, sometimes we can't add products to the shopping cart. It goes to an "empty cart".

We have instrumented the addAction method in CartController like this:

public function addAction() { Mage::log('AddAction: 1a Start: '.$this->getRequest()->getParam('form_key', 'null').";"); Mage::log('AddAction: 1b Start: '.Mage::getSingleton('core/session')->getFormKey().";");

And we observe that when we have this module enabled the logs we obtain is:

2016-11-21T13:40:03+00:00 DEBUG (7): AddAction: 1a Start: gELlVR6h6R9z1bQ1; 2016-11-21T13:40:03+00:00 DEBUG (7): AddAction: 1b Start: qKENHGY5iJRrkuYB;

2016-11-21T13:40:16+00:00 DEBUG (7): AddAction: 1a Start: Xs3xRkkwnVxd8P3n; 2016-11-21T13:40:16+00:00 DEBUG (7): AddAction: 1b Start: qKENHGY5iJRrkuYB;

2016-11-21T13:40:47+00:00 DEBUG (7): AddAction: 1a Start: gELlVR6h6R9z1bQ1; 2016-11-21T13:40:47+00:00 DEBUG (7): AddAction: 1b Start: qKENHGY5iJRrkuYB;

We observe that the formkey provided by the magento session is the same in every interaction. If we disable your module, we get the following pairs of logs:

2016-11-21T13:45:49+00:00 DEBUG (7): AddAction: 1a Start: Ajm7MVeSUyZgDQE3; 2016-11-21T13:45:49+00:00 DEBUG (7): AddAction: 1b Start: Ajm7MVeSUyZgDQE3;

2016-11-21T13:46:15+00:00 DEBUG (7): AddAction: 1a Start: 3M0PmMXVa8GG8dTw; 2016-11-21T13:46:15+00:00 DEBUG (7): AddAction: 1b Start: 3M0PmMXVa8GG8dTw;

2016-11-21T14:13:59+00:00 DEBUG (7): AddAction: 1a Start: 2VARZ8HVq3M4mjiV; 2016-11-21T14:13:59+00:00 DEBUG (7): AddAction: 1b Start: 2VARZ8HVq3M4mjiV;

All of them were correct additions to the cart.

We observed too that the PAGECACHE_FORMKEY cookie is present in every interaction, including the ones with the disabled module.

The PAGECACHE_FORMKEY is emited ever, including the extension disabled?

Thanks in advanced for you help. It hope that helps.