VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: smird on March 14, 2013, 09:59:19 am

Title: "Not in stock" phrase in caregory layout for child product
Post by: smird on March 14, 2013, 09:59:19 am
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:
Code: [Select]
<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!