DARKF3D3 Posted January 23, 2011 Share Posted January 23, 2011 Hello, now on my site theres category and subcategory.If i click on principal category it open a list of all item in the subcategory.Now i want to create a page that, when i click on a category it doen't open the product list, but a new page with the list of the subcategory and their image and link.How can i do that? Link to comment Share on other sites More sharing options...
need4speed Posted January 23, 2011 Share Posted January 23, 2011 I think you just need to edit the category.tpl file in your theme folder and delete where the products get listed.Try look after the product-list.tpl file and delete the line. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 24, 2011 Author Share Posted January 24, 2011 Thanks, but i don't understand which code i must edit: {include file=$tpl_dir./breadcrumb.tpl} {include file=$tpl_dir./errors.tpl} {if $category->id AND $category->active} {$category->name|escape:'htmlall':'UTF-8'} {$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} {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)} {/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 is no product 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...
need4speed Posted January 24, 2011 Share Posted January 24, 2011 Just try to delete the following lines of code: {include file=$tpl_dir./product-sort.tpl} {include file=$tpl_dir./product-list.tpl products=$products} {include file=$tpl_dir./pagination.tpl}Allways make a backup of the file Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 24, 2011 Author Share Posted January 24, 2011 It doesn't work, if i delete that 3 line i see all category and subcategory empty. Link to comment Share on other sites More sharing options...
need4speed Posted January 24, 2011 Share Posted January 24, 2011 Hmm okay. Try something else change this line: {include file=$tpl_dir./product-list.tpl products=$products}to {include file=$tpl_dir./product-list.tpl} Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 24, 2011 Author Share Posted January 24, 2011 Theres something different to do, i want that when i ope na category i doesn't show me product link, but open a page with the link/image of the subcategory.So i think that where i should modify the code i must add the link to the new page. no? Link to comment Share on other sites More sharing options...
need4speed Posted January 24, 2011 Share Posted January 24, 2011 Can you make a simpel drawing of how you want it to be ? Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 24, 2011 Author Share Posted January 24, 2011 When i click on a category i want that open a page like the one in the image below.Every photo is a subcategory, and when i press on it it must open the subcategory.I hope you understand the problem....Thanks Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 26, 2011 Author Share Posted January 26, 2011 I don't find a way to create a category page like that... Link to comment Share on other sites More sharing options...
rokutonoken Posted January 27, 2011 Share Posted January 27, 2011 Hello,why not copy the category page and its template, rename them using your category name and change line: $category = new Category(intval(Tools::getValue('id_category')), intval($cookie->id_lang)); by $category = new Category(intval(your_category_id), intval($cookie->id_lang)); in your php file? Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 27, 2011 Author Share Posted January 27, 2011 In this way when i click on a category it open a file with the category name, so i need only to create a file for each category? Link to comment Share on other sites More sharing options...
rokutonoken Posted January 27, 2011 Share Posted January 27, 2011 Yes, for now I don't see any other solution... Link to comment Share on other sites More sharing options...
Recommended Posts