Webdesigncr3ator

Your Trusted Partner

Tag: Virtuemart 3.0

Adding Sku in category page

$this-> refers to the CURRENT object. AS IN whats in the URL. SO, when you are on the category page , and you use $this-> ITS ONLY going to call information about the current category.

$this->   ON THE product page, calls product variables,

so, on the category page, calling product variables is like this
$product->

Here is what You want
<?php echo $product->product_sku ?>

THEN:
read these two threads, or atleast use them next time
http://forum.virtuemart.net/index.php?topic=97744.0
http://forum.virtuemart.net/index.php?topic=92756.0

How to show stock quantity

Hello,

You could override your category or product details layout to show the products in stock by using some PHP. eg:

for category layout (category/default.php):
<?php echo $product->product_in_stock ?>

for product details layout (productdetails/default.php):
<?php echo $this->product->product_in_stock ?>

Playing with this .. Product Stock

<div class="FlexibleInStock"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_IN_STOCK'); ?></div>
<?php if (VmConfig::get ( 'display_stock', 1 )) { ?>
 <div class="FlexibleInStockLevel">
<?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP'); ?>: (<?php echo $this->product->product_in_stock; ?>)
</div> <?php } ?>

© 2017 Webdesigncr3ator

Theme by Anders NorenUp ↑