Hello
please tell me how i can get sku to show in virtuemart 2 i been trying for along time and nothing will get it to show
desprate for help!
cheers!
I'm sure other will have a a better answer but I saw this post
http://forum.virtuemart.net/index.php?topic=97300.0
http://forum.virtuemart.net/index.php?topic=97744.msg323841;topicseen#msg323841
thanks for your reply
i have read those threads but i still dont get it to work
i copyeddefault_customfields.php to templets/mytemple/html/com_virtuemart/productdetails/
and i added the code
<?php // Product Sku
echo JHTML::link ( JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->product_sku, array ('title' => $product->product_sku ) ); ?>
but i pretty sure i dont put it where its supposed tobe...
I would like to know this as well. Trying to get SKU to display on product detail page.. ;)
good to know im not alone lol
wierd i cant get the SKU to show but its show the images names.....
under each product image there is the file name of the image haha like this 4d5e4ce70a980.jpg
Nalle,
can you provide your URL?
Also, what file in VirtueMart did you edit?
default_customfields.php is the last one i tested to add the line in...
I went around it, because I do not know how to use the custom fields either
Go to components/com_virtuemart/views/productdetails/tmpl/default.php and open it with Dreamweaver, preferrably, or some type of color-coded HTML/PHP editor so you can find it easier.
Find this code for the manufacturers link:
<?php
// Manufacturer of the Product
if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
echo $this->loadTemplate('manufacturer');
}
?>
I placed this code:
<!-- SKU Number -->
<div class="skuNumber"><br />
<?php echo JText::_('COM_VIRTUEMART_CART_SKU') ?>: <?php echo $this->product->product_sku; ?>
</div>
Be careful when messing around in these .php files, especially this one! This is your product details page. Hope this helps! I also hope there's an easier way.
Great thanks ALOT! :)
now i just got figureout why i cant search on a sku id and get a hit too lol :)
Yes, but remember this is a workaround... someone reminded me that if you update Virtuemart, this addition may go away, so at least keep this SKU code on hand to drop it in again. Or keep searching for a better solution :)
You should use template overrides to avoid having to repeat edits = http://forum.virtuemart.net/index.php?topic=90935.0