`
cgzhang
  • 浏览: 73590 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

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!
0
2
分享到:
评论

相关推荐

    Linux for Beginners: An Introduction to the Linux Operating System

    How to customize your shell prompt. How to be efficient at the command line by using aliases, tab completion, and your shell history. How to schedule and automate jobs using cron. How to switch ...

    ENOVIA-Development-How to customize Unified Typing.pptx

    PLM ENOVIA-Development开发手册-2

    matplotlib Plotting Cookbook: Learn how to create professional scientific plots

    You will learn about the basic plots, how to customize them, and combine them to make sophisticated figures. Along with basic plots, you will also learn to make professional scientific plots.

    VCL Layout Control - How to Create and Customize a Simple Layout

    VCL Layout Control - How to Create and Customize a Simple Layout [720p]

    Professional Microsoft Windows Embedded CE 6.0

    This book is for developers who are interested in learning what resources are available as part of the Windows Embedded CE tool chains and how to use them. A basic understanding of Visual C++, C#, or ...

    learning unreal engine game development

    Chapter 6, A Particle System and Sound, explains how to add visual and sound effects to your level. Chapter 7, Terrain and Cinematics, shows you how to add the final touches to your level using ...

    ASP.NET 3.5 CMS Development

    You will learn how to build your site and see the different ways in which you can customize your code to fit your needs. With this book in hand, you can easily set up users and groups, create ...

    Unity AI Programming Essentials

    We have a section dedicated to NavMesh, one of the most important aspects of pathfinding, that will show you how to customize the mesh generation to handle different use cases for different ...

    Introduction to Matplotlib.rar

    DataCamp上面Introduction to Matplotlib课程的讲义,介绍如下: ... You will learn how to create visualizations for different kinds of data and how to customize, automate, and share these visualizations.

    Unity.AI.Programming.Essentials

    We have a section dedicated to NavMesh, one of the most important aspects of pathfinding, that will show you how to customize the mesh generation to handle different use cases for different ...

    Akka.in.Action.2016.9.pdf

    You’ll also find a tutorial on building streaming applications using akka-stream and akka-http. Finally, you’ll get practical advice on how to customize and extend your Akka system.

    Gradle.Dependency.Management.1784392782

    Learn how to use Gradle's powerful dependency management through extensive code samples, and discover how to define, customize, and deploy dependencies About This Book Be in total control of your ...

    VB与SAS整合使用

    customize reports as they are run. The system allows the user to easily select many different parameters to be used to create a report without changing a single line of the SAS code in each report. ...

    Moodle.3.Administration.3rd.Edition.1783289716

    This book concentrates on basic tasks such as how to set up and configure Moodle and how to perform day-to-day administration activities, and progresses on to more advanced topics that show you how to...

    Extending Bootstrap PDF

    Chapter 6, Adapting Bootstrap JavaScript Plugins, shows you how to customize and extend Bootstrap JavaScript plugins to do more. Chapter 7, Custom Grids, teaches you how to customize the grid in ...

    Gradle for Android

    About This Book, Create custom Gradle tasks and plugins ... By the end of this book, you will be able to customize the entire build process, and create your own tasks and plugins for your Gradle builds.

    CoreOS Essentials(PACKT,2015)

    Learn how to manage clusters, read system logs, and customize with cloud-config. You will set up the deployment to production using Docker builder and a private Docker registry. You will also see how...

    Build Your Own PaaS with Docker(PACKT,2015)

    This book walks you through a use case project that will teach you how to customize and create your own Docker image, allowing you to run any platform you want. The project evolves throughout the book...

Global site tag (gtag.js) - Google Analytics