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
2answers
19 views

Magento 2 How to override Magento\Catalog\Block\Product\View to add getStoreCode () function

I need to overwrite the block Magento\Catalog\Block\Product\View to add the getStoreCode () function and be able to call it from a phtml file that uses this block. I have followed a tutorial to create ...
1
vote
1answer
34 views

Adding a BCC and CC (sales person) to the welcome email Magento 2

I've edited this function below and i'm overriding this method in app/code/FF/Customer/Model/EmailNotification.php natively this file exists in vendor/magento/module-customer/Model/EmailNotification....
0
votes
1answer
21 views

How to override phtml / add a static image to .phtml file from the extension?

I'm try to add a banner image to the list.phtml, but it's not displaying. This is what i did: step 1: copied /public_html/vendor/mirasvit/module-rewards/src/RewardsCustomerAccount/view/frontend/...
2
votes
1answer
22 views

HTML files not being overwritten in app/Design

I'm trying to override html files the same way that I would override a phtml file, but it doesn't seem to be working. Same with Javascript. I'm trying to change some logic in minicart.js. I put my ...
0
votes
0answers
37 views

Magento2: How to override the Magento\Payment\Gateway\Command\GatewayCommand?

Because I want to send Notification with response error code by Payment Gateway) when transactions are isValid. And I found the Magento\Payment\Gateway\Command\GatewayCommand do the command with ...
0
votes
1answer
28 views

how do I override Magento newsletter subscriber?

I have a hard time to work out the di.xml, I am trying to override a function of this file vendor\Magento\module-newsltter\Model\Subscriber.php anyone can tell me what should I do? I think I have ...
0
votes
0answers
10 views

Deactivating and reactivating plugins on-the-fly

I am currently developing on a VM with a Ubuntu host machine - it is super slow. I am currently trying to implement a plugin but the magento s:d:c command takes 6 minutes. Within examples for Plugins ...
0
votes
2answers
42 views

How can i override abstract class protected function

I want to override abstract class Magento\Sales\Controller\Adminhtml\Order\Create of the below method protected function _processActionData($action = null){ } I have tried using preference but it ...
0
votes
1answer
26 views

Override third party module service contract

There is third party custom module. For add entries they used service contract entities. I need to add one more entry. Don't want to touch third party module. How can i extend their interface and ...
0
votes
1answer
28 views

Magento 2 - how override some files of module-catalog-search in custom theme

I would override this files in my custom theme (app/design/frontend/parent/MyCustomTheme/..) vendor/magento/module-catalog-search/Model/Adapter/Mysql/Dynamic/DataProvider.php vendor/magento/module-...
0
votes
1answer
31 views

Override a class doesn't work for his child?

I want to override this class : 'Magento\Checkout\Block\Cart\Item\Renderer' This class has a child like : 'Magento\ConfigurableProduct\Block\Cart\Item\Renderer' So i use <preference for="...
0
votes
1answer
56 views

Is it possible to override a vendor module's di.xml file in Magento2?

So a module installed via composer lives in vendor/module, and I'd like to change its etc/di.xml from this: <virtualType name="customCategoryCollection" type="Magento\...
1
vote
1answer
94 views

How to override the Catalog Widget PHTML file into custom module?

I need to override the widget template file /vendor/magento/module-catalog/view/frontend/templates/product/widget/new/content/new_grid.phtmlbut in xml file the phtml file was not mentioned at any ...
0
votes
1answer
33 views

how to override a method with plugin

Hi I'm using very nice plugin 'login-as-customer' by magefan. I'd like to override an execute method of login-as-customer. this is first time to try overriding third pirty's controller so I stuck now. ...
2
votes
2answers
31 views

Can we override a core plugin

I want to override a core plugin in Magento\Sales\Controller\Order\Plugin -> Authentication.php Is this even possible to achieve.
1
vote
2answers
65 views

Magento2 override addto wishlist.phtml

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd&...
1
vote
1answer
40 views

Magento 2 - How to override frontend javascript file

