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

How to use two different overrides templates for products?

Started by morphic, October 13, 2018, 00:19:51 AM

Previous topic - Next topic

morphic

Hi there,
I want to use two different overrides product templates for products from two different categories.
I put both files in my_template/html/com_virtuemart/productdetails as default_1.php and default_2.php

But how or where should I set for use this templates? I've seen on Category in VM3 in second tab (Category view settings) and I see on Product page selectlist only default, dont override, multiadd, pdf and notify option.

Please give me any suggestion to solve that.

Many thanks

GJC Web Design

you need to name them with a dash .. not an underscore

then they will show up in the dropdown in the cat admin

default-one.php , default-two.php etc
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

morphic

Quote from: GJC Web Design on October 13, 2018, 13:48:37 PM
you need to name them with a dash .. not an underscore

then they will show up in the dropdown in the cat admin

default-one.php , default-two.php etc

Dang, I knew that I'm noob. :D

Thanks for response .

morphic

But after I've chosen new product template on Category nothing to do.

I've chosen default-product1 template but still default template is loading.

GJC Web Design

If correctly done impossible -- I use this all the time .. caches?, double check settings?
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

morphic

What do you mean correctly done?

I have a template with html/com_virtuemart/productdetails and files inside this directory.

I had been copied default.php file to local, edited it (add some tabs), saved as default-product1.php and second default-product2.php and sent both back to server.

Default all categories had default template from my override template. But I want change templates for two categories (different tabs for them). And after change Product template on Category (subcategory and parent category) VM still use default.php (I can't see this new tabs).

When I change names - default to default-old and default-product1 to default all categories use name changed default-product1 template.

LASTEST NEWS - it's working fine to new added products but wrong for existing. New haven't description. Cache is disabled

morphic

OK, done.

User chosen default template on all product cards. Change to No override make that all working fine. :D

Many thanks for help.