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
1
vote
1answer
31 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
31 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
39 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
30 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
21 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
20 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
32 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
59 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
22 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
21 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
36 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
41 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
39 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
23 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
42 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
43 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
48 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
61 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
36 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
53 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
35 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
46 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
46 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
20 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
124 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
34 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
1answer
42 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
59 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
41 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
104 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
60 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
38 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
67 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
45 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
42 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
32 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="...
0
votes
1answer
52 views

Magento 2 : How to get parent method while we extend the class

I am extending this class : Magento\Sales\Model\Service\InvoiceService My extended file : namespace Company\Vendor\Model\Service; use Magento\Sales\Api\InvoiceManagementInterface; use Magento\Sales\...
0
votes
4answers
55 views

How can I override following file?

In the above attach file I want to change Magento\SalesRule\Model\Rule\Condition\Address to Company\SalesRule\Model\Rule\Condition\Address
1
vote
1answer
177 views

How to Override WishList Customer Data in magento 2

i Want to Override Magento\Wishlist\CustomerData\Wishlist public function getSectionData() { $counter = $this->getCounter(); return [ 'counter' => $counter, ...
1
vote
1answer
27 views

Magento 2 : Override addtocart.phtml for all kinds of products

How can I override addtocart.phtml for all types of products, this code works fine only for simple and configurable products, but I want to override all kinds of products. <page xmlns:xsi="http://...
0
votes
1answer
30 views

Magento2 : Override Category List page with No dependency on Other Custom Module

I want to override category.products.list to display 1 custom attribute value to each product in list. and i know i can override product/list.phtml to my module and there i can customize code in loop ...
1
vote
3answers
131 views

Override PrepareTemplate function of Magento\Sales\Model\Order\Email\Sender.php in Magento 2.3

I want to override PrepareTemplate function of Sender.php and have tried to override Sender.php with the help of link Override abstract class but its not working for me. I have followed the exact ...
2
votes
2answers
85 views

How to over ride php file in magento 2.3

I want to do some changes in vendor/magento/framework/Stdlib/DateTime/Date.php How can I override the file in app folder?
0
votes
1answer
32 views

Magento2 : How to override FinalPrice.php file in Magento2

I want to override vendor/magento/module-catalog/Pricing/Price/FinalPrice.php with constructor argument. Note : File overriding is working fine but when I create constructor in the overridden ...
0
votes
1answer
121 views

override coupon management and guestcoupon management core vendor files magento 2

I want to override Couponmanagement.php of Magento\quote\Model\CouponManagement and guestcouponmanagemet.php of Magento\quote\Model\GuestCart\GuestCouponManagement but my plugins are not working....