I need to overwrite a javascript file from a custom module at: vendor\amasty\module-single-step-checkout\view\frontend\web\js\model\one-step-layout.js because I need to replace a code line in it to ...
0
votes
0answers
24 views

How to Override abstract class protected function for admin field?

https://github.com/magento/magento2/pull/19107/commits/4289c533d0aa7d151b9e3e42f3fdcb9932a785ea need to apply this solution to my store but unable to override and change this code line. Need to ...
0
votes
1answer
11 views

Magento 1 : Issue with Template override

How to override this file in magento 1 using module ? app/design/adminhtml/default/default/template/sales/order/create/items/grid.phtml
0
votes
1answer
13 views

logo email doesn't show on mailbox of the customer

in my case i am using magento 2.2.x , so i want to override the file "vendor/magento/module-email/view/frontend/email/header.html" in order to add a logo in the email to show the company's ...
0
votes
1answer
90 views

Magento 2 - override knockoutjs template located in base folder

I need to change the value of the maxinput field in the knockoutjs template vendor\magento\module-ui\view\base\web\templates\form\element\input.html so I have to replace the template with my own ...
0
votes
1answer
32 views

Override a helper using Plugin

I have been trying to use plugin to override Magento\Sales\Helper\Reorder.php. I have added a comment inside the code what I would like to change. /** * Check is it possible to reorder * ...
0
votes
1answer
33 views

How to override a controller using Plugin?

I want to override abstact class controller Magento\Sales\Controller\AbstractController\Reorder.php using Plugin. How can I do that? di.xml <?xml version="1.0"?> <config xmlns:xsi=&...
0
votes
0answers
23 views

Stuck with a Magento override problem

Recently upgraded to Magento enterprise edition 2.3.5-p2, I have a problem that occurs with a specific module during compilation: SummaTheme\Widgets\Block\Banners\Product Incompatible ...
0
votes
3answers
77 views

Overriding “base” layout not working

I'm reading the documentation here. My goal is to remove the "Customize and Add to Cart" button, for a bundled product The path for the layout can be found here /vendor/magento/module-gift-...
0
votes
1answer
23 views

How Can I override vendor/magento/magento2-base/lib/web/extjs/ext-tree.js file for backend in magneto2?

How Can I override vendor/magento/magento2-base/lib/web/extjs/ext-tree.js file for backend? I want to customize this file which will effect on backend admin
0
votes
1answer
47 views

Magento 2 - Override luma themes module less file

I try to override css code from the file vendor\magento\theme-frontend-luma\Magento_Checkout\web\css\source\module\_cart.less: .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @...
0
votes
1answer
39 views

Override magento 2 module file

I'm trying to override a file in my theme, but its not showing. The file is located in vendor/mollie/magento2/view/frontend/web/template/payment/creditcard-with-components.html. location of my file is ...
0
votes
0answers
33 views

Magento 2.3.5 - Overriding registerRefundNotification in Magento\Sales\Model\Order\Payment.php

I'm trying to override the registerRefundNotification function to stop credit memos from automatically being created for refunds. My di.xml file: <?xml version="1.0"?> <config xmlns:...
0
votes
1answer
106 views

Magento 2 PWA overwrite Gallery component

I am able to overwrite modify the following components: Main, App, Footer, Header, Logo, Routes, CategoryTree by following Doc: ref:https://magento.github.io/pwa-studio/tutorials/pwa-studio-...
1
vote
3answers
83 views

Magento 2 - How to override knockoutjs template?

I try to override the following template from my own module vendor\magento\module-checkout\view\frontend\web\template\minicart\item\default.html but I don't find the file where I can override it, I ...
0
votes
3answers
161 views

Magento 2 how to get order id on admin order invoice save?

How to get order id in invoice using plugin ? di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&...
0
votes
1answer
105 views

Can't override template from own module

It seems to be impossible to override the template vendor\magento\module-checkout\view\frontend\templates\cart\item\renderer\actions\edit.phtml from your own module e.g. by using layout updates. (The ...
0
votes
1answer
54 views

PWA Magento2.3.5 Overwrite Logo Component in Custom Project

Magento PWA Docs for overwrite a component such as Footer is found here:https://magento.github.io/pwa-studio/tutorials/pwa-studio-fundamentals/modify-site-footer/ So I'm assuming the same steps should ...
0
votes
1answer
13 views

Category Name input field

The category name input field is a required field * but is there a way to save it without a category name? I see the elements here: <div class="admin__field-control" data-bind="css: {...
1
vote
2answers
27 views

Cannot override class RuleProductPricesPersistor in Magento 2

I'm trying to override following class Magento\CatalogRule\Model\Indexer\RuleProductPricesPersistor Using below code <preference for="Magento\CatalogRule\Model\Indexer\...
0
votes
0answers
17 views

How to override adminhtml template file in magento 2.3.2 [duplicate]

I want to override account.phtml file located at /vendor/magento/module-sales/view/adminhtml/templates/order/create/form How can i do that?
1
vote
1answer
34 views

How to override a template file in magento 2

I want to override final_price.phtml template file located at /vendor/magento/module-grouped-product/view/base/templates/product/price/ How should i do that?
0
votes
1answer
68 views

How to override adminhtml template file in magento 2

I want to override one adminhtml template file located at /vendor/magento/module-sales/view/adminhtml/templates/order/create/form/account.phtml What steps i need to follow?
1
vote
1answer
41 views

Override a method in Magento\UrlRewrite\Controller\Router class

I want to make some changes in the getNormalizedPathInfo method of Magento\UrlRewrite\Controller\Router class. For this, I have created a module and tried to rewrite like below: Step #1: app/code/...
3
votes
1answer
96 views

Is it possible to override vendor/magento/module-sales/Api/Data/OrderAddressInterface.php

Is it possible to override vendor/magento/module-sales/Api/Data/OrderAddressInterface.php as I want to get sales order address custom column value in order REST API.
1
vote
1answer
35 views

call a vendor function in custom module

I'm trying to create a custom module which will have GoogleSheet Import functionality. So I want to call varienImport.postToFrame() this function works when we click on Check Data option in existing ...
0
votes
0answers
13 views

How to override JS with Module in Magento 2.2

I've seen a couple of questions about this and ending coming up with a module properly installed with a /Custom/AgreementPage/view/frontend/web/js/view/checkout-agreements.js with just a console log ...
0
votes
0answers
21 views

Create Module to display stock status on Product listing Page

I want to develop module which is able to display custom stock status on product list page when we can enable X-threshold option from admin side and that much quantity will be displayed with the ...
0
votes
1answer
18 views

Unable to override interface in magento2

I want to declare new method in interface "Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface" I tried to override interface using di.xml <preference for="...
1
vote
1answer
39 views

How to populate Purchase Order Number with a random rumber?

Magento 2.3.x Purchase Order used as a payment method requieres a purchase order number. Some of our customers don't have that number, so we need to pre-populate this input field with a random content ...
0
votes
2answers
31 views

how to overwrite a JS file in magento?

I want to replace this JS. \vendor\magento\module-catalog\view\base\web\js\price-options.js I did try override by \app\design\frontend\(vendor)\(theme)\Magento_Catalog\view\base\web\js\price-...
0
votes
0answers
31 views

Magento 2 Cannot override vendor file

Here am trying to override a admin page, but it cannot override, here is admin path: /public_html/vendor/magento/module-shipping/view/frontend/templates/tracking/details.phtml Override path : /...
0
votes
0answers
14 views

Couldn't Over ride magento2 logo from custom theme

I am overriding logo with custom theme . https://i.imgur.com/WRvopNM.png It modifies the size but can't change the logo itself. what can be the problem?
0
votes
1answer
84 views

Override xml files

Is it possible to override etc/import/block.xml with child theme ? I have modified block.xml itself and works fine for now but if I update 3rd party extension my modifications will be lost . I am ...

1
2 3 4 5
25