Get all configured rates of the tablerate shipping module

Get all configured rates of the tablerate shipping module : $tablerateColl = Mage::getResourceModel(‘shipping/carrier_tablerate_collection’); /* @var $tablerateColl Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection */ foreach ($tablerateColl as $tablerate) { /* @var $tablerate Mage_Shipping_Model_Carrier_Tablerate */ Zend_Debug::dump($tablerate->debug()); }  

Update stock item quantity for a product in magento

Here is the useful code for a purpose : update stock item quantity for a product in magento: $product = Mage::getModel(‘catalog/product’)->load($productId); if ($product){ if (!($stockItem = $product->getStockItem())) { $stockItem = Mage::getModel(‘cataloginventory/stock_item’); $stockItem->assignProduct($product); } $stockItem->setData(‘qty’,intval($qty)) ->setData(‘is_in_stock’, intval($qty) > 0 ? 1 : 0) ->setData(‘manage_stock’, 1) ->setData(‘use_config_manage_stock’, 0) ->save(); }    

Java For Beginners

After doing some research for learning Java, I summarized some resources which might be useful for other guys. My strategy for learning a programming language is watching tutorials first, then reading books related to it. I/Java Tutorials : 1/Java Tutorial for Complete Beginners This is one of the best free…

Please Add Widget