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

select joomla template for product-view page ?

Started by clickonlogic, December 17, 2015, 21:44:06 PM

Previous topic - Next topic

clickonlogic

Hi,
In the VM 3 configuration I see that I can choose default joomla template for Category : "Category Template"
Is there any way to do that for the Product View page ?
I mean I need "Joomla template A" for category view and "Joomla template B" for product view.

Thank you

GJC Web Design

if you choose template A for cat does that cascade down to the details?

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

clickonlogic

Thank you for your answer.

If i choose Template A in cat then I will have the same template in the product details.
The problem is that I need a different template in product details.
And I am talking about Joomla system template not a VM template.

Thank you

GJC Web Design

If the config can't do what you want I  guess you need to do something in components\com_virtuemart\views\productdetails\view.html.php

around

shopFunctionsF::setVmTemplate($this, $category->category_template, $product->product_template, $category->category_product_layout, $product->layout);

isn't swapping joomla templates a bit radical?

Can't u just achieve what u want with over rides , css 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

jenkinhill

The only manageable way to switch Joomla templates rather that a hack is to assign menu items to each template. A Joomla menu link to each category of product would do it - but who would want to bother with that.......
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

but he wants worse than this.. catA->templateA
products of catA->templateB

would mean a menu to every product..  ;)
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

clickonlogic

#6
Maybe I cannot explain correctly what I need.

If I assign  a template to category,
when I click a product it will be loaded in the parent category's template bur I need a different joomla template.
The only solution is to assign a menu item for every product, which is impossible.

Now in the configuration there is already a template chooser for the category and loads the template in /components/com_virtuemart/views/category/view.html.php in the following lines :
if(empty($category->category_template)){
$category->category_template = VmConfig::get('categorytemplate');
}


So I need the same functionality for the product view I guess.

The reason I need that is that I work with gantry framework.
So in gantry I have the possibility to load JS, css and have different template structure, layout, modules, positions etc in my template override.
So in product page ONLY I need to load some JS and CSS, I also need to have different layout in page and finally I need some extra modules to be displayed.
And to achieve all the above I need to be able to set a Joomla template to the product views.

jenkinhill

That changes the category view template, not the Joomla template.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

clickonlogic

Then I haven't found where this is being set :
http://prntscr.com/9fmr9d
which is in Virtuemart Configuration -> Shopfront Settings

GJC Web Design

it must be related to the core joomla menu setting of which template...  not VM
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