Hello,
Can anyone give me a solution to add $stock variable on latest module? I want to display total numbers stock in home page.
Thank you !
Add quantity to ../catalog/controller/module/latest.php:
Then in the template add this line wherever you want it:
Code: Select all
$data['products'][] = array(
'product_id' => $result['product_id'],
'thumb' => $image,
'name' => $result['name'],
'description' =>
utf8_substr(strip_tags(html_entity_decode($result['description'],
ENT_QUOTES, 'UTF-8')), 0,
$this->config->get('config_product_description_length')) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'quantity' => $result['quantity'],
'rating' => $rating,
'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']),
);
Then in the template add this line wherever you want it:
Code: Select all
<p>Quantity: <?php echo $product['quantity']; ?></p>
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Who is online
Users browsing this forum: No registered users and 4 guests