This is an old revision of the document!


Logged In Usernames/Cart Items Shown On Other User's Pages

Symptoms

  • Logged in Usernames/Cart Items being shown on other user's pages. (seen in Ultimo Theme, Meigee Harbour Theme)
  • Shopping cart item count wrong.

Cause

The block containing username/shopping cart is not being hole-punched properly, and causes private information to be publicly cached and displayed on public pages or other users' pages.

To confirm that this is the problem, you can enable debug mode and append ?LITEMAGE_DEBUG=SHOWHOLES to the end of your site URL. This will show all holes being punched on the page, where you can check if the block containing the username or cart items is being punched properly.

Solution

The simplest solution to this problem is to go to the Magento Admin Panel and navigate to System → Configuration → LiteMage Configuration and add header to Customized Block Names for “toplinks” Tag. This will punch one big hole for the entire header block.

Alternate Solution

A more complicated solution involves looking carefully at your template file for customized code, such as:

<?php if($toplinks['displayas'] == 1){echo '<span class="simple">';}
if (Mage::getSingleton('customer/session')->isLoggedIn()==1):
echo '<span class="customer-name"><strong>' . $customer->getCustomer()->getName() . '</strong></
span>';
endif;

Since LiteMage can only punch a hole on a block defined through a layout file, the dynamically generated content here will not be recognized. You can, however, create a new block containing this logic and define that block in the layout file with a unique name. Once you have done this you can then add this new block name to the Customized Block Names for “toplinks” Tag list.

  • Admin
  • Last modified: 2017/05/08 21:09
  • by Lisa Clarke