Skip to main content

Posts

Showing posts from 2014

Magento-local.xml-Template

<?xml version="1.0"?> <layout>         <!-- Add/Remove Items From Head -->     <default translate="label" module="page">     <reference name="head">         <!-- Add Javascript File -->                 <action method="addItem">         <type>skin_js</type>         <name>js/jquery.js</name>         <params/>         </action>         <!-- Add CSS File -->         <action method="addCss">         <stylesheet>css/local.css</stylesheet>         </action>         </reference>         </default>                 <!-- Default layout, loads most of the pages -->         <default>                     <!-- Add Custom Block     <reference name="root">       <block type="core/template" before="-" name="my_block" as="my_block" template="path/to

Remove Category option from Layered Navigation options list in magnto

This is about how to remove the category from the layered navgation Please open to app/design/frontend/default/default/template/catalog/layer and open up view.phtml for edit.  < dl id = "narrow-by-list" > <?php $_filters  =  $this -> getFilters ()  ?> <?php  foreach ( $_filters  as  $_filter ):  ?>  <?php  if( $_filter -> getItemsCount ()):  ?> <?php  if( $_filter -> getName () !=  "Category" ) { ?> < dt > <?php  echo  $this -> __ ( $_filter -> getName ())  ?> </ dt > < dd > <?php  echo  $_filter -> getHtml ()  ?> </ dd > <?php }  endif;  ?> <?php  endforeach;  ?> </ dl >

Magento: get skin url, get media url, get base url, get store url

To Retrieve URL path in STATIC BLOCK To get SKIN URL {{skin url='images/sampleimage.jpg'}} To get Media URL {{media url='/sampleimage.jpg'}} To get Store URL {{store url='mypage.html'}} To get Base URL {{base url='yourstore/mypage.html'}} TO Retrieve URL path in PHTML Note: In editing PHTML don't forget to enclode the following code with PHP tag Not secure Skin URL: <?php echo $this->getSkinUrl('images/sampleimage.jpg') ?> Secure Skin URL <?php echo $this->getSkinUrl('images/ sampleimage.gif', array('_secure'=>true)) ?> Get  Current URL $current_url = Mage::helper('core/url')->getCurrentUrl(); Get Home URL $home_url = Mage::helper('core/url')->getHomeUrl(); Get Magento Media Url Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); Get Magento Media Url Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); Get Magento Skin Url Mage::getBaseUrl(Mage_Co

SMTP settings for Magento / Magento Send Email using smtp

If you want to send emails with Magento you need to configure it to use an SMTP server – that is, the outgoing server that takes care of delivering your messages. magento to use SMTP instead of the usual mail function, you need to take the below steps. - Login to magento admin and go to. System->Configuration->Advanced->System->Mail Sending Settings - Now here set the host value to your smtp host name like mail.domain.com - And then the default port is 25. - Now you need to change magento file. Do not edit the core file as you will loose your change in an upgrade. - So copy this file app/code/core/Mage/core/Model/Email/Template.php in to your local, by creating the same folder structure. - Enable that module. - Then in Template.php you will have to change the getMail() function as below. public function getMail()     {         if (is_null($this->_mail)) {             /* changes begin */            $my_smtp_host = Mage::getStoreConfig('system/s