Saturday, March 24, 2012

Magento Tutorial

Click Here to go to Treasure of magento
Magento Tutorial

Magento : Get store Admin Email Address and Name

 Magento : Get store Admin Email Address and Name

$from_email = Mage::getStoreConfig('trans_email/ident_general/email'); //fetch sender email Admin
$from_name = Mage::getStoreConfig('trans_email/ident_general/name'); //fetch sender name Admin

Magento : Set Custom Theme in Controller for a particular Page

  Magento : Set Custom Theme in Controller
Open the corresponding controller and the action in that controller from where the layout is loaded.
Put the below code and you shall see your custom theme applied on that particular page.
public function indexAction() //It can be any action from where your layout is called
   {
          ..
          ..
              Mage::getDesign()->setTheme('Your theme name');   /* This is the code you need to put */               
               $this->loadLayout();                        
               $this->renderLayout();

       }