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

Ventsi Genchev

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

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]
if ( VmConfig::get ('display_stock'1)) { ?>

 <span class="vmicon vm2-<?php echo $related->stock->stock_level ?>" title="<?php echo $related->stock->stock_tip ?>"></span>
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!