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()); }
By default, Magento returns XML format when you try to access REST API resources. For example : You try to access REST url to get product’s information of this site : http://localhost/magento/api/rest/products It will return in XML format.But some cases, other developers want you to send them JSON format instead of XML….
There are many problems when you’re working with configurable products. One of annoying issue was we forgot to make associated simple products inherit parent product categories. And of course, It will take us a lot of time to accomplish it manually. Therefore, I wrote scripts for this task. You can…
There is official documentation. This guide assumes you already have a functioning LAMP-stack with the minimum Magento 2 requirements (5.4X<=PHP<=5.5.X & >= MySQL 5.6.X). There are five steps to complete install magento 2 on window : 1. Install Composer on Window Download and run Composer-Setup.exe – it will install the…
Update : From magento 1.9 , it’s not allowed to call cron.php directly via http. So you could change command : curl -s -o /dev/null http://your-domain.com/cron.php to /bin/sh/YOUR_WEBSITE_DIRECTORY/public_html/cron.sh There are many Magento tutorials guiding how to set up a cron job in Magento. But I like to post this tutorial for…
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(); }
SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in ‘(`DB`.`tag_summary`.`products` – 1)’ Magento Version 1.9.0.1 Project Fix: I recently had to resolve this issue for a customer, and since it was quite easy to fix, I figured I’d share with all you developer and do…
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…
Recently, I have worked with magento site which supports multiple languages. Unfortunately, somethings went wrong with label of attribute in configurable products. It always is displayed the label of default admin label. It does not make sense. As I figured out this is a bug of magento ( I currently…
Latest update: You can check and download my new sample extension at here : Thienphucvx_sample It includes: – Work well with latest magento 2 version. – Setup and install sample data for simple blog database – Sending a request and create new blog post. – It also includes cache tags…