VirtueMart 2 > Templating & Layouts
Product Page Fields For Templating
PRO:
--- Quote from: kode5 on November 21, 2011, 14:18:03 PM ---I can't get it to work.
Can you please give an example of an edited product details page default.php including Product SKU:
--- Code: ---Product SKU
<?php echo $this->product->product_sku ?>
--- End code ---
--- End quote ---
USE and override,
http://forum.virtuemart.net/index.php?topic=90935.0
and how is it not working?
matteo:
Can i get the from an overridden product details page the url of the main image and the additional images?
I’d like to build a different <img> tag, so I need the file_url_thumb used in the "VmImage" class I think.
PRO:
what?
matteo:
I’m sorry, I’ll try to explain it better:
I have a view to modify: /templates/MYTEMPLATE/html/com_virtuemart/productdetails/default.php
If I use the "page field" echo $this->product->images[0]->displayMediaFull('class="product-image"',false) I get as generated code this:
--- Code: ---<div class="main-image">
<img src="MY_IMAGE_URL.jpg" alt="MYIMAGENAME" class="product-image"><span class="vm-img-desc">MY_IMAGE_NAME</span>
</div>
--- End code ---
and for the for the additional images, if I use the "page field" echo $image->displayMediaThumb('class="product-image"',true,'class="modal"',true,true); I get this:
--- Code: ---<div class="additional-images">
<a title="MY_IMAGE_NAME" class="modal" href="MY_IMAGE_URL.jpg"><img src="MY_THUMB_URL.jpg" alt="MY_IMAGE_NAME" class="product-image"></a><span class="vm-img-desc">MY_IMAGE_NAME</span>
<a title="MY_IMAGE_NAME" class="modal" href="MY_IMAGE_URL.jpg"><img src="MY_THUMB_URL.jpg" alt="MY_IMAGE_NAME" class="product-image"></a><span class="vm-img-desc">MY_IMAGE_NAME</span>
</div>
--- End code ---
I need to use in the /templates/MYTEMPLATE/html/com_virtuemart/productdetails/default.php the url of the images and of the thumbnails so I can have as generated code a different html structure like (for example) this:
--- Code: ---<div id="MY_ID">
<div class="MY_CLASS">
<ul class="MY_CLASS">
<li><li style="position: absolute; left: 17px; "><img src="MY_THUMB_URL01.jpg" width="80" height="45" alt="MY_IMAGE_NAME01"></li></li>
<li><li style="position: absolute; left: 107px; "><img src="MY_THUMB_URL02.jpg" width="80" height="45" alt="MY_IMAGE_NAME02"></li></li>
</ul>
</div>
</div>
--- End code ---
PRO:
what do you want it to look like? it seems you are going the wrong way about this
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version