How can I override the local module in Magento?

There are many examples of how to override the main module in Magento, but how to override the local module?

+3
source share
1 answer

You do not redefine the module, you redefine (or, more correctly, rewritesee below) the class belonging to the module, or belong to the shared folder lib.

Based on your wording, I assume that you will redefine the meaning of "take a class from app/code/core/" and placing it in " app/code/local/"? If this is the case, then basically you cannot. Code pools work because magento adds four paths to the PHP enable path.

app/code/local
app/code/community
app/code/core
lib

Then when the autoloader says

include('Mage/Module/Path/To/File.php');

local, community, , , lib. local .

- , , . , Core, . , , , / , , .

+7

Source: https://habr.com/ru/post/1788431/


All Articles