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

How to move language

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-25-2003, 04:16 PM
 
tpfair tpfair is offline
 

Advanced Member
  
Join Date: May 2003
Posts: 81
 

Default How to move language

Hello


I need to move the plaguage drop down box to the bottom of the page and also make it appear on every page.


I have try to move it but the entire header is disapearing...


Any help would be gladdly appreciate.


X-Cart Gold 3.4.3

Stefan
Reply With Quote
  #2  
Old 07-26-2003, 06:02 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

this is for v3.4.3 but a similar thing will work in any version

in head.tpl remove

Code:
{if $main eq "catalog" and $current_category.category eq "" and $all_languages_numba gt 1} <FORM action="home.php" method=GET name=sl_form> <SELECT name=sl onChange="javascript: document.sl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </FORM> {elseif ($usertype eq "P" or $usertype eq "A") and $login} <table border=0 cellpadding=0 cellspacing=0> <FORM action="{$smarty.server.REQUEST_URI}" method=POST name=asl_form> <tr> <td>Current language:</td> <td> <INPUT type=hidden name="redirect" value="{$smarty.server.QUERY_STRING}"> <SELECT name=asl onChange="javascript: document.asl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $current_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </td></tr> </FORM> </table> {else} {/if}

so that it looks more like

Code:
{* $Id: head.tpl,v 1.28 2003/04/24 09:50:33 svowl Exp $ *} <TABLE align=center border=0 cellPadding=0 cellSpacing=0 class=HeadBox width=100%> <TR> <TD valign="top" width="284">[img]{$ImagesDir}/logo.gif[/img]</TD> <TD background="{$ImagesDir}/top1.gif" align=right valign=middle> </TD> </TR> <TR> <TD> {if $usertype eq "C"} { include file="customer/search.tpl" } {else} {/if} </TD> <TD width=99% valign=top class=HeadBox background="{$ImagesDir}/top2.gif" style="background-repeat: repeat-x"> <P align=right><SPAN class=NumberOfArticles>{insert name="productsonline"} {$lng.lbl_products} {if $config.Appearance.show_in_stock eq "Y"}{$lng.lbl_and} {insert name="itemsonline"} {$lng.lbl_items} {/if}{$lng.lbl_online}</SPAN></P> </TD> </TR> </TABLE>

then make a new file caled language.tpl and put this in it

Code:
{* $Id: languages.tpl,v 1.28 *} {if $all_languages_numba gt 1} <FORM action="home.php" method=GET name=sl_form> <SELECT name=sl onChange="javascript: document.sl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </FORM> {elseif ($usertype eq "P" or $usertype eq "A") and $login} <table border=0 cellpadding=0 cellspacing=0> <FORM action="{$smarty.server.REQUEST_URI}" method=POST name=asl_form> <tr> <td>Current language:</td> <td> <INPUT type=hidden name="redirect" value="{$smarty.server.QUERY_STRING}"> <SELECT name=asl onChange="javascript: document.asl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $current_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </td></tr> </FORM> </table> {else} {/if}

then in home.tpl add this where you want it to appear

Code:
{ include file="language.tpl" }
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 07-26-2003, 06:52 AM
 
tpfair tpfair is offline
 

Advanced Member
  
Join Date: May 2003
Posts: 81
 

Default Wow !!!

Thank you so much, it works !!!! Finally.



Little question, how do i remove or where i remove the extra space under language. take a look at www.thepleasurefair.com Warning 18+



Regards


Stefan
[/url]
Reply With Quote
  #4  
Old 07-26-2003, 07:05 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

edit the code i gave you

change this bit

Code:
<FORM action="home.php" method=GET name=sl_form> <SELECT name=sl onChange="javascript: document.sl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </FORM>

to


Code:
<table> <tr> <FORM action="home.php" method=GET name=sl_form> <td> <SELECT name=sl onChange="javascript: document.sl_form.submit()"> {section name=ai loop=$all_languages} <OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION> {/section} </SELECT> </td> </FORM> </tr> </table>

basically tuck the form tags inside the table row tags otherwise it gives the balnk space as you mentioned
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 07-26-2003, 07:40 AM
 
tpfair tpfair is offline
 

Advanced Member
  
Join Date: May 2003
Posts: 81
 

Default Great

Great, i was playing with this for hours,


If you take a last look at our site we have a hard time to move the search box in the middle. Any clue why.


Stefan
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 05:27 PM.

   

 
X-Cart forums © 2001-2020