DanGB Posted September 13, 2014 Share Posted September 13, 2014 Hello, My client wants to arrange the sub categories into related groups like this site: http://www.awesomegti.com/car/vw/golfmk5 (magento based) So a group with suspension sub categories, then a group with engine sub categories etc. Any ideas how this would be acheivable in Prestashop? My site: http://www.temp-site.info/19-golf-mk5 Many thanks. Link to comment Share on other sites More sharing options...
NemoPS Posted September 15, 2014 Share Posted September 15, 2014 Well if you know the IDS you might as well try hardcoding this in your category.tpl file. For example ul class="clearfix"> {foreach from=$subcategories item=subcategory} {if $subcategory.id|in_array([1,2,3,4,5])} // add it, these are, say, exhaust {/if} And so on, creating on UL for each group Link to comment Share on other sites More sharing options...
DanGB Posted September 20, 2014 Author Share Posted September 20, 2014 Mega, thanks,. heres an example of what I did, slightly modifiying your concept: <!--Engine stuff--> <p style="font:sans-serif;font-size:24px;color:#555454;text-transform: uppercase;font-weight:bold;">Engine</p> <p style="border-top:1px;dotted:#f00;color:#fff;background-color:#aaa;height:1px;width:95%;"> <ul class="clearfix"> {foreach from=$subcategories item=subcategory} {if strpos($subcategory.name,'Air filters / Induction kits')!==false || strpos($subcategory.name,'Intercoolers')!==false || strpos($subcategory.name,'Exhausts')!==false} <li> <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> </div> <h5a><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:30:'...'|escape:'html':'UTF-8'|truncate:350}</a></h5a> {if $subcategory.description} <div class="cat_desc">{$subcategory.description} </div> <span class="subcategory-heading"></span></div> {/if} </li> {/if} {/foreach} </ul> And repeat the above for each 'group' of parts. 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