guest* Posted October 19, 2010 Share Posted October 19, 2010 How can I change the category.tpl for this ?I want when products are in a category, that no subcategories where shown, only the products. Is this possible ? To get access to sub-categories user can use the navigation. So if a category has products user must use filtersearch, or navigationbar on top.This is my category.tpl: {include file=$tpl_dir./breadcrumb.tpl} {include file=$tpl_dir./errors.tpl} {if $category->id AND $category->active} {strip} {$category->name|escape:'htmlall':'UTF-8'} {if $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if} {/strip} {if $scenes} <!-- Scenes --> {include file=$tpl_dir./scenes.tpl scenes=$scenes} {else} <!-- Category image {if $category->id_image} getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} --> {/if} {if $category->description} {$category->description} {/if} {if isset($subcategories)} <!-- Subcategories --> {l s='Subcategories'} {foreach from=$subcategories item=subcategory} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {else} {/if} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} {/foreach} {/if} {if $products} {include file=$tpl_dir./product-sort.tpl} {include file=$tpl_dir./product-list.tpl products=$products} {include file=$tpl_dir./pagination.tpl} {elseif !isset($subcategories)} {l s='There are no products in this category.'} {/if} {elseif $category->id} {l s='This category is currently unavailable.'} {/if} Link to comment Share on other sites More sharing options...
rocky Posted October 20, 2010 Share Posted October 20, 2010 Comment out the following part like this: {* {if isset($subcategories)} <!-- Subcategories --> {l s='Subcategories'} {foreach from=$subcategories item=subcategory} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {else} {/if} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} {/foreach} {/if}*} Link to comment Share on other sites More sharing options...
guest* Posted October 20, 2010 Author Share Posted October 20, 2010 Hi Rocky,thx. I did it. Works perfect. Link to comment Share on other sites More sharing options...
htech Posted April 7, 2011 Share Posted April 7, 2011 hey guysplease can you help, im going crazy here!iv taken the following product slider code and need to change it into a category code so iv done the following : {counter start=0 assign=nbPrd} {foreach from=$bandmovingboxes_products item=bandmovingboxes_product name=bandmovingboxes} getImageLink($bandmovingboxes_product.link_rewrite, $bandmovingboxes_product.id_image, 'large')}" alt="{$bandmovingboxes_product.legend|escape:htmlall:'UTF-8'}" /> getImageLink($bandmovingboxes_product.link_rewrite, $bandmovingboxes_product.id_image, 'large')}" alt="{$bandmovingboxes_product.legend|escape:htmlall:'UTF-8'}" /> {$bandmovingboxes_offer_message} {convertPrice price=$bandmovingboxes_product.price} {$bandmovingboxes_product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {/foreach} <!-- the scroller --> <!-- slider --> and i changed it to the following : {counter start=0 assign=nbPrd} {foreach from=$bandmovingboxes_category item=bandmovingboxes_category name=bandmovingboxes} getCatImageLink($bandmovingboxes_category.link_rewrite, $bandmovingboxes_category.id_image, 'large')}" alt="{$bandmovingboxes_category.legend|escape:htmlall:'UTF-8'}" /> getCatImageLink($bandmovingboxes_category.link_rewrite, $bandmovingboxes_category.id_image, 'large')}" alt="{$bandmovingboxes_category.legend|escape:htmlall:'UTF-8'}" /> {$bandmovingboxes_offer_message} {convertPrice price=$bandmovingboxes_category.} {$bandmovingboxes_category.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {/foreach} <!-- the scroller --> <!-- slider --> it just shows up blank and nothing shows on the frontpage at allPlease help guys what am i doing wrong???? Link to comment Share on other sites More sharing options...
cleatus Posted May 1, 2011 Share Posted May 1, 2011 hey guysplease can you help, im going crazy here!iv taken the following product slider code and need to change it into a category code so iv done the following : {counter start=0 assign=nbPrd} {foreach from=$bandmovingboxes_products item=bandmovingboxes_product name=bandmovingboxes} getImageLink($bandmovingboxes_product.link_rewrite, $bandmovingboxes_product.id_image, 'large')}" alt="{$bandmovingboxes_product.legend|escape:htmlall:'UTF-8'}" /> getImageLink($bandmovingboxes_product.link_rewrite, $bandmovingboxes_product.id_image, 'large')}" alt="{$bandmovingboxes_product.legend|escape:htmlall:'UTF-8'}" /> {$bandmovingboxes_offer_message} {convertPrice price=$bandmovingboxes_product.price} {$bandmovingboxes_product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {/foreach} <!-- the scroller --> <!-- slider --> and i changed it to the following : {counter start=0 assign=nbPrd} {foreach from=$bandmovingboxes_category item=bandmovingboxes_category name=bandmovingboxes} getCatImageLink($bandmovingboxes_category.link_rewrite, $bandmovingboxes_category.id_image, 'large')}" alt="{$bandmovingboxes_category.legend|escape:htmlall:'UTF-8'}" /> getCatImageLink($bandmovingboxes_category.link_rewrite, $bandmovingboxes_category.id_image, 'large')}" alt="{$bandmovingboxes_category.legend|escape:htmlall:'UTF-8'}" /> {$bandmovingboxes_offer_message} {convertPrice price=$bandmovingboxes_category.} {$bandmovingboxes_category.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {/foreach} <!-- the scroller --> <!-- slider --> it just shows up blank and nothing shows on the frontpage at allPlease help guys what am i doing wrong???? one way you might be able to handle it would be to create your own category images and then add a link to the large one in scenes.tpl. that way you would have category navigation as well. i'm trying to figure out how use the scenes.tpl category id to point to my custom html of my own nav slide show i'm using on the home page. i created a module and hooked it into home page but i haven't figured out how to trick category.tpl or scenes.tpl to either point directly to html file or hook my module into the correct category page as each cat page needs to point to a different html file or module. good luck. oh yeah what the hell is the point of the scenes anyways? if it's not navigation as well as images it doesn't need to be there at all! imho Link to comment Share on other sites More sharing options...
rocky Posted May 1, 2011 Share Posted May 1, 2011 The scenes feature lets you have a banner image for a category that is different to the image used when listed as a subcategory. It also lets you mark parts of the banner as images, so you can link to different images from the banner. Link to comment Share on other sites More sharing options...
Maheshmohan1093 Posted April 22, 2015 Share Posted April 22, 2015 (edited) Hi , My sub category link is not working. Only the class="last" is working. That is only the last sub-category link is working. Other sub categories links are not working. Their classes are empty. What I have to do? Please help.I am using Prestashop 1.5. Edited April 22, 2015 by Maheshmohan1093 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now