Currently browsing category

Magento Code Examples

Magento – Programmatically insert new attribute option

magento add attribute options programmaticallymagento create attribute programmaticallymagento add image label programaticallymagento add attribute option programmaticallymagento add attribute programmaticallyWell, adding new attribute option from code seems to be easy at first. But in fact, it took me sometime to find out a solution. The main problem is that we need …

Magento – Format Price with Currency

magento format pricemagento price formatWhen you fetch product data, you get the price as integer. Now, you must display the price with currency suffix. You can do this with the following code:- // let $_finalPrice be the integer price fetched $formattedPrice = Mage::helper(‘core’)->currency($_finalPrice,true,false); Looking for improvement for your Magento Store? Facebook …

Saving Product very slow in Magento (solved)

magento save product slowmagento product save slowmagento saving products very slowmagento slow product saveI have met problem saving product in Magento, it takes very long time to finish one product. After an hour searching and I found a solution to solve this problem. Instead of saving all magento product attribute we …