Magento: How to set a product to be in/out of stock programatically

$product = Mage::getModel('catalog/product')->load( 'id' );

$stockItem = $product->getStockItem();
$stockItem->setData('manage_stock', 1);
$stockItem->setData('is_in_stock', 0);
$stockItem->setData('use_config_notify_stock_qty', 0);
$stockItem->setData('qty', 0);

1 Bình luận

  1. online_cialis nói:

    The websites for online cialis and see if CIALIS is not as jilted.

Trở về
  • HTML5 Canvas
  • HTML5 Canvas

     The <canvas> element is used to draw graphics, on the fly, on a web page. Draw a red rectangle, a gradient rectangle,...