how to save quantity in magento

Jul 4, 2011   //   by kdecom   //   magento  //  No Comments
Hiya to all,

Last night i was working on one of my magento extension and i need to update the quantity of the product.


Because i want already got a product id in my post request.

$productId = $this->getRequest()->getParam(‘id’);
$qty = $this->getRequest()->getParam(‘qty’
$stockModel = Mage::getModel(‘cataloginventory/stock_item’)->loadByProduct($productId);


And that’s it.

Keep Smiling

Leave a comment