The first thing you need to do is get the quantity variable and pass the correct text to the template
edit: catalog/controller/product/category.php
find
Code: Select all
'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',
add after
Code: Select all
'availability' => ($result['quantity']>0?$this->language->get('text_available'):$this->language->get('text_soldout')),
Now you have the availability you can use it in the template file
edit: catalog/view/theme/default/template/product/category.tpl
find
Code: Select all
</div>
<?php } ?>
<?php if ($product['rating']) { ?>
add before
Code: Select all
<?php echo $product['availability']; ?>
and finally create a couple of language defines for 'Available' and 'Sold Out'
edit: catalog/language/english/product/category.php
find
Code: Select all
$_['text_points'] = 'Reward Points:';
add after
Code: Select all
$_['text_available'] = ' (<span style="color:green">Available</span>)';
$_['text_soldout'] = ' (<span style="color:red">Sold Out</span>)';
You will most likely want to do similar for search results page, manufacturers_info page and possibly the product page itself.