Author Topic: How to create new Product Details Page template  (Read 12876 times)

malik0206

  • Beginner
  • *
  • Posts: 43
How to create new Product Details Page template
« on: April 10, 2013, 15:50:20 pm »
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]

K&K media production

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: How to create new Product Details Page template
« Reply #1 on: April 10, 2013, 16:42:09 pm »

malik0206

  • Beginner
  • *
  • Posts: 43
Re: How to create new Product Details Page template
« Reply #2 on: April 10, 2013, 20:10:52 pm »
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

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: How to create new Product Details Page template
« Reply #3 on: April 10, 2013, 20:25:10 pm »
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

  • Beginner
  • *
  • Posts: 43
Re: How to create new Product Details Page template
« Reply #4 on: May 22, 2013, 18:51:32 pm »
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

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: How to create new Product Details Page template
« Reply #5 on: May 28, 2013, 21:23:03 pm »
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

  • Beginner
  • *
  • Posts: 43
Re: How to create new Product Details Page template
« Reply #6 on: May 29, 2013, 14:18:04 pm »
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

  • VirtueMart Developer Team
  • Global Moderator
  • Full Member
  • *
  • Posts: 838
  • VirtueMart Version: VM3 on J3
Re: How to create new Product Details Page template
« Reply #7 on: May 29, 2013, 18:50:12 pm »
example for category layout:

copy

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

to

your_template/html/com_virtuemart/category/default.php

malik0206

  • Beginner
  • *
  • Posts: 43
Re: How to create new Product Details Page template
« Reply #8 on: May 29, 2013, 19:18:38 pm »
THANKS

Got the template to work.

rosciak

  • Beginner
  • *
  • Posts: 1
Re: How to create new Product Details Page template
« Reply #9 on: February 12, 2014, 04:01:45 am »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27674
  • Always on vacation
    • Jenkin Hill Internet
Re: How to create new Product Details Page template
« Reply #10 on: February 12, 2014, 11:22:58 am »
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.6.11 10292 on Joomla 3.9.16 PHP 7.0.33