VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: guybr on August 21, 2014, 07:40:14 AM

Title: directory of templates?
Post by: guybr on August 21, 2014, 07:40:14 AM
I'm searching the forum but I see different files names associated with templates that we can customize.

Would it be possible for the moderators to create a 'map' of the different templates (of the different components/modules) with a brief summary of what they affect? In some cases, the components have multiple .php files and it's not apparent what each file affects.

For example, if I want to alter the VM store homepage and then separately the product listing page - what files am I looking for? I've seen forum posts directing us to  virtuemart/default.php, virtuemart/default_products.php, virtuemart/default_categories.php, category/default.php etc.
Title: Re: directory of templates?
Post by: vaskern on August 21, 2014, 10:22:01 AM
You are probably looking for template overrides? Lets you override product, category pages and more
Title: Re: directory of templates?
Post by: jenkinhill on August 21, 2014, 10:49:32 AM
There is no list required as the view files are easy to identify by name alone. Up to and including VM2.6.8 are all in components/com_virtuemart/views/ 
VM2.9.9/VM3 also uses sublayouts, which are to be found in components/com_virtuemart/sublayouts/

Ye vaskern, edited files should be used as overrides. For introduction to template overrides, which have been part of Joomla since J1.5 was launched, see  http://docs.virtuemart.net/tutorials/33-templating-layouts.html and  http://www.ostraining.com/blog/joomla/overrides
Title: Re: directory of templates?
Post by: guybr on August 25, 2014, 07:27:09 AM
I'm trying to locate the correct views to edit, to make overrides.

For example, where do I fine the main VM homepage, that displays "categories" on the top, then "featured products", "latest products" and below that "top 10 products" - is that a single page or is it composed of modules (each of which I need then to edit)?

I'm trying to get the image sizes right: I set them to 150x150 in the admin and on the page I described above, they render fine.

But in the category page they are small. I've found the forum thread which describes how to fix the problem on the category page - but to make the correction I'm want to compare the php on the homepage, where the images render well - and I can't seem to find it...
Title: Re: directory of templates?
Post by: jenkinhill on August 25, 2014, 11:37:53 AM
Homepage view is components/com_virtuemart/views/virtuemart/tmpl/default.php with also loads components/com_virtuemart/views/virtuemart/tmpl/default_categories.php and components/com_virtuemart/views/virtuemart/tmpl/default_products.php  - really obvious if the also look at the code.

Thumbnails are scaled accouding to the space available, so they show smaller with 3 products/row than with 2 products/row. Use Firebug to view the css - http://forum.virtuemart.net/index.php?topic=116620.0