jontesamuelsson Posted March 30, 2011 Share Posted March 30, 2011 Hello!my first post here :-)I'm new to Prestastore, but i really like it so far :-). Looks and feels great! And i have run OsC, ZenCart, Virtuemart and some more over the years.Great, Except that i cant choose anything else but list-view for products. :-(I would like to be able to list the products in list-view, grid-view and even a textrow-view without images. And this should be possible to set as a default value depending on category! Let's say i have a category with cars, that should be in list-view, and another category with aluminium rim that should be grid-view, and maybe a category with light-bulbs hat are so uninteresting and so many items that i dont images at all, just textrow-view. And even let the customers choose for them self if they don't like the default view for that category.Hope you understand what i i mean :-) (english isn't my primary language)Can i post this as a feature request? If so, where? Link to comment Share on other sites More sharing options...
SPolischook Posted May 25, 2011 Share Posted May 25, 2011 Ok, I have the same task.But I whanna find a better solution. In my table _category I create field 'template' where I will keep the item of template.I don't whant to find the item of template at 'product-list.tpl', because it would violate MVC pattern. So where and how I find it?Thanks in advance I really appreciate your support! Link to comment Share on other sites More sharing options...
SPolischook Posted May 25, 2011 Share Posted May 25, 2011 Ok, I find that for view the products list responded file /themes/prestashop/product-list.tplAnd now question: What Class I must to edit to add value from my table _category which have a new row - 'template' in a product-list.tplAt finish I must have: {if $template_of_category == 0} HTML Template 1 {/if} {if $template_of_category == 1} HTML Template 2 {/if} Link to comment Share on other sites More sharing options...
SPolischook Posted May 26, 2011 Share Posted May 26, 2011 The situation is as follows.The problem of deriving a template class under the flag should be decided by the conditions in your product-list.tpl: {if $flag_template == 0} Template1 {/if} {if $flag_template == 1} Template2 {/if} Now we need to find where to define variable Smarty $flag_template. I looked through the search that the product-list.tpl include only other tpl, ie, nested templates, which complicates the search for the controller. So how to find a controller? Link to comment Share on other sites More sharing options...
Recommended Posts