News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Template Overrides not working

Started by Gretch, May 10, 2014, 03:19:48 AM

Previous topic - Next topic

Gretch

Joomla V2.5.19, VM 2.6.0a
My template overrides located in template/mytemplate/html/com_virtuemart/category and /productdetails are recognized in VM configuration for category and product layout overrides, but when selected, they are apparently not used.  If I change the override file names from my custom names to default.php they get used OK.

Any thoughts?  Since I have a work-a-round (naming the overrides to default.php) I am Ok for now.  Fortunately I only have one override template.

Thanks - you all do an awesome job monitoring all the questions in this forum! (And I have spent 2 hours searching for this problem so I know some of the questions you get!)

Gretch

GJC Web Design

Hmm - I always just name my over rides default.php  any way

never tried with another name - but just tried with  - templates/xxxxxxx/html/com_virtuemart/productdetails/myoverride.php

appeared and selected in config->templates and showed up immeditely in the front end

if you have say myoverride.php then don't forget you need (if you keep the std template calls in the template)

templates/xxxxxx/html/com_virtuemart/productdetails/myoverride_images.php  to over ride the image template

make sure you haven't got a template defined individually in the product admin - should be (counter intuitively) "No override"

if it's on default it will take a template called "default"
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Gretch

Thank you for your reply GJC Web Design.

After a messing around with this I found that I needed to have all lower case letters in the file name.  The overrides with capital letters in the files names were working great on my local machine using WAMP, but not on my hosting server.  Of course windows doesn't differentiate between lower & upper case where as Linux does.  And apparently VM doesn't keep the file name in the same case when retrieving it.

So, use all lower case and you can have as many template overrides as you want! 
Thanks for you  time.
Gretch