Saturday 6 July 2013

How to Show SKU of product in Virtuemart

This is a tip about Joomla and Virtuemart which I found on Internet.

SKU = "Store Keeping Unit". This is an identifier given to each product.
On Virtuemart, you are free to follow any rules to design its value.
If you handle SKUs from other vendors on your store, you may find duplicate values.

In some cases, we want to show this SKU value on product details page, It will be very easy if you know this way:


  1. Find this file on your hosting in order to edit it: <your_site>/components/com_virtuemart/views/productdetails/tmpl/default.php
  2. Choice position you want to show SKU and add this code:
    <?php // Product SKU     ?>
        <h1>
        <?php echo 'SKU: '?>
        <?php echo $this->product->product_sku ?>
        </h1>
  3. You don't need use tag <h1>.
Demo:

Before



After

7 comments:

  1. Nice job, thank you very much, it worked like magic.

    ReplyDelete
  2. This works great in product page. how about modules? like random product? how can we display also there sku?

    ReplyDelete
  3. This works great in product page. how about modules? like random product? how can we display also there sku?

    ReplyDelete
  4. Preciso de colocar o SKU do produto no carrinho de compras, e não vou colocar o nome do produto.

    Alguém de uma boa dica ??

    ReplyDelete
  5. Great post! Thank you so much for sharing this well defined to show SKU of product in Virtuemart.

    ReplyDelete