How to customize Magento as CMS system (1.5.0 CE)
Before install:
- Go to app/etc/modules, edit Mage_All.xml, only set the following modules active. Mage_Core Mage_Eav Mage_Page Mage_Install Mage_Admin Mage_Adminhtml Mage_Cron Mage_Directory (need by customer module and system country option) Mage_Customer Mage_Log Mage_Backup Mage_Poll Mage_Rating Mage_Cms Mage_Newsletter Mage_GoogleAnalytics Mage_Media Mage_Contacts Mage_Dataflow (need by customer)
2.Only keep the following modules (set others as inactive) Mage_Api.xml Mage_Compile.xml Mage_Connect.xml Mage_PageCache.xml Mage_Widget.xml
- Install Magento as normal, if success, there will be 110 tables...(less) 4.Go to Magento backend, will throw errors because admin dashboard uses some features of sales (order, product, etc). Rewrite Mage_Adminhtml_Block_Dashboard rewrite the construct and _prepareLayout
public function __construct() { parent::__construct(); //set to different template $this->setTemplate('cmsdashboard/index.phtml');
}
protected function _prepareLayout() { //nothing } 5.Widget not work, need rewrite. In Mage/Widget/Model/Widget/Instance.php,remove or comment the following code: 76-79 /*foreach (Mage_Catalog_Model_Product_Type::getTypes() as $typeId => $type) { $this->_layoutHandles[$typeId.'_products'] = str_replace('{{TYPE}}', $typeId, self::PRODUCT_TYPE_LAYOUT_HANDLE) ; $this->_specificEntitiesLayoutHandles[$typeId.'_products'] = self::SINGLE_PRODUCT_LAYOUT_HANLDE;
In Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php comment or remove 155-181
/$options[] = array( 'label' => Mage::helper('widget')->('Categories'), 'value' => array( array( 'value' => 'anchor_categories', 'label' => Mage::helper('widget')->('Anchor Categories') ), array( 'value' => 'notanchor_categories', 'label' => Mage::helper('widget')->('Non-Anchor Categories') ) ) ); foreach (Mage_Catalog_Model_Product_Type::getTypes() as $typeId => $type) { $productsOptions[] = array( 'value' => $typeId.'_products', 'label' => $type['label'] ); } array_unshift($productsOptions, array( 'value' => 'all_products', 'label' => Mage::helper('widget')->('All Product Types') )); $options[] = array( 'label' => Mage::helper('widget')->__('Products'), 'value' => $productsOptions );/
}*/
Done! Enjoy!