X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to move language (https://forum.x-cart.com/showthread.php?t=3737)

tpfair 07-25-2003 04:16 PM

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

shan 07-26-2003 06:02 AM

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" }

tpfair 07-26-2003 06:52 AM

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]

shan 07-26-2003 07:05 AM

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

tpfair 07-26-2003 07:40 AM

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


All times are GMT -8. The time now is 02:37 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.