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]
Can these new files still be overriden by placing the same file in \templates\.....templatename......\html\productdetails\product_images.php ?
Yes, at least, it works over here.
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]
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?
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 :)
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
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: ........"
<span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') ?></span>
Thanks BTP!
I take it it should be replaced with
<span class="bold"><?php echo $this->product->manufacturerImage; ?></span>
?
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
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?
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
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
A stupid question.
Which file have I to donwload and modify in order to change the product details page?
:-[
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
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.