gennybeans Posted January 16, 2012 Share Posted January 16, 2012 Hi, I'm trying to do something similar to this: http://www.prestasho...-form-category/, but instead of wanting the links to the sub-categories, I want a page to load with images. The solution doesn't work for me, as I want the layered navigation module activated. So basically, what I want to happen is that when you click on a Category, it will load a page with 3 images. The sub-categories will appear below the Category in the left as per usual. The images with direct to different parts of the store (depending on which they choose). I would like it so that the product list doesn't load at all. But when I took the product list part out of the code in category.tpl: <li id="productsSortForm"> {if $products} {include file="$tpl_dir./product-sort.tpl"} {include file="$tpl_dir./product-compare.tpl"} {/if} </li> {include file="$tpl_dir./product-list.tpl" products=$products} {if $products} {include file="$tpl_dir./pagination.tpl"} {/if} It would work, but like the other poster said, it would take the product list from ALL pages (including the sub-categories'). Is there a way to add a statement or edit so that if the Category page is loading, to hide the product list, pagination, sort and compare. But if it is a Sub-Category page, to load all of that? Thanks in advance! 1 Link to comment Share on other sites More sharing options...
gennybeans Posted January 16, 2012 Author Share Posted January 16, 2012 Figured it out! This is for anyone who is trying to figure out how to do the same thing: In categories.tpl, below: {if $products} add: {if $category->id == '#'} add conditional content here that you want to only appear in specified category {else} {include file="$tpl_dir./product-compare.tpl"} {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"} {/if} where # is the category ID number. Link to comment Share on other sites More sharing options...
Bibi40k Posted January 17, 2013 Share Posted January 17, 2013 (edited) there is an option in blocklayered module Show products from subcategories Yes / No Edited January 17, 2013 by Bibi40k (see edit history) 2 Link to comment Share on other sites More sharing options...
NOSaint Posted July 22, 2013 Share Posted July 22, 2013 Thanks Bibi40k...glad I didn't have to alter the code! Love simple fixes/answers lol! 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