Author Topic: Related Products -> Stock Level  (Read 63 times)

Venci Gentchev

  • Jr. Member
  • **
  • Posts: 153
    • Bulgarian Computer Store
Related Products -> Stock Level
« on: November 11, 2017, 13:54:53 pm »
Hello,

I'm trying to show an stock level indicator for related products.
For this purpose, I add the following to the related.php:
Code: [Select]
<?php 
if ( VmConfig::get ('display_stock'1)) { ?>

 <span class="vmicon vm2-<?php echo $related->stock->stock_level ?>" title="<?php echo $related->stock->stock_tip ?>"></span>
<?php 
echo shopFunctionsF::renderVmSubLayout('stockhandle',array('product'=>$related));
?>

So far - I see the availability text. But the indicator I'm adding does not work because the $related->stock->stock_level does not return any value. Like the $product->stock->stock_level too.
Does anyone can help with an idea? Thanks in advance.
No pain, no gain, no site!