VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Templating FAQs => Topic started by: PRO on February 23, 2012, 17:24:06 PM

Title: New Individual Product Details Templates in Latest Release
Post by: PRO on February 23, 2012, 17:24:06 PM
Notice in the picture below. The product details layout has been broken down into some smaller templates. Just like 1.1. This is BETTER IMO
(http://forum.virtuemart.net/index.php?action=dlattach;topic=98505.0;attach=47321;image)
 
default_addtocart                 The Add to Cart Form + Cart variant Custom Field
default_customfields             Custom Fields
default_images                     Main Image & Additional Images
default_manufacturer           Manufacturer Link
default_relatedcategories    Related Categories
default_relatedproducts       Related Products
default_reviews                    Reviews
default_showcategory          Child Category List
default_showprices              Prices Layout

They can be called like this.

echo $this->loadTemplate('showprices');
echo $this->loadTemplate('addtocart');
echo $this->loadTemplate('customfields');
echo $this->loadTemplate('images');
echo $this->loadTemplate('manufacturer');
echo $this->loadTemplate('reviews');

You have to make sure to use this format <?php  echo $this->loadTemplate('reviews');?>

[attachment cleanup by admin]
Title: Re: New Individual Product Details Templates in Latest Release
Post by: TBoele on February 25, 2012, 16:57:42 PM
Can these new files still be overriden by placing the same file in \templates\.....templatename......\html\productdetails\product_images.php ?
Title: Re: New Individual Product Details Templates in Latest Release
Post by: vigier on February 25, 2012, 17:12:25 PM
Yes, at least, it works over here.
Title: Re: New Individual Product Details Templates in Latest Release
Post by: talauega on April 15, 2012, 00:36:36 AM
If you would be so kind please take a look at the attachment then maybe you can direct me to which file needs to be edited to reflect the proper layout. As you can see the Color custom field in the attachment is messed up.

Thank You

[attachment cleanup by admin]
Title: Re: New Individual Product Details Templates in Latest Release
Post by: drewby07 on May 23, 2012, 15:11:08 PM
I recently upgraded from 2.0.4 to 2.0.6, and lost some of my overrides.  I'm currently trying to override the "notify me" link to make it into a button.  Previously I had added a class to the <a href tag....but now in the "notify" view I can't seem to find where the link is created.  My knowledge of PHP is somewhat limited, but I've managed so far. 

  I also see in the code of "notify.php" where the class="notify-button" is referenced, but I don't see that in my CSS.  I guess it needs to be added?
Title: Re: New Individual Product Details Templates in Latest Release
Post by: Nalle on May 23, 2012, 21:00:08 PM
Hey
i trying to get the BEEP sku number to show i moved default_customfields.php to temples/mytemple/html/com_virtuemart/productdetails#
and i in my lates attempt i added this til the file


                     <span class="product-sku"><?php echo $product->product_sku ?></span>
over
                    <span class="product-field-display"><?php echo $field->display ?></span>
                    <span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>


from what you can see here i have no clue on what todo i googled read infos but still i just dont get it
pls help a noob out :)
Title: Re: New Individual Product Details Templates in Latest Release
Post by: PRO on May 23, 2012, 22:06:55 PM
Quote from: Nalle on May 23, 2012, 21:00:08 PM
Hey
i trying to get the BEEP sku number to show i moved default_customfields.php to temples/mytemple/html/com_virtuemart/productdetails#
and i in my lates attempt i added this til the file


                     <span class="product-sku"><?php echo $product->product_sku ?></span>
over
                    <span class="product-field-display"><?php echo $field->display ?></span>
                    <span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>


from what you can see here i have no clue on what todo i googled read infos but still i just dont get it
pls help a noob out :)

Your answer is here of why this code will not work <?php echo $product->product_sku ?>

http://forum.virtuemart.net/index.php?topic=100696
Title: Re: New Individual Product Details Templates in Latest Release
Post by: mowgs on May 24, 2012, 16:38:14 PM
Hi, does this mean that somewhere in components/com_virtuemart/views/productdetails/tmpl/default_manufacturer.php  we can change it to show just the Manufacturer Logo, and not "Manufacturer: ........"

Title: Re: New Individual Product Details Templates in Latest Release
Post by: PRO on May 24, 2012, 18:11:32 PM
<span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') ?></span>
Title: Re: New Individual Product Details Templates in Latest Release
Post by: mowgs on May 25, 2012, 14:02:51 PM
Thanks BTP!

I take it it should be replaced with

<span class="bold"><?php echo $this->product->manufacturerImage; ?></span>

?
Title: Re: New Individual Product Details Templates in Latest Release
Post by: PRO on May 25, 2012, 16:45:04 PM
Quote from: mowgs on May 25, 2012, 14:02:51 PM
Thanks BTP!

I take it it should be replaced with

<span class="bold"><?php echo $this->product->manufacturerImage; ?></span>

?

what shows now?

This code is the text "Manufacturer"
<span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') ?></span>

I dont use manufacturers
Title: Re: New Individual Product Details Templates in Latest Release
Post by: mowgs on May 25, 2012, 21:03:49 PM
Hallo, nope obviously not that - nothing changes!

<span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_****_LBL') ?></span>

So do i need to work out what the id is for the manufacturer image and place it here?
Title: Re: New Individual Product Details Templates in Latest Release
Post by: PRO on May 25, 2012, 21:09:30 PM
Quote from: mowgs on May 25, 2012, 21:03:49 PM
Hallo, nope obviously not that - nothing changes!

<span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_****_LBL') ?></span>

So do i need to work out what the id is for the manufacturer image and place it here?

u might can try this

http://forum.virtuemart.net/index.php?topic=95818.15
Title: Re: New Individual Product Details Templates in Latest Release
Post by: mowgs on May 29, 2012, 13:33:54 PM
Quote from: BanquetTables.pro on May 25, 2012, 21:09:30 PM
Quote from: mowgs on May 25, 2012, 21:03:49 PM
Hallo, nope obviously not that - nothing changes!

<span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_****_LBL') ?></span>

So do i need to work out what the id is for the manufacturer image and place it here?

u might can try this

http://forum.virtuemart.net/index.php?topic=95818.15

Thankyou!

Only have a few brands so will place images in the description and try to call the description
Title: Re: New Individual Product Details Templates in Latest Release
Post by: changlee on June 29, 2012, 22:19:55 PM
A stupid question.

Which file have I to donwload and modify in order to change the product details page?

:-[
Title: Re: New Individual Product Details Templates in Latest Release
Post by: srajca on July 02, 2012, 23:33:12 PM
depends what in the productdetails page you want to modify. But you will find all the files in components/com_virtuemart/views/productdetails/tmpl/
copy the files you want to modify to
templates/YOURTEMPLATE/html/com_virtuemart/html/productdetails/ to make an override. You should maybe start and look into the default.php in that folder. Hope it helps
Title: Re: New Individual Product Details Templates in Latest Release
Post by: dasinfomedia on December 17, 2012, 12:33:05 PM
If you are upgrading VM 2.0.4 to latest 2.0.14 then please take care, there are some of changes so it will affect your current site.