If the stock is above 5 items to show their status: More than 5 items
Hello, I have a question. How do I set the following:
If the stock is above 5 items to show their status: More than 5 items
If the stock is less than 5 to show the amount remaining 5, 4, 3, 2, 1
If there are no items to show their status: Out of stock
I tried to modify the php code but I'm not a good programmer, there must be something changed, right?
Code: Select all
<add><![CDATA[if ($product_total != 0) {
if ($result['quantity'] <= 0) {
$rstock = $result['stock_status'];
} elseif ($this->config->get('config_stock_display')) {
$rstock = $result['quantity'];
} else {
$rstock = $this->language->get('pds_instock');
}}]]></add>
Thanks