I need to show the current stock status (field "quantity" in table "product") directly on the category page, as well as the "Related Products" carousel.
In other words, I want to show the price AND stock, right in the category, BEFORE clicking on the product itself.
I can directly show <?php echo $product['href']; ?>, <?php echo $product['name']; ?>, <?php echo $product['description']; ?>, <?php echo $product['price']; ?>, and so on - but the moment I add the code <?php echo $product['quantity']; ?>, I get an "Undefined index: quantity" error.
How can I get this to work?
Go over to catalog/controller/product/category.php and find
below that line, add
That should allow you to print the quantity on the category template
Code: Select all
=> $result['product_id']
Code: Select all
'quantity' => $result['quantity'],
That shouldn't be the case if you added it correctly.
Who is online
Users browsing this forum: No registered users and 68 guests