====== Cart Appears Empty After Adding An Item & Visiting A New Page ====== ==== Symptoms ==== * Cart icon shows up as empty after adding an item and navigating to another page. ==== Cause ==== Header toplinks are not being properly hole punched. This can be verified by following our [[litespeed_wiki:cache:litemage:troubleshooting:checking-hole-punching|How to check if ESI block holes are being properly punched]] page. ==== Solution ==== Checking the config - design from Magento Admin, it uses default theme_revamp. In header.phtml we see the following:
getLayout()->createBlock('cms/block')->setBlockId('header_sticky_block')->toHtml(); ?>
Create a new template ''toprow.phtml'' in ''/home/user1/public_html/app/design/frontend/default/theme_revamp/template/page/html'' with the following content:
helper('customer')->isLoggedIn()) { echo $this->getLayout()->createBlock('cms/block')->setBlockId('header_sticky_block')->toHtml(); } ?>
Now update the releated part of header.phtml: 32
33
34 getChildHtml('toprow'); ?> 35
36
In the layout file, add the new block inside the header section: [/home/user1/public_html/app/design/frontend/default/theme_revamp/layout]# vi page.xml Finally, in the LiteMage configuration, change the following: * In the configuration, add “toprow” in Customized Block Names for “toplinks” Tag * Flush Product and Categories When Product Qty Changes => "Flush product and categories only when stock status change" * Separate cache copy per customer group => Yes * Track recently Viewed => No Flush both LiteMage and Magento caches.