I’m using two different Magento modules, say
Second_Module which override the same class. I would like to combine their functionality.
My assumption was that I could extend the duplicate class from
First_Module from the same class in
Second_Module which in turn extends the original class.
I would guess that to do this,
First_Module should depend on
Second_Module, so I added to the module’s config
I would expect now the configuration loader to load
Second_Module first and that its no longer valid tag for the duplicate class would be overridden by the same statement in the config of
First_Module. But this doesn’t seem to be the case. The first
rewrite seems to be used.
Am I doing/understanding something wrong or is this just how it works? Maybe I should just remove the rewrite from the second module from the config (which I rather not do to keep it as original as possible).
Thanks in advance.