cancel
Showing results for 
Search instead for 
Did you mean: 

updated stock programatically but product filter is not working

updated stock programatically but product filter is not working

	$productId = 8378;
		$totalValue = 5;
		
		$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);
		if ($stockItem->getId() > 0 and $stockItem->getManageStock()) {
		$stockItem->setData('manage_stock', 1);
		$stockItem->setData('qty', 11);
		$stockItem->setData('is_in_stock', 1);
		$stockItem->setData('use_config_manage_stock', 1);
		$stockItem->setData('min_sale_qty', 2);
		$stockItem->setData('min_qty', 1);
		$stockItem->setData('min_sale_qty', 1);
		
		$stockItem->setData('use_config_min_sale_qty', 1);
		$stockItem->setData('max_sale_qty', 10);
		$stockItem->setData('use_config_max_sale_qty',1);
		$stockItem->setData('is_qty_decimal', 1);
		$stockItem->setData('backorders', 1);
		$stockItem->setData('use_config_backorders', 1);
		$stockItem->setData('notify_stock_qty', 10);
		$stockItem->setData('use_config_notify_stock_qty', 1);
		$stockItem->save();
		}
   

updated out of stock product to in stock but Amshopby filters left is not working for that product. what is the problem behind it. please help me.

lavlesh kumar shukla