Questions tagged [overrides]

Questions about overriding core features (class rewrites, local code pool, theme overrides). For URL rewrites, use the "url-rewrite" tag instead.

Filter by
Sorted by
Tagged with
0
votes
1answer
10 views

Magento 2 - How to override module from vendor?

I try to change some "view" files from a module called Amasty_MegaMenu. I installed the module via composer. It is located in vendor\amasty\mega-menu. So I created app/code/Amasty/MegaMenu with ...
0
votes
1answer
18 views

Extending a third party extension how to?

I'm trying to edit a function from a third party extension, in this case, the moloni one. I want to override a function that is in Vendor\moloni\magento2\libraries\MoloniLibrary\Controllers\Products....
0
votes
2answers
31 views

Magento 2 - overriden class extending overriden class not working

I have overriden the class Magento\Catalog\Block\Product\ProductList\Upsell with my own Company\Base\Block\Product\ProductList\Upsell. The class Magento\Catalog\Block\Product\ProductList\Upsell ...
0
votes
0answers
13 views

How to override SimpleProductPrice Model the right way?

I want to override the function executeByDimensions for some reasons. Below is my implementation. <!-- Vendorname/Modulename/etc/di.xml --> <?xml version="1.0"?> <config xmlns:xsi="...
0
votes
2answers
32 views

How to override “/vendor/magento/framework/Mail/Template/TransportBuilder.php”?

I want to override this file : /vendor/magento/framework/Mail/Template/TransportBuilder.php Did anyone know how to override this file. Thank you in advance.
0
votes
2answers
30 views

Unable to override Helper Class in Magento2

I have used below code to override helper class. Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=...
0
votes
1answer
14 views

Magento 2 how to override Magento\Directory\Block\Data using preferences?

This is my code but the block is not overrided My di file : <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
2answers
41 views

Magento 2 cant override the minicart.html file using html

I am going to override the minicart.html file using knockout for my custom code as below at the default file location is : /var/www/html/magento226/pub/static/frontend/Magento/luma/en_US/...
0
votes
1answer
31 views

Magento 2 , After the override model file give an error

I override block file Form.phpof catalog search module all work fine, but when override model file Advanced.php give an error from Form.php Error filtering template: Type Error occurred when creating ...
1
vote
1answer
55 views

Magento 2.3 - Swatches Helper override

I'm trying to override a function in the Helper of the Swatches module of Magento 2. The function resides in the Data.php file. As some of you may know in specific versions of Magento 2 the text ...
4
votes
2answers
34 views

Magento 2: EQP Error Possible useless method

I'm doing EQP of custom module then its shows error as below: Possible useless method overriding detected You can check this screenshot error is on line no. 20 https://nimb.ws/5rfD1n Let me ...
0
votes
1answer
57 views

How to override schema.graphqls file? [closed]

How to override schema.graphqls file of any module? Is there any way to override schema.graphqls file of any module.
0
votes
1answer
40 views

$block is not working in override phtml file

I override totals.phtml, but when I am calling my custom block in it, its not working. File path: Magento/vendor/magento/module-sales/view/adminhtml/templates/order/totals.phtml Override File ...
0
votes
1answer
24 views

How to override a file in root/setup/src/Magento/ in Magento?

I'm working on a solution that requires adding a bit of functionality to the magento installation process. How do I override a file in root/setup/src/Magento/... How would i override setup/src/...
0
votes
0answers
21 views

magento 2 how override Rule\Model\AbstractModel

