After a long search and the inability to extract the solution from the main mage files, I created an attribute that performs the same actions as the status attribute. I named this attribute as Archive (Yes / No). This new attribute will justify the cancellation of the product or not.
Atlast, I am filtering the list of all my products, product information, and the homepage associated with this new Archive attribute only.
I plan to write an MVC action that will change all status products as enabled and at the same time run Archive as yes for status = disabled products. I will share this code soon.
The code
Write a dummy controller that runs the following code when url is called:
public function updateproductsAction() { Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $collectionConfigurable = Mage::getResourceModel('catalog/product_collection') ->addAttributeToFilter('type_id', array('eq' => 'configurable')) ->addAttributeToFilter('entity_id', array('gt' => 0));
Mr_Green
source share