Magento-simplified and slim magento version

Source: Internet
Author: User

20101005 Note: at present, the magento online stores with more than 1000 products can reach a speed of 4-7/s.

20101104 Note: There are a lot of people trying to do this, but please be careful not to test it on the website in operation. I will continue to update it.

 

Test Tools: pagespeed, pingdom, and firebug.

Note: If you try, do not use a system test in use. all the methods mentioned below are being tested and improved. I am not responsible for any questions caused by tests and do not answer relevant questions. it's just a record.

 

Magento is very powerful, but we basically don't need most of the functions, such as many foreign payment modules and freight modules. do not simply close it in the background. based on the latest version of Magneto code, I tried to customize a simplified version. here are my steps:

 

1. Disable the following modules from the background, save and clear the cache to test the functions. No problems have been found.

Mage_adminnotification
Mage_api
Mage_bundle
Mage_centinel
Mage_downloadable
Mage_giftmessage

Mage_tax

(Although the catalog module does not depend on the two modules, that is, there is no problem at the front-end, but it will be used when editing the product. Therefore, you can disable it after the product is launched. If you are patient, you can modify the background template and delete the references to the blocks and related models of the two modules .)
Mage_googlebase
Mage_googlecheckout
Mage_googleoptimizer
Mage_install
Mage_paypaluk

Mage_poll

Mage_usa

Phoenix_moneybookers

 

2. Modify the module configuration file and completely close the module. This function is not only to reduce the analysis of these files, but also to load the layout files corresponding to these modules.

 

Go to the app/etc/modules directory and delete the configuration files of the following modules.

 

Mage_api.xml, mage_bundle.xml, mage_centinel.xml, mage_downloadable.xml, mage_weee.xml, phoenix_moneybookers.xml

 

Edit mage_all.xml to completely close these modules:

 

Mage_adminnotification
Mage_api
Mage_bundle
Mage_centinel
Mage_downloadable
Mage_giftmessage
Mage_googlebase
Mage_googlecheckout
Mage_googleoptimizer
Mage_install
Mage_paypaluk

Mage_poll

Mage_usa

Modify APP/etc/local. XML to disable modules in the local code pool.

After the cache is cleared, test the functions.

3. Clear page. xml. I deleted most of the JS files and only kept them.

 

<Action method = "addjs"> <SCRIPT> prototype/prototype. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> prototype/validation. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> varien/JS. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> varien/form. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> varien/menu. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> mage/cookies. js </SCRIPT> </Action>

 

Cleared:

<Action method = "addjs" ifconfig = "DEV/JS/deprecation"> <SCRIPT> prototype/deprecation. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> lib/ccard. js </SCRIPT> </Action>

<Action method = "addjs"> <SCRIPT> scriptaculous/builder. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> scriptaculous/effects. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> scriptaculous/dragdrop. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> scriptaculous/controls. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> scriptaculous/slider. js </SCRIPT> </Action>
<Action method = "addjs"> <SCRIPT> mage/translate. js </SCRIPT> </Action>

 

<Block type = "Page/html_notices" name = "global_notices" as = "global_notices" template = "Page/html/notices. phtml"/>

You also need to delete the call to traslate and global notice in the corresponding template file (involving head. phtml, Master template file [1column. pthml, 2column-left.phtml. In addition, magento's Mini Search form block Ajax search AutoComplete depends on scriptaculous control. JS, So if you remove this file, you will not have the Ajax search autocomplte function, and you also need to clear other corresponding template files. I think this function is basically not very important. Note: Clear related layout settings based on your actual situation. In addition, you can also consider loading prototype. js and other related files from CDN (such as Google. To get a better speed. For example, in magento 1.4.1.1, the prototype. js version used is 1.6.0.3. You can delete the call and add the following directly to head. phtml:

<SCRIPT type = "text/JavaScript" src = "http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"> </SCRIPT>

 

Other cleanup blocks:

<Block type = "Page/switch" name = "store_language" as = "store_language" template = "Page/switch/ages. phtml"/>

[Header. phtml]

<? PHP echo $ this-> getchildhtml ('store _ language')?>

<Block type = "Page/switch" name = "store_switcher" as = "store_switcher" template = "Page/switch/stores. phtml"/>

[Footer. phtml]

<? PHP echo $ this-> getchildhtml ('store _ switcher ')?>

 

 

4. clear useless blocks of the catalog module. of course, this refers to most of the features that are usually not used. magento has several types of products, but we usually use simple. Therefore, we can clear layout settings related to all other product types. (clear all retriable, grouped, and invalid UL)


5. Clear useless payment modules. This is done in other previous steps, such as clearing the Google Checkout module. This step is normal in the latest version, but there is a problem in the version upgraded from the old version. If you just close it, the front-end onepage Checkout will appear:

Fatal Error: Call to a member function setstore () on a non-object inAPP/code/CORE/MAGE/payment/helper/data. phpOn Line72

It is not difficult to solve this problem. In the core_config_data table of the database, delete the corresponding configuration options and clear the cache.

 

Note: test implementation is what I think, and record what I do.

6. magento is the most important and core product module, including the category list page and product view page. List page, I think we can consider whether to cancel one of the list/GRID modes based on the actual situation. Only one type is retained, and only two options are left for the number of products displayed on each page, one is n on each page, and the other is all. Do not mention this toolbar. I don't know if it is visible to the naked eye to reduce the time saved by a block, but it will definitely decrease, at least it will reduce unnecessary calls. Remove multiple blocks.

End...

 

7. I do not use multiple shipping ADDR. Close all related blocks and clear layout and template files.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.