Playing with Attribute Set in Magento

Introduction An attribute set is a collection of attributes which can be created/edited from Catalog -> Manage Attribute Sets in the backend. Some useful snippets regarding Attribute Set. 1> Getting Attribute Set Details $attributeSetModel = Mage::getModel(‘eav/entity_attribute_set’); $attributeSetId = 9; // or $_product->getAttributeSetId(); if you are using product model $attributeSetModel->load($attributeSetId); print_r($attributeSetModel->getData()); 2> Getting Attribute Set Id …

Read more

Setting custom environment variables using .htaccess

If you are familiar with Magento, esp with setting up multiple websites/stores using .htaccess then you may have encountered variables like: MAGE_RUN_CODE & MAGE_RUN_TYPE. Yes they are the custom environment variables. In order to set up custom environment variables using .htaccess, try as follows: RewriteRule ^ – [E=MAGE_RUN_CODE:default] RewriteRule ^ – [E=MAGE_RUN_TYPE:store] Where MAGE_RUN_CODE & …

Read more

Magento CheatSheet

I have been using this great cheat-sheet from my initial days of Magento development. Hope you will find this useful too. Download CheatSheet Thanks Vinai for providing this great cheatsheet for Magento Developer. Cheers!!

Usage of ob_start() in fixing one-page checkout issues

One page checkout steps are so sensitive that even a single character echoed from anywhere (due to some mistakes or PHP errors) will make your checkout steps not working. I just recently faced one issue: One-page checkout was not redirecting to order confirmation page after clicking on Place Order button (Review Page). When I checked …

Read more