News:

Support the VirtueMart project and become a member

Main Menu

How to create new Product Details Page template

Started by malik0206, April 10, 2013, 15:50:20 PM

Previous topic - Next topic

malik0206

HI

I'm currently building a website for a wine seller and my issues is i need to create 2 different layout for the ITEM details page.

This was easily done on Virtuemart 1.1 but am not sure how this is now done on Virtuemart 2.0


In Views>productdetails>tmpl>default.php (this is used for all products details) but i want to be able to duplicate this and create different style layout.

Can anyone help me with this please i just need to know how i can create multiple products layout.

Please have a look at the attachments as i have duplicated the default.php and renamed it to default_winecases.php and duplicated the .xml but when i try to assign the layout in category is not showing the template which i created.


Any advise would be great help


thanks

[attachment cleanup by admin]


malik0206

Thanks but i would really like to use the feature within virtuemart so that i get a dropdown list of different styling when i create the Caetgory


K&K media production

#3
You can choose it in this dropdown. Name the file e.g. mylayout.php ... look in the description for joomla template overrides ... for vm it is the same way like joomla item details page

"The new template system of virtuemart allows fine grained overrides for each category and product. Even the views can have different templates. We did not implement our own template system, it is based upon what is already there. So we have the joomla template system and some methods to override, but this leads to some limitations."

malik0206

Hi

Can anyone help me creating multiple category and product details layout please

have created a template labelled 'item' and copied in to the html folder com_virtuemart/views/

i can see my template in product category and selected the template then made some modification to category/tmpl/default.php

when i refresh i still get system default layout.


Some help please


Thanks

K&K media production

you must store the template overrides here:

your_template/html/com_virtuemart/subfolder/default.php

it is the same way like joomla template overrides

http://docs.virtuemart.net/tutorials/33-templating-layouts/78-introduction-template-system.html

malik0206

Hi i have followed instructions but still unable to do template override

please see the attached images

your help is much appreciated

Thanks

Am still little confused as to how i created the override and which files to copy over screen shots will show what i've done.


[attachment cleanup by admin]

K&K media production

example for category layout:

copy

components/com_virtuemart/views/category/tmpl/default.php

to

your_template/html/com_virtuemart/category/default.php

malik0206


rosciak

Hi. Can't get it to work. I just want to create ONE ADDITIONAL template for product details page. In fact i just want to remove ADD TO CART button for some products.

I created

mytemplate/html/com_virtuemart/category
mytemplate/html/com_virtuemart/productdetails

then i copied correct default.php with new name. Can't see it on the list of available templates for both, category and product. What i'm doing wrong? Im not a total newbie and i'm not asking for help often, but this confused me so much...

I see it working, because i can overwrite default.php with new default.php from mytemplate/html/com_virtuemart/productdetails but i need TWO different views for my products.


jenkinhill

Are you using the right selector for overrides? eg in Cat view it is Category Browse Page  not  Category Template. See pic


[attachment cleanup by admin]
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