I had a bit of help from this forum, so thought I would give back
This is to add the product stock status to the category page in version 1.4.7
Open Catalog/Controller/Product/Category.php
Find
Code: Select all
if ($special) {
$special = $this->currency->format($this->tax->calculate($special, $result['tax_class_id'], $this->config->get('config_tax')));
}
}
Code: Select all
$product_info = $this->model_catalog_product->getProduct($result['product_id']);
if ($product_info['quantity'] <= 0) {
$this->data['stock'] = $product_info['stock'];
} else {
if ($this->config->get('config_stock_display')) {
$this->data['stock'] = $product_info['quantity'];
} else {
$this->data['stock'] = $this->language->get('text_instock');
}
}
Code: Select all
'special' => $special,
Code: Select all
'stock' => $this->data['stock'],
add to the list:
Code: Select all
$_['text_instock'] = 'In Stock';
And add the following code to wherever you want it displayed:
Code: Select all
<?php echo $products[$j]['stock']; ?>
Example of this on a live site is http://www.dollworld.co.nz/shop
And after all that someone is going to tell me its actually a feature you can now turn on/off in admin - buy even if that is the case maybe this would help older versions as well??
As always use at your own will and always back up first