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

Login button in de side menu.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-18-2005, 10:51 AM
 
WPOO WPOO is offline
 

Advanced Member
  
Join Date: May 2004
Location: Delft - Netherlands -
Posts: 31
 

Default Login button in de side menu.

I have buttons for nearly all the text_buttons on my site and would also like to do this for the login button but i just cannont get it to work.

I have the following code for my buttons/login_menu.tpl

Code:
{if $style eq "button"}{include file="buttons/button.tpl" button_title=$lng.lbl_log_in href=$href}{else}<FONT class="{if $usertype eq "C"}FormButton{else}VertMenuItems{/if}">{$lng.lbl_log_in}</FONT><INPUT type="image" { include file="buttons/go_image_menu.tpl" }>{/if}

my code for /buttons/create_profile_menu.tpl

Code:
{if $usertype eq "C"}{include file="buttons/button.tpl" button_title=$lng.lbl_register href=register.php}{else}<FONT class="VertMenuItems">{$lng.lbl_register} </FONT><IMG { include file="buttons/go_image_menu.tpl" }>{/if}

and this one works can anyone help me with te login button.


Thanks WP
__________________
X-Cart Gold 4.13
X-Configurator
X-ROM
Easy Checkout
Reply With Quote
  #2  
Old 08-18-2005, 11:40 AM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default

Change this in your login_menu.tpl
Code:
{if $style eq "button"}{include file="buttons/button.tpl" button_title=$lng.lbl_log_in href=$href}{else}<FONT class="{if $usertype eq "C"}FormButton{else}VertMenuItems{/if}">{$lng.lbl_log_in}</FONT><INPUT type="image" { include file="buttons/go_image_menu.tpl" }>{/if}
to this:

Code:
{if $style eq "button"}{*{include file="buttons/button.tpl" button_title=$lng.lbl_log_in href=$href}*}[img]pathtoimage.gif[/img]{else}{*<FONT class="{if $usertype eq "C"}FormButton{else}VertMenuItems{/if}">{$lng.lbl_log_in}</FONT><INPUT type="image" { include file="buttons/go_image_menu.tpl" }>*}[img]pathtoimage.gif[/img]{/if}

Cheers mate
__________________
Instinctual
8,000 feet up in the Rocky Mountains of Colorado
X-Cart Versions 3.5.x - 4.0.x

IF you xcart, THEN you prosper, ELSE you fail. ELSEIF xcart fails, THEN you fix it, all the WHILE {loop}\'ing {section}\'s to feed your $smarty mind.
Reply With Quote
  #3  
Old 08-18-2005, 09:35 PM
 
WPOO WPOO is offline
 

Advanced Member
  
Join Date: May 2004
Location: Delft - Netherlands -
Posts: 31
 

Default instinctual does not solve the problem

Insinctual,

this does not slove my problem. I have buttons made up of three parts like every button. I don't have one loging button. When using your code I dont log in. I just go to the home page.

Here is my auth.tpl arround the login button

Code:
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> {if $config.General.use_https_login eq "Y"} {assign var="form_url" value=$https_location} {else} {assign var="form_url" value=$current_location} {/if} <FORM action="{$form_url}/include/login.php" method="post" name="authform"> <INPUT type="hidden" name="{$XCARTSESSNAME}" value="{$XCARTSESSID}"> {if $config.General.use_secure_login_page eq "Y"} {* use_secure_login_page *} <TR> <TD> {assign var="slogin_url_add" value=""} {if $usertype eq "C"} {assign var="slogin_url" value=$catalogs_secure.customer} {if $catalogs_secure.customer ne $catalogs.customer} {assign var="slogin_url_add" value="?`$XCARTSESSNAME`=`$XCARTSESSID`"} {/if} {elseif $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"} {assign var="slogin_url" value=$catalogs_secure.admin} {elseif $usertype eq "P"} {assign var="slogin_url" value=$catalogs_secure.provider} {elseif $usertype eq "B"} {assign var="slogin_url" value=$catalogs_secure.partner} {/if} {include file="buttons/secure_login.tpl"} </TD> </TR> {else} {* use_secure_login_page *} <TR> <TD class="VertMenuItems"> <FONT class="VertMenuItems">{$lng.lbl_username}</FONT> <INPUT type="text" name="username" size="16" value="{#default_login#}"> <FONT class="VertMenuItems">{$lng.lbl_password}</FONT> <INPUT type="password" name="password" size="16" value="{#default_password#}"> <INPUT type="hidden" name="mode" value="login"> {if $active_modules.Simple_Mode ne "" and $usertype ne "C" and $usertype ne "B"} <INPUT type="hidden" name="usertype" value="P"> {else} <INPUT type="hidden" name="usertype" value="{$usertype}"> {/if} <INPUT type="hidden" name="redirect" value="{$redirect}"> </TD></TR> <TR> <TD height="24" class="VertMenuItems"> {if $js_enabled} {include file="buttons/login_menu.tpl" style="button"} {else} {include file="buttons/login_menu.tpl"} {/if} </TD> </TR> {/if} {* use_secure_login_page *} {if $usertype eq "C" or ($usertype eq "B" and $config.XAffiliate.partner_register eq "Y")} <TR> <TD height="24" nowrap class="VertMenuItems"> {include file="buttons/create_profile_menu.tpl" style="button"} </TD> </TR> {/if} {if $login eq ""} <TR> <TD height="24" nowrap class="VertMenuItems"> {include file="buttons/password.tpl" style="button"} </TD> </TR> {/if} {if $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"} <TR> <TD class="VertMenuItems"> <DIV align="left">{$lng.lbl_insecure_login} </DIV> </TD> </TR> {/if} {if $usertype eq "C"} <TR> <TD class="VertMenuItems" align="right"> {if $js_enabled} {$lng.txt_javascript_disabled} {else} {$lng.txt_javascript_enabled} {/if} </TD> </TR> {/if} </FORM>


Thanks for your help in advance.

WP
__________________
X-Cart Gold 4.13
X-Configurator
X-ROM
Easy Checkout
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:19 AM.

   

 
X-Cart forums © 2001-2020