Jump to content

[SOLVED] My catagory image at the top of the page won't show up - read forum


Recommended Posts

When I installed I rec'd this error.....

 

Warning: Copy/Paste your errors if you want to manually set the image type (in the "Images" page under the "Preferences" menu):
Some kind of image could not be added because they exists. Here's the list:

·         Name image type: small_default (Width: 66px, Height: 66px)

·         Name image type: medium_default (Width: 80px, Height: 80px)

·         Name image type: large_default (Width: 304px, Height: 304px)

·         Name image type: thickbox_default (Width: 600px, Height: 600px)

·         Name image type: category_default (Width: 500px, Height: 150px)

·         Name image type: home_default (Width: 180px, Height: 180px)

·         Name image type: scene_default (Width: 520px, Height: 189px)

·         Name image type: m_scene_default (Width: 161px, Height: 58px)

Link to comment
Share on other sites

Here is my catagory.tpl file. Thanks!

 

{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($category)}
{if $category->id AND $category->active}
<h1>
{strip}
{$category->name|escape:'htmlall':'UTF-8'}
{if isset($categoryNameComplement)}
{$categoryNameComplement|escape:'htmlall':'UTF-8'}
{/if}
<span class="category-product-count">
{include file="$tpl_dir./category-count.tpl"}
</span>
{/strip}
</h1>
{if $scenes}
<!-- Scenes -->
{include file="$tpl_dir./scenes.tpl" scenes=$scenes}
{*
{else}
<!-- Category image -->
{if $category->id_image}
<div class="align_center">
<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
</div>
{/if}
*}
{/if}
{if $category->description}
{if strlen($category->description) > 120}
<p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:120} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p>
<p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p>
{else}
<p class="cat_desc bordercolor bgcolor">{$category->description}</p>
{/if}
{/if}
{if isset($subcategories)}
<!-- Subcategories -->
<div id="subcategories" class="clearfix">
<h2>{l s='Subcategories'}</h2>
<ul>
{foreach from=$subcategories item=subcategory name=subcategoryes}
<li {if $smarty.foreach.subcategoryes.iteration is div by 5} class="last-in-line"{/if}>
<a class="bgcolor bordercolor" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
{if $subcategory.id_image}
<img class="bordercolor" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')}" alt="" />
{else}
<img src="{$img_cat_dir}default-medium_default.jpg" alt="" />
{/if}
<span>{$subcategory.name|escape:'htmlall':'UTF-8'|truncate:20:'...'}</span>
<strong></strong>
</a>
</li>
{/foreach}
</ul>
</div>
{/if}
{if $products}
{include file="$tpl_dir./product-sort.tpl"}
{include file="$tpl_dir./product-list.tpl" products=$products}
{include file="$tpl_dir./product-compare.tpl"}
{include file="$tpl_dir./pagination.tpl"}
{elseif !isset($subcategories)}
<p class="warning">{l s='There are no products in this category.'}</p>
{/if}
{elseif $category->id}
<p class="warning">{l s='This category is currently unavailable.'}</p>
{/if}
{/if}
Link to comment
Share on other sites

i inspected your code.

you've got there command to hide code (comments) {*  *} - code beetween will not work, take a look:

{*
{else}
<!-- Category image -->
{if $category->id_image}
<div class="align_center">
<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
</div>
{/if}
*}
 
remove these brackets, then it will work
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...