VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: talkinggoat on September 13, 2015, 22:04:43 PM

Title: VM - Featured products Module Layouts
Post by: talkinggoat on September 13, 2015, 22:04:43 PM
I am trying to make a new layout for the Featured Products module. I created a template override and renamed default.php to override.php, changed the html and refreshed the module, but it doesn't show up as a Layout choice. I only have default and single. Am I changing the right file?
Title: Re: VM - Featured products Module Layouts
Post by: GJC Web Design on September 13, 2015, 22:24:40 PM
We can't say as u don't mention where you put your over ride

if it the correct path just name it default.php
Title: Re: VM - Featured products Module Layouts
Post by: talkinggoat on September 13, 2015, 23:37:59 PM
Aren't all overrides supposed to go in template/TEMPLATE NAME/html/mod_MDOULE NAME? I tried creating a templ folder, like the one in the modules folder, in the mod_virtuemart_product, but it did not change anything. I also tried renaming the default.php and using the default.php with the modifications. So the question is, where do I need to put templates for the featured items module?

EDIT:
After looking at the .xml file, for the module, it is hard coded to search in the mod_virtuemart_product/tmpl folder, on line 21. Is there any way to override the setting, that will last an upgrade?

Another EDIT:
Apparently, you have to clear and purge the cache, before you will see any changes. Putting the template file in html/mod_virtuemart_product/NEWNAME.php, clearing then purging the cache updated the module and the new layout showed up as a choice.