Author Topic: How can I override the shop front page?  (Read 3412 times)

allamistakeo19

  • Beginner
  • *
  • Posts: 29
How can I override the shop front page?
« on: May 22, 2015, 12:30:52 pm »
Hi,

Can someone please provide instructions on how to override the following file?
Code: [Select]
components/com_virtuemart/views/virtuemart/tmpl/default.php
I have saved a modified version at the following path, but it doesn't get picked up:
Code: [Select]
templates/my_template/html/com_virtuemart/views/virtuemart/tmpl/default.php
What I would like to achieve is to get the categories to be displayed above the store description instead of below. I got it to work by editing the original file, but it would be better if I could use an override instead.

Thanks in advance


Edit: this is about VirtueMart 3, not VirtueMart 1.1.x; I must have posted in the wrong discussion group

allamistakeo19

  • Beginner
  • *
  • Posts: 29
Re: How can I override the shop front page?
« Reply #1 on: May 30, 2015, 08:18:04 am »
Answering my own question...

I had to look deep into the code to investigate this, but I finally found how to properly override the shop front page layout.
  • The new version of default.php must be saved in the folder "templates/my_template/html/com_virtuemart/virtuemart/"
  • The new version of default.php must have a filename that is different from "default.php" and is not allowed to contain underscores
  • The new layout must be selected in the VirtueMart CONFIGURATION > Configuration > Templates > VirtueMart Home Page Settings > Layout for your home page

GJC Web Design

  • 3rd party VirtueMart Developer
  • Hero Member
  • *
  • Posts: 7325
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.0.16
Re: How can I override the shop front page?
« Reply #2 on: May 30, 2015, 09:17:25 am »
Quote
1. The new version of default.php must be saved in the folder "templates/my_template/html/com_virtuemart/virtuemart/"
2. The new version of default.php must have a filename that is different from "default.php" and is not allowed to contain underscores
3. The new layout must be selected in the VirtueMart CONFIGURATION > Configuration > Templates > VirtueMart Home Page Settings > Layout for your home page

1 is correct
2. is only partly correct - you can use the name default.php and then 3 isn't necessary
Yes - no underscores!
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation