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)
-   -   custome text button link to another page (https://forum.x-cart.com/showthread.php?t=15759)

mmoskva 08-08-2005 08:06 AM

custome text button link to another page
 
I am trying to create a text button link that will direct the user to another page.

I try entering this code into my head.tpl below the customer/top_menu.tpl tag but I keep gettin a smarty error and nothing loads. Don't understand?

code:
<TD valign="top" align="right">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{ {$lng.lbl_Login}}
</TD>

Thanks for the help.

balinor 08-08-2005 08:08 AM

You don't need brackets around non-smarty stuff. Replace this:

{ {$lng.lbl_Login}}

with this:

{$lng.lbl_Login}

mmoskva 08-08-2005 08:15 AM

I did that and got no error. Thanks

But now I can't see the "Login" button by the phone numbers at the top of the page?

Dongan 08-08-2005 08:21 AM

Re: custome text button link to another page
 
Quote:

Originally Posted by mmoskva
I am trying to create a text button link that will direct the user to another page.

I try entering this code into my head.tpl below the customer/top_menu.tpl tag but I keep gettin a smarty error and nothing loads. Don't understand?

code:
<TD valign="top" align="right">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{ {$lng.lbl_Login}}
</TD>

Thanks for the help.


Here is the correct code..
Code:

<TD valign="top" align="right">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{$lng.lbl_Login}
</TD>


Balinor is right and he suggested to remove only the braces. He did't suggest to replace the complete code with he has provided.

mmoskva 08-08-2005 08:31 AM

Thanks for getting back with me.

This is the home.tpl file that I integrated your suggestions into and a link to my site so you can view my problem. I cannot see any "Login" txt button at the top of the page? Their is an authentiation menu but their is a seperate page created for the Login and Registery.

http://www.michaelmoskva.com/xcart/home.php

Thanks for you help

Code:
{* $Id: head.tpl,v 1.40.2.3 2004/11/19 06:40:15 max Exp $ *}
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD width="27"></TD>
<TD>[img]{$ImagesDir}/xlogo.gif[/img]</TD>
<TD valign="top" align="right">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{$lng.lbl_Login}
</TD>
</TR>
</TABLE>
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD colspan="2" class="VertMenuBorder">[img]{$ImagesDir}/spacer.gif[/img]</TD>
</TR>
<TR>
<TD class="HeadLine" height="22">
{if $usertype eq "C"}
{ include file="customer/search.tpl" }
{/if}
</TD>
<TD class="HeadLine" align="right">
{if ($usertype eq "C" || $usertype eq "B")and $all_languages_cnt gt 1}
<TABLE border="0" cellpadding="0" cellspacing="0">
<FORM action="home.php" method="GET" name="sl_form">
<INPUT type="hidden" name="redirect" value="{$smarty.server.PHP_SELF}?{$smarty.server.Q UERY_STRING}">
<TR>
<TD>
{$lng.lbl_select_language}:
<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></TR>
</FORM>
</TABLE>
{else}

{/if}
</TD>
</TR>
<TR>
<TD colspan="2" class="VertMenuBorder">[img]{$ImagesDir}/spacer.gif[/img]</TD>
</TR>
{******** Remove this line to display how much products there are online ****
<TR>
<TD colspan="2" class="NumberOfArticles" align="right">{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}</TD>
</TR>
**** Remove this line to display how much products there are online ********}
<TR>
<TD colspan="2" valign="middle" height="32">
<TABLE cellspacing="0" cellpadding="0" border="0" width="100%" height="18">
<TR>
<TD>[img]{$ImagesDir}/spacer.gif[/img]</TD>
{if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'}
<TD width="100%" valign="middle" align="right">{include file="printable.tpl"}</TD>
<TD>[img]{$ImagesDir}/spacer.gif[/img]</TD>
{/if}
</TR>
</TABLE>
</TD>
</TR>
</TABLE>

balinor 08-08-2005 08:34 AM

Might be case sensitive...try replacing this:

{$lng.lbl_Login}

with this:

{$lng.lbl_login}

mmoskva 08-08-2005 08:41 AM

Your awesome, thanks


All times are GMT -8. The time now is 07:16 AM.

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