VM2.0.0 - Can I set template for featured products (or override the template)?

Started by koumei, December 21, 2011, 14:56:33 PM

Previous topic - Next topic

koumei

In Extensions - Module Manager I can add featured products module ok.

But I would like to set the template featured products. How can I override the featured products template? Anyone can help?

PRO


koumei

Quote from: BanquetTables.pro on December 21, 2011, 16:19:32 PM
the module or the featured products on homepage?

It is featured products on home page, i want to change its template.

JtouchMobile.com

/components/com_virtuemart/views/virtuemart/tmpl is the folder you would like to take a look in ;)
Author of Jtouch - Mobile solution for Joomla & VirtueMart
http://www.jtouchmobile.com

koumei

Quote from: MobileMeWs on December 22, 2011, 03:03:32 AM
/components/com_virtuemart/views/virtuemart/tmpl is the folder you would like to take a look in ;)

You are right. My concern of this if I modify the code in here, next time VM2 update would probably override my changes...

koumei

I understand i can override the template of that folder, but if i override it, the home page featured product template is changed and also all the product list changed. in this case, i just want to change the template of home page featured product.


koumei

Quote from: BanquetTables.pro on December 22, 2011, 10:36:48 AM
do a template override
http://forum.virtuemart.net/index.php?topic=90935.0

NOT modify the file

Maybe I did not ask my question clearly.

The template of Home Featured Product and Product List template they are the same, correct? So If I override the template in /mytemplate/html/mod_virtuemart_product/default.php, both home featured product style and product list style are changed. My question is how to have different template for home featured product and product list?

PRO

use 2 different module, and you can do a moduleclass suffix

or create 2 views

koumei

Quote from: BanquetTables.pro on December 22, 2011, 14:33:47 PM
use 2 different module, and you can do a moduleclass suffix

or create 2 views

thanks for you replies :-P I believe it is very helpful!~

moduleclass suffix does not work for me, because i am not only use style sheet.

How do you mean create 2 views? Thanks.

PRO

the the module/tmpl

you can copy default.php

and rename it to  modified.php

THEN, in the module settings there is a dropdown for layout.

koumei

Quote from: BanquetTables.pro on December 22, 2011, 16:11:18 PM
the the module/tmpl

you can copy default.php

and rename it to  modified.php

THEN, in the module settings there is a dropdown for layout.

Module type "Virtuemart Products" does not have dropdown list for the layout.

PRO

What I do IN MY JOOMA template is have specific module position for category, and productdetails view


SO, this code below creates a module position for the default virtuemart view


<?php if (JRequest::getVar('view')=='virtuemart') { ?>
<div id="positiondiv"><jdoc:include type="modules" name="modulename" /></div>
<?php } ?>



koumei

Quote from: BanquetTables.pro on December 23, 2011, 15:34:51 PM
What I do IN MY JOOMA template is have specific module position for category, and productdetails view


SO, this code below creates a module position for the default virtuemart view


<?php if (JRequest::getVar('view')=='virtuemart') { ?>
<div id="positiondiv"><jdoc:include type="modules" name="modulename" /></div>
<?php } ?>

Thank you very much for the solution. Merry Christmas!!