View Single Post
  #1  
Old 07-24-2013, 03:20 PM
  drheath's Avatar 
drheath drheath is offline
 

Advanced Member
  
Join Date: Nov 2010
Location: Wisconsin
Posts: 53
 

Default Login Popup Message

Our web manager wanted to display a message in the pop-up login box in our 4.5.x installation. It sounded simple enough, but I ran into enough problems and mental blocks that I thought I would post my solution if it saves someone else a few minutes or in case I need to remember it for another site in the future

The issue was that when I inserted a language variable into login_form.tpl it displayed correctly on /login.php which our non-x-cart sites point to, but broke the login pop-up CSS when a visitor clicked the sign-in link from within x-cart. While I could have just changed how the js displayed, I preferred to keep my edits to a minimum.

My evasive solution was a simple If statement and called on different variables based on if it was a pop-up or not. I added the following code around line 11:
Code:
{if not $is_modal_popup} <tr> {$lng.lbl_login_message} </tr> {/if} {if $is_modal_popup} <tr> {$lng.lbl_login_message_popup} </tr> {/if}

Works like a dream, I just wish I had thought of it sooner.
__________________
Business Edition 5.2.10
Gold Plus 4.6.1
Reply With Quote