Magento – I installed Full Page Cache and now after I click on “Add to Cart” – it says: There are 0 items in your cart

full-page-cachemagento-1.9

Magento 1.9.1
Full Page Cache program from Amasty

Our website was often extremely slow so I installed a Full Page program from Amasty and now sometimes (like right now) when I go through the order process – after I click on the "Add to cart" button – it says:

Product XYZ was added to your shopping cart.

And right below that it says:

There are 0 items in your cart.
Grand Total $0.00
Subtotal    $0.00

I think it's a reason why we are getting only about 10% of the orders we used to get. Any ideas on how to fix this?

*After I deleted all Cache and tried to add 1 item into the cart – it says:

There are 4 items in your cart.

Meaning those are the 3 I tried to add before plus the one I added now.


ADDED ON JUNE 29TH, 2017:

As per the suggestion of Raj Purswani and the following link forwarded to me from Amasty:

https://amasty.com/docs/doku.php?id=magento_1:full_page_cache#how_to_hole_punch_cart_welcome_blocks

I did what it says in the manual for "How to hole punch cart/welcome blocks" and added the following list into the amfpc.xml file:

<google_analytics cart="1" />
<welcome cart="1" />
<top.links cart="1" />
<wishlist_link cart="1" />
<root cart="1" />
<head cart="1" />
<js_cookies cart="1" />
<optional_zip_countries cart="1" />
<addthis_smartlayers cart="1" />
<shopgate.framework.mobile cart="1" />
<fullajax_js cart="1" />
<sticky_header cart="1" />
<head.child7 cart="1" />
<home_slider cart="1" />
<global_notices cart="1" />
<custom_notice cart="1" />
<header cart="1" />
<store_currency cart="1" />
<store_language cart="1" />
<compare_link cart="1" />
<top.search cart="1" />
<top.search.content cart="1" />
<ANONYMOUS_76 cart="1" />
<minicart cart="1" />
<catalog.topnav cart="1" />
<topnav.sidemenu cart="1" />
<topnav.sidemobilemenu cart="1" />
<sidemenu cart="1" />
<mobile.nav cart="1" />
<bml.center.logo cart="1" />
<home_slider cart="1" />
<ANONYMOUS_77 cart="1" />
<global_messages cart="1" />
<ajaxcart_mask cart="1" />
<page_content_heading cart="1" />
<messages cart="1" />
<ANONYMOUS_78 cart="1" />
<cart_sidebar cart="1" />
<catalog.compare.sidebar cart="1" />
<right.reports.product.viewed cart="1" />
<global_cookie_notice cart="1" />
<sale.reorder.sidebar cart="1" />

Does that suppose to exclude those elements? I haven't been able to verify whether that made any difference because right after the change – the problem was the same so I had to delete all Cache from within the Admin panel. And every time I did that in the past – the problem just went away.

I also started to have another problem and that is when customers tried to add a product to the shopping cart – it would add a completely different product! (I guess this is what simonthesorcerer says below) Any suggestions on how to fix that?

Best Answer

You need to exclude below things from caching:

  1. header
  2. top.links
  3. cart_sidebar
  4. catalog.compare.sidebar
  5. right.reports.product.viewed
  6. messages and global_messages
  7. global_cookie_notice
  8. sale.reorder.sidebar

Thanks

Related Topic