Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cache:litemage:troubleshooting:logged-in-out-with-missing-banner [2017/05/05 18:55]
Lisa Clarke [Issue 2: Punching A Bigger Hole While Still Purging Private Sections]
litespeed_wiki:cache:litemage:troubleshooting:logged-in-out-with-missing-banner [2017/05/05 19:10] (current)
Lisa Clarke [A LiteMage Troubleshooting Showcase]
Line 1: Line 1:
 ====== A LiteMage Troubleshooting Showcase ====== ====== A LiteMage Troubleshooting Showcase ======
  
-In this troubleshooting showcase, we will be looking at a case where a Magento site was having logged in/out issues, comparison issues, and disappearing banner issues ​as well as the troubleshooting processes and recommended solutions to fix them. +In this troubleshooting showcase, we will be looking at a case where a Magento site was having logged in/out issues, comparison issues, and disappearing banner issues. We will go over the troubleshooting processes and recommended solutions to fix them. 
  
 It is assumed that you are already familiar with Magento Layouts, blocks, and templates as well as how to make proper changes to them. You can find out more from the [[http://​devdocs.magento.com/​guides/​m1x/​magefordev/​mage-for-dev-4.html|Magento 1.x Developer Reference]]. It is assumed that you are already familiar with Magento Layouts, blocks, and templates as well as how to make proper changes to them. You can find out more from the [[http://​devdocs.magento.com/​guides/​m1x/​magefordev/​mage-for-dev-4.html|Magento 1.x Developer Reference]].
Line 17: Line 17:
 With this particular template, some global PHP variables initialized in header.phtml and social.phtml were not available in these small chunks. The two template files needed to be updated to initialize them:  With this particular template, some global PHP variables initialized in header.phtml and social.phtml were not available in these small chunks. The two template files needed to be updated to initialize them: 
  
-**/​home/​user1/​public_html/​domain1.com/​app/​design/​frontend/​sm_market/​default/​template]#​** ''​vi page/​html/​header.phtml''​ +**[app/​design/​frontend/​sm_market/​default/​template]#​** ''​vi page/​html/​header.phtml''​\\ 
-**/​home/​user1/​public_html/​domain1.com/​app/​design/​frontend/​sm_market/​default/​template]#​** ''​vi page/​html/​social.phtml''​+**[app/​design/​frontend/​sm_market/​default/​template]#​** ''​vi page/​html/​social.phtml''​
    
 The following was added to the top of the two template files: The following was added to the top of the two template files:
Line 46: Line 46:
 ==== Issue 3: The Case of The Disappearing Banner ==== ==== Issue 3: The Case of The Disappearing Banner ====
  
-At this point we have fixed the logged in/out issue. Great! Except now the banner ​has disappeared from the homepage.+Upon fixing ​the logged in/out issue, we discovered ​the banner ​had disappeared from the homepage!
  
-After some further investigation,​ we find that the header template ​included ​logic to check if it is displaying on a frontend page or not. If it is not a frontend page, then the banner will not display. This stops us from simply punching a big hole for the header, like we did earlier.+The header template ​includes ​logic to check if it is displaying on a frontend page or not. If it is not a frontend page, then the banner will not display. This stopped ​us from simply punching a big hole for the header, like we did earlier.
  
-We now need to go back and "​fix"​ the login links.+We needed ​to go back and "​fix"​ the login links.
  
-After making a copy of ''​header4.phtml''​, the header style file, we open it to begin modifying. ​+After making a copy of header4.phtml,​ the header style file, we opened ​it to begin modifying. ​
  
-<​code>​ +**[app/​design/​frontend/​sm_market/​default/​template/​page/​html]** ''​vi header4.phtml''​
-[app/​design/​frontend/​sm_market/​default/​template/​page/​html]vi header4.phtml +
-</​code>​+
  
-Inside we can see the "log in" link mixed into the header template. That logic needs to be taken out and put in its own block/​template so we can both hole punch it as a private block AND keep the rest of the header publicly cached.+Inside we could see the "log in" link mixed into the header template. That logic needed ​to be taken out and put in its own block/​template so we could both hole punch it as a private block AND keep the rest of the header publicly cached.
  
 <​code>​ <​code>​
Line 107: Line 105:
 </​code>​ </​code>​
  
-We copy the code inside ''<​div class="​login-regis">''​ and move it int our new welcomelogin.phtml file.+We copied ​the code inside ''<​div class="​login-regis">''​ and moved it into our new welcomelogin.phtml file.
  
-<​code>​ +**[app/​design/​frontend/​sm_market/​default/​template/​page/​html]#​** ''​vi welcomelogin.phtml''​
-[app/​design/​frontend/​sm_market/​default/​template/​page/​html]#​ vi welcomelogin.phtml+
  
 +<​code>​
 <?php if(!$this->​helper('​customer'​)->​isLoggedIn() ){ ?> <?php if(!$this->​helper('​customer'​)->​isLoggedIn() ){ ?>
 <a title="<?​php echo $this->​__("​Login"​);​ ?>" class="​btn-head"​ href="<?​php echo $this- <a title="<?​php echo $this->​__("​Login"​);​ ?>" class="​btn-head"​ href="<?​php echo $this-
Line 133: Line 131:
 </​code>​ </​code>​
  
-We now add our new “welcomelogin” block in the header block...+We then added our new “welcomelogin” block to the header block...
  
-<​code>​ +**[app/​design/​frontend/​sm_market/​default/​layout]#​** ''​vi page.xml''​
-[app/​design/​frontend/​sm_market/​default/​layout]#​ vi page.xml+
  
 +<​code>​
 <block type="​page/​html_header"​ name="​header"​ as="​header">​ <block type="​page/​html_header"​ name="​header"​ as="​header">​
 …. ….
Line 144: Line 142:
 </​code>​ </​code>​
  
-...and ​update ​the header4.phtml file to reference the new "​welcomelogin"​ block where the "log in" logic used to be:+...and ​updated ​the header4.phtml file to reference the new "​welcomelogin"​ block where the "log in" logic used to be:
  
 <​code>​ <​code>​
Line 175: Line 173:
 </​code>​ </​code>​
  
-Finally we go back to our LiteMage Configuration in the Magento Admin Panel and add “welcomelogin” to **Customized Block Names for "​welcome"​ Tag**.+Finally we went back to our LiteMage Configuration in the Magento Admin Panel and added ''​welcomelogin'' ​to **Customized Block Names for "​welcome"​ Tag**.
  
 Voila! The banner is back and LiteMage is operating at 100%. Voila! The banner is back and LiteMage is operating at 100%.
  • Admin
  • Last modified: 2017/05/05 18:55
  • by Lisa Clarke