Using Magento header/footer outside of Magento

If you want to include the header and footer of Magento outside of it, say for example for third-party cms/application then you can use the following trick. Step 1: Using Magento Code outside of Magento <?php /** * @author MagePsycho <[email protected]> * @website https://www.magepsycho.com * @category using Header / Footer outside of Magento */ $mageFilename …

Read more

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

Magento utility function: How to easily create a select box for drop-down attributes?

From now onward I will be sharing custom utility functions on a regular basis which will make your programming life easier to some extent at least in case of Magento ๐Ÿ™‚ Here I am going to share a utility function which will help you to create a select box for drop-down attributes(manufacturer, color, size, etc.) …

Read more

printing xml of System > Configuration settings in Magento

Magento uses system.xml(app/code/[codePool]/[namespace]/[module]/etc/) for defining configuration section (System > Configuration) in backend. It searches for the file(system.xml) in each module’s /etc folder and merge all those during parsing process. Here i am going to share the code for printing the XML as a result of merging system.xml from all active Magento modules. Code: <?php $mageFilename …

Read more