I want to disable product on all store views including default values.
I have stores as shown below in the image.
I am disabling the product by getting all stores but by this I am unable to disable the product on default values. How can I disable it on default values.
Solved! Go to Solution.
Hello @dharinee_choubisa
You can disable the products on default values like this
Mage::getModel('catalog/product_status')->updateProductStatus($product_id, 0, Mage_Catalog_Model_Product_Status :: STATUS_DISABLED)
As the store id for default values is set to 0. So, you can update your code like this.
If found my answer useful? Please give Kudos and Accept it as Solution.
Hello @dharinee_choubisa
You can disable the products on default values like this
Mage::getModel('catalog/product_status')->updateProductStatus($product_id, 0, Mage_Catalog_Model_Product_Status :: STATUS_DISABLED)
As the store id for default values is set to 0. So, you can update your code like this.
If found my answer useful? Please give Kudos and Accept it as Solution.