Set Magento website template, skin and layout programmatically

$groups['theme']['fields']['template']['value'] = 'template_name';
$groups['theme']['fields']['skin']['value'] = 'skin_name';
$groups['theme']['fields']['layout']['value'] = 'layout_name';
$groups['theme']['fields']['default']['value'] = 'template_name';
Mage::getModel('adminhtml/config_data')  
      ->setSection('design')  
      ->setWebsite('your_website')  
      ->setGroups($groups)  
      ->save(); 

Alternate method:

$installer->setConfigData('design/theme/template', 'facebook', 'stores', $store->getId());
$installer->setConfigData('design/theme/skin', 'facebook', 'stores', $store->getId());
$installer->setConfigData('design/theme/layout', 'facebook', 'stores', $store->getId());
$installer->setConfigData('design/theme/default', 'facebook', 'stores', $store->getId());

Magento: Add radio/checkbox custom column in Admin Grid

Magento grids are very useful for displaying/filtering and sorting data. Their flexibility is endless, you can customize them in any way. One may want to add a new radio button or checkbox column for rapid marking.
Continue reading “Magento: Add radio/checkbox custom column in Admin Grid”