$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('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);

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.


hmm if the product edit at admin panel showing you right result

then I am pretty sure that this issue is related to re-indexing

go to System->IndexManagment and do reindexing

and then check your problem will be gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.