Hey there.
When i go to my product page for specified item, i get desplayed "In stock" or "Out of stock". How is it possible, to display the number of items in stock, so that display would be like:
Stock: 50
Thanks
Edit product controller
Open file
find
add before
open file
find
replace
Open file
Code: Select all
catalog/controller/product/product.php
Code: Select all
if ($product_info['quantity'] <= 0) {
Code: Select all
$data['number_stock'] = $product_info['quantity']
Code: Select all
catalog\view\theme\your theme\template\product\product.tpl
Code: Select all
<?php echo $stock; ?>
Code: Select all
<?php echo $number_stock;?>
News CMS || Plus SEO || Live Price change with Option Select
Thank you, it works perfect!jimmyphong wrote:Edit product controller
Open filefindCode: Select all
catalog/controller/product/product.php
add beforeCode: Select all
if ($product_info['quantity'] <= 0) {
open fileCode: Select all
$data['number_stock'] = $product_info['quantity']
findCode: Select all
catalog\view\theme\your theme\template\product\product.tpl
replaceCode: Select all
<?php echo $stock; ?>
Code: Select all
<?php echo $number_stock;?>
@jimmyphong, you just forgot to add the ';'
$data['number_stock'] = $product_info['quantity']
to make it look like;
$data['number_stock'] = $product_info['quantity'];
I created a free little VqMod for this, to match OpenCart v.1.5.6.x - v.2.x Versions
---
OpenCart v.2.x VqMod, tested here:
http://www.jti.li/shop/index.php?route= ... duct_id=29
OpenCart v.1.5.6.5_rc VqMod, tested here:
http://www.openshop.li/cart/index.php?r ... ct_id=4936
Display Stock on Product Page VqMod Extension Download Link:
http://www.opencart.com/index.php?route ... n_id=25260
Good Luck
Ernie
$data['number_stock'] = $product_info['quantity']
to make it look like;
$data['number_stock'] = $product_info['quantity'];
I created a free little VqMod for this, to match OpenCart v.1.5.6.x - v.2.x Versions
---
OpenCart v.2.x VqMod, tested here:
http://www.jti.li/shop/index.php?route= ... duct_id=29
OpenCart v.1.5.6.5_rc VqMod, tested here:
http://www.openshop.li/cart/index.php?r ... ct_id=4936
Display Stock on Product Page VqMod Extension Download Link:
http://www.opencart.com/index.php?route ... n_id=25260
Good Luck
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 133 guests