"Not in stock" phrase in caregory layout for child product

Started by smird, March 14, 2013, 09:59:19 AM

Previous topic - Next topic

smird

Dear all, please help)

I use J 2.5.9 and VM 2.0.20

I have made small change to show the "Not in stock" phrase in caregory layout (.\com_virtuemart\category\default.php) without drilling into the product details page. Here it is:
<div class="width100 floatleft center">
<?php
if (!
VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none'
&& (VmConfig::get 'display_stock')) 
&& ($product->product_in_stock==or ($product->product_in_stock-$product->product_ordered)==0)){?>

<div class="paddingtop8">
<span class="stock-level"><?php echo JText::_('COM_VIRTUEMART_NOT_IN_STOCK'); ?></span>
</div>
<?php }?>
</div>



But, my problem is that I do not know, how to do the same thing for child products... So, my question is, does anybody know, how to modify this code to make it work, if non of the child products are on stock?

Any help is highly appriciated!