public function updateproductstausAction(){
$productid=$this->getRequest()->getParam("product_id");
if($this->getRequest()->getParam("val")==0){
// product id which you want to change status;
$storeid=0 ;// your store id 0 is for default store id
Mage::getModel('catalog/product_status')->updateProductStatus($productid, $storeId, Mage_Catalog_Model_Product_Status::STATUS_DISABLED);
}
elseif($this->getRequest()->getParam("val") =='1'){
$storeid=0 ;// your store id 0 is for default store id
Mage::getModel('catalog/product_status')->updateProductStatus($productid, $storeid, Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
}
}
$productid=$this->getRequest()->getParam("product_id");
if($this->getRequest()->getParam("val")==0){
// product id which you want to change status;
$storeid=0 ;// your store id 0 is for default store id
Mage::getModel('catalog/product_status')->updateProductStatus($productid, $storeId, Mage_Catalog_Model_Product_Status::STATUS_DISABLED);
}
elseif($this->getRequest()->getParam("val") =='1'){
$storeid=0 ;// your store id 0 is for default store id
Mage::getModel('catalog/product_status')->updateProductStatus($productid, $storeid, Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
}
}
Comments
Post a Comment