How do I change the status color of the product page using warehouse_state? Now I take from a quantity of products - a product with 0 pieces is red. As of this week, I have products with quantity 5 and status "expected", I want the color to be orange. And products with quantity 5 and status "In stock" - green color. How do I get stock_status_id from the database?
You could use such free extension: https://www.opencart.com/index.php?rout ... n_id=34669
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
You can use opencart extensions like the following to show out of stock status in frontend.
https://www.opencart.com/index.php?rout ... n_id=40263

https://www.opencart.com/index.php?rout ... n_id=40263

----------------
Download - Out of Stock Module
You can get this by the following code
catalog/controller/product//product.php
$product_info = $this->model_catalog_product->getProduct($product_id);
to get the product status - $product_info['stock_status']
to get the product quantity - $product_info['quantity']
catalog/controller/product//product.php
$product_info = $this->model_catalog_product->getProduct($product_id);
to get the product status - $product_info['stock_status']
to get the product quantity - $product_info['quantity']
----------------
Download - Out of Stock Module
Or, you could create an event since the $data['product_id'] can still be pulled.
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 7 guests