UPDATE`core_config_data`SET`value` = 0WHERE`path` = “dev/debug/template_hints”OR`path` = “dev/debug/template_hints_blocks”;
2013 August
We can simply use the following code // To get the shipping and handling charge on shopping cart page Mage::getSingleton(‘checkout/session’)->getQuote()->getShippingAddress()->getShippingAmount();…
Requirement : Some times you may run into situation where you want to override the core functionality of Magento core…
To create the related product programmatically in Magento <?phpset_time_limit(0);ini_set(‘memory_limit’,’1024M’);require_once ‘../../app/Mage.php’;Mage::app(); $sku=’12345’; //some Sku$product = Mage::getModel(‘catalog/product’)->loadByAttribute(‘sku’,$sku); if($product){$sRelatedProducts = “123456,123”;$aRelatedProducts = explode(‘,’,…
<?php $helper = $this->helper(‘catalog/category’) ?> <?php foreach ($helper->getStoreCategories() as $_category): ?> <a href=”<?php echo Mage::getModel(‘catalog/category’) …
<?php $fieldset->addField(‘country’, ‘select’, array( ‘name’ => ‘country’, ‘label’ => ‘Country’, ‘values’ => Mage::getModel (‘adminhtml/system_config_source_country’) ->toOptionArray(), ));?>
<?php$countryList = Mage::getResourceModel (‘directory/country_collection’) ->loadData() ->toOptionArray(false); echo ‘<pre>’; print_r( $countryList); exit(‘</pre>’);?>
<?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…
<?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…