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

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

read these two threads, or atleast use them next time

How to show stock quantity


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 } ?>

© 2019 Webdesigncr3ator

Theme by Anders NorenUp ↑