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)
-   -   home.tpl error (https://forum.x-cart.com/showthread.php?t=42438)

ladybird 09-18-2008 05:43 AM

home.tpl error
 
Hi

I was just trying to add a favicon.ico to the head section of the home.tpl and now I am getting this error... www.makeuwell.com.au

Error: Smarty error: [in customer/home.tpl line 114]: syntax error: invalid attribute name: '

I have removed the offending script but the error has not gone away - what am I doing wrong? Pls can anyone help me and point me in the right direction?

Thanks
__________________:oops:
gold 4.1.9
gold 4.1.5

Ene 09-18-2008 05:53 AM

Re: home.tpl error
 
Please attach your 'customer/home.tpl' file.

balinor 09-18-2008 05:54 AM

Re: home.tpl error
 
Please be sure to read the guidelines on posting in the bugs forum, this is not a bug but a user error. What code are you trying to place? The correct format would be:

<link rel="shortcut icon" href="/favicon.ico">

Moving to template editing.

ladybird 09-18-2008 06:06 AM

Re: home.tpl error
 
Hi guys - yes thanks this one is definitely a PICNIC (problem in chair not in computer) I feel particularly stupid .

<link rel="shortcut icon" href="/favicon.ico">

that is the code I tried to add

Here is the home.tpl

{* $Id: home.tpl,v 1.88.2.7 2007/03/28 05:59:37 max Exp $ *}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<html>
<head>
<title>{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{if not %position.first%}{$location[position].0|escape}
{else}{$lng.txt_site_title}{/if}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{if not %position.first%}{$location[position].0|escape}
{else}{$lng.txt_site_title}{/if}
{if not %position.last%} :: {/if}
{/section}
{/if}</title>
{include file="meta.tpl" }
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}" />
</head>
<body{$reading_direction_tag}{if $body_onload ne ''} onload="javascript: {$body_onload}"{/if}>
{include file="rectangle_top.tpl" }
{include file="head.tpl" }
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/header.tpl"}
{/if}
<!-- main area -->
<table width="100%" cellpadding="0" cellspacing="0" class="MainTable">
<tr>
<td class="VertMenuLeftColumn">
<br />
{if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")}
{include file="customer/categories.tpl" }
<br />
{/if}
{if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu eq "Y"}
{include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{include file="customer/special.tpl"}
{include file="help.tpl" }
{if $active_modules.Survey && $menu_surveys}
{foreach from=$menu_surveys item=menu_survey}
{include file="modules/Survey/menu_survey.tpl"}
<br />
{/foreach}
{/if}
<img src="{$ImagesDir}/spacer.gif" width="160" height="1" alt="" />
</td>
<td width="100%" valign="top">
<!-- central space -->
<br />
{include file="dialog_message.tpl"}
{if $gcheckout_enabled and $main ne "cart" and $main ne "checkout" and $main ne "anonymous_checkout" and $main ne "order_message"}
<div align="right">{include file="modules/Google_Checkout/gcheckout_button.tpl"}</div>
{/if}
{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu eq "Y"}
{include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{if $active_modules.Special_Offers ne ""}
{include file="modules/Special_Offers/customer/new_offers_message.tpl"}
{/if}
{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu eq "Y"}
{include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{include file="customer/home_main.tpl"}
<!-- /central space -->
&nbsp;
</td>
<td class="VertMenuRightColumn">
{if $active_modules.SnS_connector && $config.SnS_connector.sns_display_button eq 'Y' && $sns_collector_path_url ne ''}
{include file="modules/SnS_connector/button.tpl"}
<br />
{/if}
{if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''}
{include file="modules/Feature_Comparison/product_list.tpl" }
{/if}
<br />
{include file="customer/menu_cart.tpl" }
<br />
{if $login eq "" }
{include file="auth.tpl" }
{else}
{include file="authbox.tpl" }
{/if}
{include file="news.tpl" }
{if $active_modules.XAffiliate ne ""}
<br />
{include file="partner/menu_affiliate.tpl" }
{/if}
{if $active_modules.Interneka ne ""}
<br />
{include file="modules/Interneka/menu_interneka.tpl" }
{/if}
<br />
{capture name=dialog}
{ include file="customer/main/navigation.tpl" }
<br />
<table cellspacing="5">
{foreach from=$manufacturers item=v}
<tr>
<td class="ManufacturersItem"><a href="manufacturers.php?manufacturerid={$v.manufac turerid}"><font class="ItemsList">{$v.manufacturer|escape}</font></a></td>
</tr>
{/foreach}
</table>
<br /><br />
{ include file="customer/main/navigation.tpl" }
{/capture}
{include file="dialog.tpl" title=$lng.TITLE_LNG_NAME content=$smarty.capture.dialog extra='width="100%"'}
{ include file="menu_border.tpl" dingbats="dingbats_categorie.gif"
<br />
{include file="poweredby.tpl" }
<br />
<img src="{$ImagesDir}/spacer.gif" width="160" height="1" alt="" />
</td>
</tr>
</table>
{include file="rectangle_bottom.tpl" }
{if $active_modules.Google_Analytics ne "" && $config.Google_Analytics.ganalytics_code ne ""}
{include file="modules/Google_Analytics/ga_code.tpl"}
{/if}
</body>
</html>
{/if}

Yurij 09-18-2008 06:51 AM

Re: home.tpl error
 
Quote:

Originally Posted by ladybird
...........


line 113:

{ include file="menu_border.tpl" dingbats="dingbats_categorie.gif"


need "}"

hhiker 09-18-2008 10:15 AM

Re: home.tpl error
 
Here is your page with the correction that Yurij made. I have included your favicon code and have it highlighted in red. :) If that does not make it work, replace /favicon.ico with the absolute url to the icon. Such as http://www.yoursitename.com/favicon.ico


Quote:

{* $Id: home.tpl,v 1.88.2.7 2007/03/28 05:59:37 max Exp $ *}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<html>
<head>
<title>{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{if not %position.first%}{$location[position].0|escape}
{else}{$lng.txt_site_title}{/if}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{if not %position.first%}{$location[position].0|escape}
{else}{$lng.txt_site_title}{/if}
{if not %position.last%} :: {/if}
{/section}
{/if}</title>
{include file="meta.tpl" }
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}" />
<link rel="shortcut icon" href="/favicon.ico">
</head>
<body{$reading_direction_tag}{if $body_onload ne ''} onload="javascript: {$body_onload}"{/if}>
{include file="rectangle_top.tpl" }
{include file="head.tpl" }
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/header.tpl"}
{/if}
<!-- main area -->
<table width="100%" cellpadding="0" cellspacing="0" class="MainTable">
<tr>
<td class="VertMenuLeftColumn">
<br />
{if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")}
{include file="customer/categories.tpl" }
<br />
{/if}
{if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu eq "Y"}
{include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{include file="customer/special.tpl"}
{include file="help.tpl" }
{if $active_modules.Survey && $menu_surveys}
{foreach from=$menu_surveys item=menu_survey}
{include file="modules/Survey/menu_survey.tpl"}
<br />
{/foreach}
{/if}
<img src="{$ImagesDir}/spacer.gif" width="160" height="1" alt="" />
</td>
<td width="100%" valign="top">
<!-- central space -->
<br />
{include file="dialog_message.tpl"}
{if $gcheckout_enabled and $main ne "cart" and $main ne "checkout" and $main ne "anonymous_checkout" and $main ne "order_message"}
<div align="right">{include file="modules/Google_Checkout/gcheckout_button.tpl"}</div>
{/if}
{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu eq "Y"}
{include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{if $active_modules.Special_Offers ne ""}
{include file="modules/Special_Offers/customer/new_offers_message.tpl"}
{/if}
{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu eq "Y"}
{include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{include file="customer/home_main.tpl"}
<!-- /central space -->
&nbsp;
</td>
<td class="VertMenuRightColumn">
{if $active_modules.SnS_connector && $config.SnS_connector.sns_display_button eq 'Y' && $sns_collector_path_url ne ''}
{include file="modules/SnS_connector/button.tpl"}
<br />
{/if}
{if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''}
{include file="modules/Feature_Comparison/product_list.tpl" }
{/if}
<br />
{include file="customer/menu_cart.tpl" }
<br />
{if $login eq "" }
{include file="auth.tpl" }
{else}
{include file="authbox.tpl" }
{/if}
{include file="news.tpl" }
{if $active_modules.XAffiliate ne ""}
<br />
{include file="partner/menu_affiliate.tpl" }
{/if}
{if $active_modules.Interneka ne ""}
<br />
{include file="modules/Interneka/menu_interneka.tpl" }
{/if}
<br />
{capture name=dialog}
{ include file="customer/main/navigation.tpl" }
<br />
<table cellspacing="5">
{foreach from=$manufacturers item=v}
<tr>
<td class="ManufacturersItem"><a href="manufacturers.php?manufacturerid={$v.manufac turerid}"><font class="ItemsList">{$v.manufacturer|escape}</font></a></td>
</tr>
{/foreach}
</table>
<br /><br />
{ include file="customer/main/navigation.tpl" }
{/capture}
{include file="dialog.tpl" title=$lng.TITLE_LNG_NAME content=$smarty.capture.dialog extra='width="100%"'}
{include file="menu_border.tpl" dingbats="dingbats_categorie.gif"}
<br />
{include file="poweredby.tpl" }
<br />
<img src="{$ImagesDir}/spacer.gif" width="160" height="1" alt="" />
</td>
</tr>
</table>
{include file="rectangle_bottom.tpl" }
{if $active_modules.Google_Analytics ne "" && $config.Google_Analytics.ganalytics_code ne ""}
{include file="modules/Google_Analytics/ga_code.tpl"}
{/if}
</body>
</html>
{/if}

balinor 09-18-2008 10:24 AM

Re: home.tpl error
 
No, don't hard code the favicon link that will result in an insecure warning when in https mode.

ladybird 09-18-2008 03:27 PM

adding a 'favicon' to home.tpl
 
Hi everyone,

after my first unfortunate attend at adding a favicon to the home.tpl I thought I would just ask if someone could tell me if what I have now done is correct...

so far I have created the favicon and uploaded it to the public html folder

I have then inserted the line code

<link rel="shortcut icon" href="/favicon.ico">

as is seen below between <head> and </head>

<html>
<head>
<title>{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{if not %position.first%}{$location[position].0|escape}
{else}{$lng.txt_site_title}{/if}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{if not %position.first%}{$location[position].0|escape}
{else}{$lng.txt_site_title}{/if}
{if not %position.last%} :: {/if}
{/section}
{/if}</title>
{include file="meta.tpl" }
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}" />
<link rel="shortcut icon" href="/favicon.ico">
</head>

Is there anything else I need to do to make this template change work?

Thanks

balinor 09-18-2008 03:30 PM

Re: home.tpl error
 
You are just breaking all the rules on your first day here :) Please don't double post, I have moved your post on this topic to your original thread, as there is no need for a new one. Yes, as I mentioned above, this is the correct way to add the icon. You may need to refresh your browser/clear your cache to see it.

ladybird 09-21-2008 08:36 PM

Re: home.tpl error
 
Thanks everyone all up and running - out of interest does anyone know why it doesn't work in IE6?


All times are GMT -8. The time now is 02:34 AM.

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