I am trying to override a Model from a third Party vendor in a custom-theme. The original file was:
I copied that file over to:
and edited the namespace in that file:
Last I created a
/etc/di.xml and set the preference:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="3rdPartyCompany\3rdPartyModule\Model\Formatter\BaseImage" type="Customthemevendor\Customtheme\Model\Formatter\BaseImage" /> </config>
Magento2 doesn't seem to recognize my customization at all. (Basically, there is a resize image function with hardcoded values in the function, that I need to change).
Is the Overriding-process the same for themes and modules or am I missing something?