I am trying to override the layout for a VirtueMart homepage. At present it displays a list of categories with the image and description.
The documentation to override each category items layout (not the entire category page layout) says to use default_showcategory.php
in the productdetails
folder.
So I have copied the com_virtuemart/productdetails
folder to the template html file and removed the temple folder to find the override file here templates/amandafield/html/com_virtuemart/productdetails/default_showcategory.php
However no changes in this file are affecting the layout. I have various other overrides following this file format and all working as should be.
This indicates that this is not the correct file to override, however it is the only file that contains the same structure and classes as the category item.
Could anyone advise what I am doing wrong? (Joomla V3.5.1, VM V3.0.16)
The ways in VirtueMart 3 to override categories are different form VM 2.
You can display categories and/or products in the category view and the virtuemart view (start page).
The layout for the categories in the category view is in the sublayout called categories.php. /components/com_virtuemart/sublayouts/
The layout for the products in category view in VirtueMart 3 is in a sublayout called products.php. /components/com_virtuemart/sublayouts/
You can make overrides for the sublayouts in: /templates/YOURTEMPLATE/html/com_virtuemart/sublayouts/
If you set a menu item in Joomla for the category, you can choose the sublayout in the menu item properties.
The homepage/front page is called by the view "virtuemart" until VM 3.0.16, but that is supposed to change in future and will also be called by the category view.