News:

Support the VirtueMart project and become a member

Main Menu

Related Products -> Stock Level

Started by Ventsi Genchev, November 11, 2017, 13:54:53 PM

Previous topic - Next topic

Ventsi Genchev

Hello,

I'm trying to show an stock level indicator for related products.
For this purpose, I add the following to the related.php:
<?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.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English