How to create a local copy of app/code/core/Mage/

Last modified by dd_gi on Fri, June 25, 2010 09:05
Source|Old Revisions  

This is an old revision of the document!


At times you may find that you will see a post in the Magento forums that recommends that you edit a “local” copy of a given Mangento core file such as app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php

The recommendation to edit a local copy of a core file is so that when you upgrade to a new version of Magento the core file you edited will be overwritten and you will lose your changes.

How the local folder works

Core files in the local folder override the same files in the core folder. For example, if you copy app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php to app/code/local/Mage/Catalog/Model/Layer/Filter/Price.php then Magento will use app/code/local/Mage/Catalog/Model/Layer/Filter/Price.php

The complication is that the app/code/local/* folders are not created by default, so if you would attempt to copy the file in an ssh session etc. the copy would fail since the enclosing folders have not been created.

How to create the local folder structure




 

Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs