How to customize Magento as CMS system (1.5.0 CE)

Before install:
1. 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

3. 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!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值