Hi,
Since this is a customization question, i shouldn't supposed to provide you a solution, but since it is a simple one; here you go ;)
By default, when the product is out of stock;
It display this:
<span class="ProductDetailsoutofstock">
<?php echo JText::_('COM_VIRTUEMART_CART_PRODUCT_OUT_OF_STOCK'); ?>
</span>
(look at the 71st line in html\com_virtuemart\productdetails\default_addtocart.php)
and change it with this:
<span class="ProductDetailsoutofstock">
In stock(0)
</span>
It will be shown as :
In Stock (0)
This class name: ProductDetailsoutofstock is already set font-color:#ff0000 (red), so you will get what you want.
If the product is in stock and if the "show stock level" option is set to YES (through VM Configuration)
Attachment PastedImage121212103AM.gif not found
It display this:
<div class="FlexibleInStock"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_IN_STOCK'); ?></div>
<?php if (VmConfig::get ( 'display_stock', 1 )) { ?><div class="FlexibleInStockLevel"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP'); ?>: (<?php echo $this->product->product_in_stock; ?>)</div> <?php } ?>
Since the class name: FlexibleInStock is already set to font-color: green, this text will be shown as:
In Stock (1) or
In Stock (11)
So you will get what you want.
Regards.
Forum Support.