Snippets with the tag: config

Check if RSS is enabled

Description

Check if RSS is enabled

Code

Mage::getStoreConfig('rss/catalog/category');

Number of products in the sidebar

Description

Get the number of products shown in the sidebar.

Code

Mage::getStoreConfig('checkout/sidebar/count');

Using magento outside magento

Description

Using magento functions outside magento

Code

require_once 'app/Mage.php';
Mage::app($yourStoreCode);
echo Mage::getStoreConfig('general/store_information/name');

Changing the admin theme

Description

Changing the admin theme in local xml

Code


    
        
            
                 
                     yourtheme
                 
            
        
    

Display store contact name and email

Description

Display store contact name and email

Code

// General Contact
$name =  Mage::getStoreConfig('trans_email/ident_general/name'); 
$email = Mage::getStoreConfig('trans_email/ident_general/email');

// Sales Representative
$name =  Mage::getStoreConfig('trans_email/ident_sales/name'); 
$email = Mage::getStoreConfig('trans_email/ident_sales/email');

// Customer Support
$name =  Mage::getStoreConfig('trans_email/ident_support/name'); 
$email = Mage::getStoreConfig('trans_email/ident_support/email');

// Custom Email 1
$name =  Mage::getStoreConfig('trans_email/ident_custom1/name'); 
$email = Mage::getStoreConfig('trans_email/ident_custom1/email');

// Custom Email 2
$name =  Mage::getStoreConfig('trans_email/ident_custom2/name'); 
$email = Mage::getStoreConfig('trans_email/ident_custom2/email');