We’re rewarding the question askers & reputations are being recalculated! Read more.

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
2answers
20 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
22 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
51 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
33 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
23 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
39 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
35 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
19 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
84 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
31 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
32 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
52 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
9 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
36 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
44 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
51 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
30 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
42 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
42 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
33 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
46 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
31 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
36 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
54 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
93 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
21 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
73 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
81 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
31 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
77 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....
0
votes
0answers
15 views

Customer account wishlist block replacement removes content

I have replaced the vendor/magento/module-wishlist/Block/Customer/Wishlist.php for my own app/code/myVendor/myModule/Block/Customer/Wishlist.php I have written in the app/code/myVendor/myModule/etc/...
0
votes
0answers
26 views

Magento 2 : Add a custom attributes to quote

I have a custom quote module, that i would like to modify and add 2 custom fields, The admin quote module is similar to sales order admin pages, so i want override the admin templates and layouts to ...
0
votes
2answers
74 views

Magento 2 What we can do when two modules override same block?

I have two modules which are using the same block function. i.e. module 1-> ABC, module 2-> XYZ both modules are using preference method to override core module's block file. => Let say in core ...
0
votes
1answer
31 views

Magento 2: Override admin layout didn't work

I would like to override this quotation_quote_view.xml file layout (from a custom module) and add a block below this block reminder_date <block class="Cart2Quote\Quotation\Block\Adminhtml\Quote\...
1
vote
0answers
67 views

How to rewrite store view code in Nginx?

I have some trouble to fix this issue. I have a Magento 2 installation with two websites and several store views: https://www.websiteone.com/onenl https://www.websiteone.com/oneen https://www....
0
votes
1answer
72 views

How to override module-newsletter in magento 2?

How to override the subscribe.phtml form which is in vendor / magento / module-newsletter to add my input data and save it in my database table ?
0
votes
1answer
60 views

Override Customer Account Edit on Frontend

Magento 2 newbie. I am trying to override the default 'Customer Account Edit' form on the Frontend. I'm not able to get my template to "override", its always loading the default template [/html/...
0
votes
0answers
19 views

Magento 2: How to override new_grid.phtml in Custom Module?

I need to override product/widget/new/content/new_grid.phtml file in my custom module. Please tell me the possible ways to do it.
1
vote
2answers
18 views

How zend libs file(Rewrite Zend_Pdf_Resource_ImageFactory) class in Magento 2

i am trying to override Zend libs class like magento2 using preference My di.xml code is <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
2answers
39 views

How to override productcollection.php from vendor?

I have to override the file ProductCollection.php from vendor/magento/module-catalog/Ui/DataProvider/Product. I have read many posts but still not getting to override the file. Can anyone please ...
1
vote
2answers
70 views

how to override core JS file in module

I am trying to override Magento_Braintree/js/view/payment/method-renderer/cc-form But i am not getting any progress. I have tried map 'Magento_Braintree/js/view/payment/method-renderer/cc-form': '...
1
vote
3answers
112 views

Magento 2 - Override phtml files not working

I am working on Magento 2 and I override few PHTML files from vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml to app/design/frontend/vendor/module/Magento_Catalog/...
0
votes
0answers
12 views

How can I create a file that will override the core file containing the header section design of the frontend from my own module in app/code

How can I override the header section of the file containing the name of the default message and sign in options from my own module under app/code.
1
vote
0answers
50 views

magento 2 how can I overwrite ar_SA.xml language symbol file?

I want to overwrite this file in my module. vendor/magento/zendframework1/library/Zend/Locale/Data/ar_SA.xml How can I archive this ?
1
vote
0answers
26 views

Override module's model with another Magento 2 module

I tried to override a custom module model with creating a new module, i got class not found error etc/module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
1
vote
2answers
40 views

I am overriding a controller and want to use a custom helper in the overrided controller,how can i?

I've overridden following controller:- Magento\Customer\Controller\Account\CreatePost.php And the constructor method of this class is:- public function __construct( Context $context, ...
0
votes
1answer
77 views

Moving a vendor module to new cron group in magento 2

We are utilizing the Firebear module to import product and pricing data which run in the default cron group. The import takes quite a bit of time/resources so it was recommended to move the Firebear ...
0
votes
1answer
34 views

Magento 2: How we can add construct into overridden class

If There are no parent::__construct from parent class then How we can add construct into overridden class?