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
2
votes
2answers
616 views

[Solved]Cannot override Pdf/Total/Default.php model

Good morning everybody! I have a problem trying to override the model app/code/core/Mage/Sales/Model/Order/Pdf/Total/Default.php with app/code/local/Mycompany/Sales/Model/Order/Pdf/Total/Default.php. ...
0
votes
1answer
30 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:...
2
votes
2answers
24 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
2answers
3k views

Magento 2: How to override Ui & Component folder files

How to override these below files: vendor/magento/module-configurable-product/Ui/DataProvider/Product/Form/Modifier/ConfigurablePanel.php vendor/magento/module-ui/Component/Form.php ...
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
3answers
530 views

Magento2 product review captcha

I want to rewrite Magento-review layout catalog_product_view.xml to show Recaptcha on a product review. How can I achieve this?
0
votes
0answers
343 views

'Invalid method' error on custom module

I'm trying to get a better understanding of Magento module development and I've run into an issue I can't seem to figure out. I've built a custom module that allows users to pick the desired delivery ...
2
votes
2answers
613 views

Can not override UI Component template

app/code/namespace/module/view/adminhtml/ui-component/product_form.xml <?xml version="1.0" encoding="UTF-8"?> <!-- /** * Copyright 2013-2017 Magento, Inc. All rights reserved. * See ...
4
votes
2answers
1k views

Override method in LayoutProcessor

I want to make changes(PHP code) to the method processPaymentConfiguration, but I don't know how I can override the method so my changes have a higher priority. I can alter the LayoutProcessor file ...
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"?> ...
1
vote
1answer
704 views

Extend or override blanks theme js

I have a custom theme which inherits from blank and I would like to override navigation-menu.js options how would I do that?
3
votes
1answer
886 views

Magento2 rewrite: product resource collection class does not effect on functions

I have rewrite catalog product resource collection Magento\Catalog\Model\ResourceModel\Product\Collection. Class override successfully but functions override is not working. Suppose, i want ...
1
vote
3answers
759 views

How can I override admin create order controller?

I am trying to override adminhtml_sales_order_create controller. I have created a small module app/code/local/Akina/Sales/etc/config.xml <?xml version="1.0"?> <config> <modules> ...
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 ...
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
42 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/...
1
vote
2answers
87 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
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
68 views

Override phtml of a module from another module

I created a module and now I want to override a .phtml file from another module. What is the best way to do that?
13
votes
6answers
33k views

How to override .phtml files in Magento 2

I want to customize product details page, So it required to override some .phtml files in following locations. So I want to know, how to override .phtml files in vendor\magento\module-catalog\view\...
0
votes
1answer
915 views

Make Adjustments To final_price Render Class On Product Pages Magento2

I am trying to change the render class for the final_price renderer on the product pages in Magento2. I have found the following block inside the vendor/magento/module-catalog/view/base/layout/...
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
2answers
657 views

How to override adminhtml block file in Magento 2

How to override module-customer/block/AdminHtml/Group/Edit/Form.php I have created custom module for that please find my code for that. etc/di.xml <?xml version="1.0"?> <config xmlns:xsi=...
2
votes
2answers
1k views

Why my overriding of the success.phtml is not working?

I have copied and pasted the file from vendor/magento/module-checkout/view/frontend/templates/success.phtml to app/design/frontend/THEME/THEMENAME/Magento_Checkout/templates/success.phtml ...
0
votes
1answer
33 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 ...
2
votes
0answers
37 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!...
3
votes
2answers
614 views

How to rearrange the links available in header in magento 2.0.2?

To Rearrange the Header links(ie to bring the My Wishlist link at last)in magento 2.0.2 (parent-theme:blank) I just overrided the default.xml file in vendor/Magento/module_wishlist/view/frontend/...
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
1answer
882 views

Overriding Magento\Catalog\Model\Layer class not working in Magento 2

Overriding Magento\Catalog\Model\Layer class not working in Magento 2. I'm trying to create a custom module for showing custom product collection with layered navigation. here i added di.xml file to ...
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 \...
2
votes
2answers
904 views

Custom Contact Form - Override Controller

I am trying to add a contacts form on multiple cms/products pages. I copied the default contacts form phtml and pasted it into a new phtml file. However, submitting the form redirects to the contacts ...
0
votes
3answers
1k views

Magento 2, minicart, change “Go to Checkout” text to “Checkout” only

I have been trying to change Go to Checkout text to Checkout in mini cart in Magento 2. I have new theme applied and placed override file as follows: app/design/frontend/Darkmage/newtheme/...
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/...
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/...
3
votes
2answers
1k views

How to override layout file, which is already override by other theme - layout\override\base\somel_ayout.xml

How to override layout file, which is already override by other theme. For example, we have existing theme. app\design\frontend\<Vendor>\<themeone>\Module_Vendor\layout\override\base\...
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
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 ...
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 ...
1
vote
1answer
974 views

Magento2 how to override collection

I've just been working with Magento2 for 1 week. There are many things that made me confuse. I want to build a grid that show information from "directory_country_region" table but show only for "...
4
votes
1answer
1k views

Magento2.1: How to override the template in custom module?

I want to create an extension that will give shop owners ability to edit their product image. So I understand I need this template Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml I ...
0
votes
2answers
736 views

How Can Override Block (\Magento\Catalog\Block\Product\View\Options\Type\Select.php)

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference ...
1
vote
1answer
754 views

magento 2 how i ca override the config save controller adminhtml?

magento\vendor\magento\module-config\Controller\Adminhtml\System\Config\Save.php how can i override this controller in the magento 2
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?
0
votes
1answer
38 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\...
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="...
14
votes
2answers
6k views

How to override or disable core Plugins in Magento2?

I am building a marketplace using Magento2. For that reason I need to be able to load the order of the customer using the vendor's customer credentials. The problem with this is that Magento2 uses a ...
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