Linked Questions

2
votes
1answer
877 views

Override Magento\Framework\Data\Form\Element\AbstractElement.php [duplicate]

I want to override the function getLabelHtml in Magento\Framework\Data\Form\Element\AbstractElement.php I make a copy of this file in my \app\code\CompanyName\ModuleName\Model\Framework\Data\Form\...
1
vote
0answers
38 views

Magento 2 Override Abstract class [duplicate]

I need to override Magento\Payment\Model\Method\AbstractMethod class. because I need to customize getTitle method of this class. I searched in Google all are saying to use plugin but how I could? ...
0
votes
0answers
31 views

Magento 2 : How to override a Abstract Class? [duplicate]

I made some modification related to magento2 order pdf. I want to know how to override a abstract class AbstractPdf extends \Magento\Framework\DataObject
2
votes
2answers
2k views

Override AbstractPdf class in magento2

It is not good way to override core class of Magento. But I have to do this because I am in way that class is abstract and method is protected so I think preference and pluginshould not work. I found ...
15
votes
3answers
2k views

Adding a new method to an Abstract Class in Magento 2

Like this thread said: Override abstract class in Magento 2 in Magento 1, I can just create a full new class. In Magento 2, we should use plugins instead, but plugins only allow me to modified ...
1
vote
3answers
5k views

Magento 2: How to Override Abstract Class for Product Category Indexing Issue?

I have 2000 products which is assigned to multiple categories. When i run php bin/magento indexer:reindex catalog_category_product In catalog_category_product_index total record count is 1700. So ...
3
votes
0answers
859 views

How to override the model class in magento2

i am trying to override \Magento\Payment\Model\Method\AbstractMethod class method assignData method in my custom class but its not working. Model class namespace Vendor\Module\Model; class ...
0
votes
1answer
126 views

proper way to Override the php file in magento 2

I need to override the file Magento\Framework\Search\Adapter\Mysql\Query\Builder\match.php and make the const MINIMAL_CHARACTER_LENGTH = 3; to const MINIMAL_CHARACTER_LENGTH = 1; should I change ...
0
votes
0answers
110 views

How to override abstactclass methods in magento2?

I want to override \Magento\ImportExport\Model\Import\Entity\AbstractEntity's method _saveValidatedBunches. I have tried using preference but it's not working. Can anyone help me
1
vote
1answer
35 views

How can I override controller with module in Magento 2?

I want to override this file vendor/magento/module-sales/Controller/Adminhtml/Shipment/AbstractShipment/View.php So I can change line 49 from setModule('adminhtml') to setModule('adminhtml') Any ...
0
votes
1answer
23 views

Override Magento Ui dataprovider

Anyone can suggest how to override below class Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav.php file
0
votes
1answer
21 views

I want to add one more method same like getUrl method in Vendor/Magento/module-email/Model/AbstractTemplate.php.How we can override?

I want to add one more method same like getUrl method in Vendor/Magento/module-email/Model/AbstractTemplate.php. How can we override in magento2.1.12? If I directly add a new method in Vendor/...
0
votes
0answers
19 views

How to Override abstract class protected function in magento2

In magento2, how to override the abstract class protected method? I have checked the below link but it is not working. Override abstract class in Magento 2 Any help, please?