In my AbstractModel.php I got this: namespace Magewebsys\Modulerule\Model\Rule; abstract class AbstractModel extends \Magento\Rule\Model\AbstractModel { public function beforeSave() { ...
1
vote
1answer
43 views

Change “Add to Cart” Button Text Of Widget Magento 2.3.3

I want to change button text "Add To Cart" To "Some Text" With Custom Condition For Widget... Using Custom Module Create widget :-
6
votes
1answer
70 views

How to override Interface of Other custom module?

I have tried with preference to override interface as below in di.xml file <preference for="Custom\Module\Api\Data\AccountInterface" type="Override\Module\Api\Data\AccountInterface" /> <...
0
votes
1answer
23 views

How do I check my override Model is working?

I wrote an override to \vendor\magento\module-sales\Model\Order\Pdf\AbstractPdf.php I did enable my override, I did run magento setup, di compile and flush the cache. Everything went smooth. But ...
0
votes
1answer
27 views

How to override vendor/Magento/Module-customer/etc/webapi.xml

To prevent spammers to create accounts in Magento 2.2.4. I want to change resource ref= in vendor/Magento/Module-customer/etc/webapi.xml How can I override this core xml ??
1
vote
1answer
43 views

Magento 2: summary.phtml override not working

I am trying to override summary.phtml file so I can change the functionality of the review button which is below product title, ex:'3 reviews' & 'add new review'. File: summary.phtml File Path: ...
0
votes
1answer
42 views

Magento 2 How to override framework feed file?

I am trying to override Magento Framework Feed.php file, After googling alot I found how to override framework file but that's not worked for me. Please give me the right eay to override framework ...
1
vote
0answers
20 views

How do I extend the Grouped Product Block Class?

I have a custom module living in: app/design/frontend/Vendor/Theme/Magento_GroupedProduct Inside that, I've got a Block, layout and a templates folder. I was under the impression that I could ...
2
votes
1answer
43 views

How to add label to street fields in Customer registration in admin panel?

I want to add two more Labels Colony and Area after Street Address.How can I achieve this ?
2
votes
1answer
25 views

Overriding an account feature for editing email/username

I found the element that i want to remove here: vendor/magento/module-customer-custom-attributes/view/frontend/templates/customer/form/edit.phtml I've created a new edit.phtml file here: app/design/...
1
vote
1answer
56 views

how to override the Setup/Patch/Data file in magento2

How to override the core "module-store/Setup/Patch/Data/DisableSid.php" into "app/code/Mymodule/Test/" module. can anyone please help me. Thanks
0
votes
1answer
58 views

Magento 2: Abstract Controller class is not being override

I am trying to override an abstract class vendor/magento/module-sales/Controller/Adminhtml/Order/Create.php using di.xml but it is not working. I need to do some changes in method protected function ...
0
votes
1answer
64 views

How do you override Magento\Catalog\Block\Category\View?

I want to override the protected function _prepareLayout() So i have used preference <preference for="Magento\Catalog\Block\Category\View" type="Module\Name\Block\Category\View"/> class View ...
2
votes
2answers
77 views

How to Override Magento\Sales\Block\Adminhtml\Totals.php?

I want to override Magento\Sales\Block\Adminhtml\Totals this block I did but I don't know what I'm doing wrong. app/code/[Vendor]/[Module]/etc/adminhtml/di.xml <?xml version="1.0"?> <config ...
0
votes
1answer
39 views

Override sections.xml and remove action

i have a Smile_Gdpr module in vendor that have a sections.xml This it's content: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
3answers
55 views

Extend/Override .phtml file in Magento 2

I have a third party module, and I'm trying to override the third party .phtml file but it's not working for me. For these, I tried below ways. Third-Party Layout module: <?xml version="1.0"?> ...
0
votes
2answers
34 views

Magento2: I need to override the footer in my custom module

I have checked the best solution. But not able to override the footer for my custom module. Does anyone have a solution for this? Thanks
0
votes
2answers
45 views

Magento2: How to override menu.xml?

I want to add a new custom menu above the Views in the custom module. I am creating a custom report. Can anyone please suggest?
1
vote
2answers
51 views

Override template file to theme vendor/amzn/amazon-pay-module/view/frontend/templates/widget/resetpassword.phtml

I want to override this template file to my theme vendor/amzn/amazon-pay-module/view/frontend/templates/widget/resetpassword.phtml here is my theme path : app/design/frontend/Custom/luma_child/...
0
votes
4answers
57 views

How to override template in newsletter/manage?

I try to override the following template which is under www.example.net/newsletter/manage with my own /vendor/magento/module-customer/view/frontend/templates/form/newsletter.phtml Block class: ...
1
vote
1answer
21 views

override theme .phtml file into custom module

How can override theme .phtml file override into custom module. Path theme .phtml file is app\design\frontend\ThemeName_CompanyName\Module_Catalog\templates\product\view\pricedifference.phtml and ...
1
vote
2answers
128 views

Override template and block from a module?

I am developing a newsletter extension. I try to override the template /vendor/magento/module-customer/view/frontend/templates/account/dashboard/info.phtml and the block Magento\Customer\Block\...
0
votes
1answer
40 views

How to override /vendor/magento/framework/Logger/Handler/system.php

I want to override this file vendor/magento/framework/Logger/Handler/System.php Basically I want to disable system.log and exception.log from var/log folder. I found that vendor/magento/...
0
votes
2answers
62 views

how come this override doesnt work magento 2

var config = { "map": { "*": { "Magento_Checkout/js/model/shipping-save-processor/default": "module_name/js/shipping-save-processor/default-override" } } }; var ...
0
votes
2answers
65 views

Magento 2 : Can't able to override controller

I need to override this below controller : Magento\Catalog\Controller\Adminhtml\Product\Attribute\Validate.php But, I can't able to override. I need to customize checkUniqueOption() function. di....
0
votes
0answers
11 views

Magento 2 : Edit custom option in order view page

I did override order view page info.phtml, how to edit custom option in here, I want to get the price of custom option in here.
2
votes
0answers
45 views

How to override lib/web/mage/validation.js in Magento 2.2.8?

In order to override lib/web/mage/validation.js in Magento 2.2.8 ? I have tried this way but not working. app/design/frontend/STORE/THEME/web/mage/validation.js Edited : it was due to custom theme!...
1
vote
2answers
106 views

Magento2.3.1 How to overide Model file?

I am using Magento2.3.1 and i trying to override model in our theme. our model file path app/code/XXXX/General/Model/Layer <?php namespace XXXXX\General\Model\Layer; class FilterList extends \...
1
vote
2answers
48 views

Override CSS file from composer installed module

I've one composer module which has CSS stored in view/base/web/css/style.css How can I override this file so that I can modify it. I tried copying that file to my custom theme as below, app/design/...
1
vote
2answers
93 views

How to override newsletter.phtml (my account option) in Magento 2

I would like to edit the "General Subscription" text in my custom theme present in the My Account page under the Newsletter Subscription menu. I've already located the page which is: app/design/...
0
votes
1answer
55 views

How to Override xml file into Parent Theme

I have installed one plugins 'cedcommerce' and enabled theme (ced_2k18) for it. My default theme is Porto. I want to override ced commerce plugin layout xml file into my parent theme. Basically i ...
1
vote
2answers
89 views

Override ui_component .xhtml template file

How can I override a ui_components' template file? The concerning file is: vendor/magento/module-ui/view/base/ui_component/templates/listing/default.xml I want to override this file so that it adds ...
0
votes
2answers
46 views

M2 how to add a custom css only to a module override?

I need to apply this code to checkout page: .header-wrapper-content.sticky-menu.active{display:none;} .hdmx__contact-button.hdmx__contact-button-right{display:none;} This hide the sticky menu and ...
0
votes
1answer
51 views

Override modal-popup.html file Magrnto 2.3.2

Override vendor/magento/module-ui/view/base/web/templates/modal/modal-popup.html File Into Theme.. How To Override base/ folder file into theme ??? I m Try To Paste this file in to theme/Magento_Ui/...
0
votes
1answer
47 views

Magento 2.3: How to override page content

How to override the content editing page to customize it. do you have any ideas?
1
vote
1answer
33 views

Custom Module's template override not loading initially unless the page is refreshed

I have the below template override in a custom module, the file path is: app/code/Vendor/Module/view/adminhtml/layout/sales_order_create_index.xml <?xml version="1.0"?> <page xmlns:xsi="...

1 2 3 4 5 24