August 23, 201319:48 Create a Country Drop Down in the Magento Admin Magento | Uncategorized <?php $fieldset->addField(‘country’, ‘select’, array( ‘name’ => ‘country’, ‘label’ => ‘Country’, ‘values’ => Mage::getModel (‘adminhtml/system_config_source_country’) ->toOptionArray(), ));?> Read more
August 23, 201319:47 Create a Country Drop Down in the Frontend of Magento Magento | Uncategorized <?php$_countries= Mage::getResourceModel(‘directory/country_collection’) ->loadData() ->toOptionArray(false) ?><?php if (count($_countries) > 0): ?> <select name=”country” id=”country”> <option value=””>– Please Select –</option> <?php foreach($_countries as… Read more
August 23, 201319:47 Get An Array of Country Names/Codes in Magento Magento | Uncategorized <?php$countryList = Mage::getResourceModel (‘directory/country_collection’) ->loadData() ->toOptionArray(false); echo ‘<pre>’; print_r( $countryList); exit(‘</pre>’);?> Read more
August 23, 201319:44 Category Navigation Listings in Magento Magento | Uncategorized <div id=”leftnav”><?php $helper = $this->helper(‘catalog/category’) ?><?php $categories = $this->getStoreCategories() ?><?php if (count($categories) > 0): ?><ul id=”leftnav-tree” class=”level0″><?php foreach($categories as $category):… Read more
August 23, 201319:44 $_GET, $_POST & $_REQUEST Variables Magento | Uncategorized <?php// $_GET$productId = Mage::app()->getRequest()->getParam(‘product_id’);// The second parameter to getParam allows you to// set a default value //which is returned if… Read more
August 23, 201319:44 Debug using zend Magento | Uncategorized <?php echo Zend_Debug::dump($thing_to_debug, ‘debug’); ?> Read more