Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Login Popup Message

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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

The following 2 users thank drheath for this useful post:
philrisk (07-25-2013), tartaglia (07-25-2013)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:54 AM.

   

 
X-Cart forums © 2001-2020