Archive / Magento

RSS feed for this section

Create Customer Attribute in Magento Easily

Share<?php $setup = new Mage_Customer_Model_Entity_Setup(‘core_setup’); $setup->addAttribute(‘customer’, ‘glasses_prescription’, array( ‘type’     => ‘text’, ‘input’    => ‘hidden’, ‘visible’  => false, ‘required’ => false )); if (version_compare(Mage::getVersion(), ‘1.6.0’, ‘<=’)) { $customer = Mage::getModel(‘customer/customer’); $attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId(); $setup->addAttributeToSet(‘customer’, $attrSetId, ‘General’, ‘glasses_prescription’); } ?>

Template Tags for Blog Posts

ShareTag Function get_the_date(); Displays the date of the post. get_the_time(); Displays the time of the post. the_title(); Displays the title of the post. the_permalink(); Displays the permalink (URL) of the post. get_the_author(); Displays the post author’s name. the_author_link(); Displays the URL of the post author’s site.

%d bloggers like this: