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

home.tpl error

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-18-2008, 05:43 AM
 
ladybird ladybird is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 93
 

Red face 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
__________________
gold 4.1.9
gold 4.1.5
__________________
x-cart gold 4.1.9
x-cart gold 4.1.5
www.makeuwell.com.au
www.amberbebe.com
Sydney Australia
Reply With Quote
  #2  
Old 09-18-2008, 05:53 AM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: home.tpl error

Please attach your 'customer/home.tpl' file.
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
  #3  
Old 09-18-2008, 05:54 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 09-18-2008, 06:06 AM
 
ladybird ladybird is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 93
 

Default 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}
__________________
x-cart gold 4.1.9
x-cart gold 4.1.5
www.makeuwell.com.au
www.amberbebe.com
Sydney Australia
Reply With Quote
  #5  
Old 09-18-2008, 06:51 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: home.tpl error

Quote:
Originally Posted by ladybird
...........

line 113:

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


need "}"
Reply With Quote
  #6  
Old 09-18-2008, 10:15 AM
 
hhiker hhiker is offline
 

eXpert
  
Join Date: May 2007
Posts: 231
 

Default 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}
__________________
-
-
Versions: 4.1.10 and 4.3.0 (see post for which cart)

"Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge." - Thomas Edison

"Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it is the only thing that ever has." - Margaret Mead (1901-197 quoted in John M. RIchardson, ed. Making it Happen, 1982

"Water is the best of all things." - Pindar (c. 522 BC - c. 438 BC), Olympian Odes
Reply With Quote
  #7  
Old 09-18-2008, 10:24 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: home.tpl error

No, don't hard code the favicon link that will result in an insecure warning when in https mode.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 09-18-2008, 03:27 PM
 
ladybird ladybird is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 93
 

Default 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
__________________
x-cart gold 4.1.9
x-cart gold 4.1.5
www.makeuwell.com.au
www.amberbebe.com
Sydney Australia
Reply With Quote
  #9  
Old 09-18-2008, 03:30 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 09-21-2008, 08:36 PM
 
ladybird ladybird is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 93
 

Question Re: home.tpl error

Thanks everyone all up and running - out of interest does anyone know why it doesn't work in IE6?
__________________
x-cart gold 4.1.9
x-cart gold 4.1.5
www.makeuwell.com.au
www.amberbebe.com
Sydney Australia
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 02:35 AM.

   

 
X-Cart forums © 2001-2020