When logged into admin there is an Alarm bell symbol in the top right hand corner of the screen, next to the link to the store and logout buttons.
There is also a number shown which equates to the number of out of stock products you have, counted as quantity = 0
This number of 'Out of Stock' items includes both Enabled and Disabled products - does anyone know how to adjust the code so that it only shows Enabled products with Quantity = 0?
Any help to point me in the right direction would be appreaciated
I'm using OC2.0.3.1
There is also a number shown which equates to the number of out of stock products you have, counted as quantity = 0
This number of 'Out of Stock' items includes both Enabled and Disabled products - does anyone know how to adjust the code so that it only shows Enabled products with Quantity = 0?
Any help to point me in the right direction would be appreaciated
I'm using OC2.0.3.1
In the file admin/controller/common/header.php, find following line:
Now add filter_status=1 there. That means replace above line by following one:
Code: Select all
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_quantity' => 0));
Code: Select all
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_quantity' => 0, 'filter_status' => 1));
XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart
Hi Opencartmart - your instructions worked perfectly - thank you!!
When you click on the number of out of stock items in the header, it takes you to the product page with quantity set as 0.
Is there a way that status would also be set as 'Enabled' when it opens the Product page?
When you click on the number of out of stock items in the header, it takes you to the product page with quantity set as 0.
Is there a way that status would also be set as 'Enabled' when it opens the Product page?
Change following line:
by
Code: Select all
$data['product'] = $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . '&filter_quantity=0', true);
Code: Select all
$data['product'] = $this->url->link('catalog/product', 'token=' . $this->session->data['token'] . '&filter_quantity=0&filter_status=1', true);
XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart
Thanks Opencartmart - worked perfectly also.
Really appreaciate your assistance, and helping me learn
Really appreaciate your assistance, and helping me learn

Glad to help. Thanks
XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart
Who is online
Users browsing this forum: No registered users and 41 guests