Questions tagged [override-model]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
3answers
2k views

I want to override vendor\magento\module-email\Model\AbstractTemplate.php

I want to override method setForcedArea() because I'm using Magento 2.2.4 & whenever I tried to save Content->Configration->Design Configuration->Edit I'm getting following error:- ...
2
votes
1answer
618 views

How to Override 3rd party module requirejs-config.js film in my custom module?

The above one is the 3rd party module's require-config.js. It contains the js file inside the adminhtml/web/js. I want to override that. So I created a custom module and made changes in the require-...
1
vote
2answers
985 views

Magento 2 override Third party module installed with Composer

I have installed the WebShopApps module with composer hence it is installed in the Vendor folder. Now I want to override model in my custom theme. As we know we can't directly modify in vendor folder ...
10
votes
2answers
3k views

How can i override the PriceCurrencyInterface in Magento 2?

In \magento\framework\Pricing\PriceCurrencyInterface, I want to change the constant in that php interface file from this: /** * Default precision */ const DEFAULT_PRECISION = 2; to this: /** * ...
2
votes
1answer
921 views

I want to override model in the Magento 2

I want to override the Magento\Catalog\Model\Layer\Category\FilterableAttributeList model file. I have created the module. This is my di.xml file. <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
1answer
518 views

How to get Gift Message data on Invoice PDF in Backend Sales Order Grid Magento 2?

I am trying to display Gift Message for individual Item on Invoice PDF Admin Backend Sales Order Grid. Below same code is working for me if you open an order from Sales Order Grid for Individual ...
1
vote
1answer
3k views

Magento 2 Override Private method

I am working with the Magento2, as per my requirement i want to override the private function. In Magento\Checkout\Model\DefaultConfigProvider has a method "getCustomerData()" as private one, this ...
1
vote
1answer
684 views

Magento2: How to override customer model file?

I want to override AccountManagement.php in Magento\Customer\Model\AccountManagement.php directory. My di.xml :- <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
0
votes
0answers
40 views

_initSelect override with Plugin in Magento2.4.1

Need a help in this issue. I am trying to remove a MySQL condition from _initSelect from this Collection "Magento\SalesRule\Model\ResourceModel\Rule\Collection". This Collection has the ...
0
votes
1answer
202 views

How to override magento2 product tierprice?

I want to override magento2 product tier price calcualtion logic for price type 'Percentage'. I would like to calculate the percentage amount in my own way. Please let me know which file I have to ...