Timeline for How to Override Core Block, Model and controller in Magento2
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 20, 2023 at 8:41 | comment | added | Jitendra Patel | I think without declaring preference in di.xml, It will work but when we run the magento php bin/magento dev:di:info "Magento\Sales\Model\Order\Pdf\Invoice" command it will not list this override core class name in the preference list. | |
Jun 26, 2018 at 10:51 | comment | added | 7ochem |
The trick in Magento 2 is to define a preference in the di.xml . I'm missing this rather essential part in your answer...
|
|
Oct 25, 2017 at 22:12 | comment | added | Max | Is this really the way to go in M2? | |
Jul 31, 2017 at 6:37 | review | Late answers | |||
Jul 31, 2017 at 6:39 | |||||
Jul 31, 2017 at 6:21 | history | answered | Nidhi | CC BY-SA 3.0 |