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
1 answer
17 views

Trying to override InvoiceSender

I tried to override InvoiceSender (in /app/code/UFS/Sales/Model/Order/Email/Sender/InvoiceSender.php) but it doesn't work and I don't understand why. I added "'created_at_formatted' => $order-&...
Magento_Dev's user avatar
0 votes
1 answer
46 views

Is it possible to override type configuration in the di.xml of a module in Magento2?

I want to override the file "Fooman\EmailAttachments\Observer\AbstractSendInvoiceObserver". Here is the code in the di.xml. <!-- module introduced preferences --> <preference for=&...
Jancy Abraham's user avatar
0 votes
0 answers
17 views

Override Braintree Config.xml via Custom Module

Below is an except from vendor/paypal/module-braintree-core/etc/config.xml and I am curious how to add new credit card to, <cctypes_braintree_mapper> via a custom module. Is this done via a di....
A. Andersen's user avatar
0 votes
1 answer
40 views

Exact Path for New phtml File

I am trying to override a core phtml file following the advice in this question How to override .phtml files in Magento 2. I am not able to get it to work and I am wondering in general how the path ...
Jack's user avatar
  • 3
0 votes
2 answers
58 views

Difficulty Overriding Magento 2 File

I am new to coding in Magento 2. I am trying to override a file using this guide https://webkul.com/blog/overriding-rewriting-classes-magento2/, and my file compiles without error, but changes don't ...
Jack's user avatar
  • 3
0 votes
1 answer
66 views

Override di.xml OR Exclude a code part to be added in generated\metadata\global.php

Basically I want to make magento default store credit(Magento_CustomerBalance) to be enable/disable at website level scope(by default its global level) I have overirded & made changes in certain ...
GunJan Mehta's user avatar
0 votes
1 answer
53 views

Magento 2 how to update requirejs-config.js

We are using the Magento 2.3.5 version we want to update the version from 3.79.1 to 3.97.0 in requirejs-config.js file-path - vendor/gene/module-braintree/view/base/requirejs-config.js when we are ...
sumeet bajaj's user avatar
  • 1,296
0 votes
1 answer
68 views

How to remove the Deprecated property of __construct from Abstract Class using overriding or any other way

Error main.ERROR: Deprecated Functionality: Creation of dynamic property Magiccart\Magicproduct\Controller\Adminhtml\Product\Index\Interceptor::$_resultRedirectFactory is deprecated in vendor/...
Sheri's user avatar
  • 140
2 votes
3 answers
84 views

Extra parameters passed to parent construct $directoryHelper

I am getting the following error on di compile: **Extra parameters passed to parent construct $directoryHelper** That's the original code: class PreviewButton extends \Magento\Config\Block\System\...
Someguy's user avatar
  • 21
0 votes
0 answers
18 views

Third Party Module Layout Override - use custom module or within theme directory

When overriding a layout xml file from a third-party module, example being Amasty, is it best to include the new xml file within a custom module, within app/code, or within the theme directory, that ...
A. Andersen's user avatar
1 vote
1 answer
115 views

How to override IsCorrectQtyCondition.php?

Magento 2.4.6 I had to make some changes to vendor\magento\module-inventory-sales\Model\IsProductSalableForRequestedQtyCondition\IsCorrectQtyCondition.php and need to override that class now of course....
user4095519's user avatar
0 votes
1 answer
34 views

Getting error after overwrite core file of sitemap module. magento2

I have successfully overwrite core file: Magento\Sitemap\Model\ResourceModel\Catalog\Product but getting error in public function getCollection($storeId) for this: $this->scopeConfig->isSetFlag ...
Jimit Bhavsar's user avatar
0 votes
1 answer
36 views

How to override a node in an xml file of a ui_component

I have this xml file in some third party module having this content <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
Bob's user avatar
  • 11
0 votes
0 answers
30 views

Override layout file in vendor directory of theme

I have created a theme in vendor directory. I want to override layout xml files in my theme directory. I have theme-frontend-themename. I have a folder in this directory named Magento_Theme. I want to ...
Mehreen's user avatar
  • 11
0 votes
0 answers
104 views

Magento 2 - override private method in abstract class

Is there a way to override a private method of an abstract class in magento 2? I need to override the private method correctText of Magento\Sales\Model\Order\Pdf\AbstractPdf
Black's user avatar
  • 3,330
0 votes
1 answer
26 views

Override bulk.js and bulk.phtml vendor files on my app/code

Do you see anything obviously wrong here? I am trying to override vendor/magento/module-configurable-product/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml vendor/magento/...
Juan's user avatar
  • 1
0 votes
1 answer
26 views

Copying component from src to my app Errors: "Failed to compile." but I am able to modify styles

I'm trying to customize a few components, but anytime I try to copy a component from /scandipwa/node_modules/@scandipwa/scandipwa/src/component/Footer/ into my app directory /scandipwa/src/component/...
ByteMyPixel's user avatar
0 votes
0 answers
1k views

Error: Cannot instantiate interface

I am override the file sender.php this is not a normal class is abstract class may be that's the reason to display the error Could anyone suggest regarding this so i can proceed forward. error
Mohit Thakur's user avatar
0 votes
1 answer
42 views

How to send the separate orderconfirmation mail for admin and customer

I created a custom module to send the separate mail for admin and customer but its not working.could you please suggest me regarding this so i can proceed forward.
Mohit Thakur's user avatar
0 votes
2 answers
89 views

Override Model File Magento 2

I want to override Magento\PageBuilder\Model\Catalog\Sorting\SimpleOption.php file. Please check the code below, <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Sunny Rahevar's user avatar
0 votes
2 answers
29 views

Override Magento Module

I am trying to override authorization.phtml located in vendor/magento/module-customer/view/frontend/templates/account/link . this file contains word "or" that appear between sign in or ...
tonysar's user avatar
  • 51
0 votes
1 answer
111 views

How to override view/base file in magento 2 like as we can override frontend file in design folder

I want to override view/base If we override view/frontend folder then we follow this pattern app/design/frontend/ here we create registration.php file theme.xml and ...
Arun Suryavanshi's user avatar
0 votes
1 answer
52 views

Magento 2 - Change value in .less file of a third party module

I need to change a value in this file of a 3rd party module from my own theme: vendor/amasty/xsearch/view/frontend/web/css/source/module/components/_search-input.less Am I correct that I need to make ...
Black's user avatar
  • 3,330
0 votes
0 answers
16 views

How to override file dialog (files.phtml) from adminhtml?

Magento 2.4 I want to override /vendor/magento/module-cms/view/adminhtml/templates/browser/content/files.phtml but found no suitable way to do it. So, how can I override this adminhtml template? Do I ...
user4095519's user avatar
1 vote
2 answers
399 views

Magento 2 how to overwrite a trait function

How do you overwrite a trait function from vendor. Things i did try in the di.xml <preference for="\Vendor\Module\Traits\Model\ChangeMe" type="\Company\Module\Traits\...
Johan's user avatar
  • 11
1 vote
1 answer
611 views

Magento 2 How can we associate a single template with multiple view models?

I want to associate another custom view model with a template. The template already has a view model in the core file. Can I associate an other custom view model with this template?
Hafiz Muzamal's user avatar
0 votes
1 answer
589 views

What is the best way to override constructor of a class - Magento 2.4.3

I want to make a single line change in the constructor of a core class. What would be the best recommended practice to achieve it. Here is what my existing constructor /** * Download constructor. ...
Hafiz Muzamal's user avatar
0 votes
1 answer
122 views

How to override .html and .js files in app/design from my custom module in app/code

Is there any way to override .html and js files present in app/design folder from a custom module in app/code ? I was looking to override app/design/frontend/Vendor/ThemeName/Magento_Checkout/web/...
Rejith's user avatar
  • 321
2 votes
4 answers
1k views

Override a Vendor's module di.xml : add an argument

I have in some Vendor's Module di.xml file this entry : <type name="Amasty\RequestQuote\Model\Pdf\PdfInformation"> <arguments> <argument name="variables" ...
Paul-Antoine Van Gansbeke's user avatar
2 votes
1 answer
430 views

How to override core codes - Magento 2.4.3

I have this issue with my Magento 2.4.3, which does not sort by position. I found this code where I need to override, but I am quite new to Magento. Is there anyone that can show me or tell me how to ...
Jan-petter Havna's user avatar
1 vote
1 answer
795 views

Magento 2 - override JS from third party module from own module

I successfully overrode a JS file of a third party module from my own module named Amasty/AdvancedReviewOverrides. First I copied the file from vendor/amasty/advanced-review/view/frontend/web/js/...
Black's user avatar
  • 3,330
0 votes
3 answers
76 views

How to override taxvat.phtml

Hi dears I want to override taxvat.phtml in vendor > magento > module-customer > view > frontend > templates > widget Before I try to create a file Vendor > Module > etc > ...
Peren's user avatar
  • 27
2 votes
1 answer
39 views

overwrite 2 templates file by custom module, still loading the core files

I am using Magento 2.4.3p-1 I have 2 files vendor/Aw/Review/view/frontend/templates/email/review/request_form.phtml vendor/Aw/Review/view/frontend/email/review_reminder.html Since those 2 files in ...
Paul Fan's user avatar
  • 654
0 votes
1 answer
163 views

Override CatalogWidget\Block\Product\ProductsList with new dependence injection

Here is my di.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <...
hkguile's user avatar
  • 2,221
0 votes
1 answer
31 views

Where is the line responsible for jpeg compression level for the product page?

I'm looking to turn off compression for product pages specifically, meaning if I uploaded a 200k jpeg file, I expect to see exactly the same 200k file on a product page. Looking to find a line that ...
Захар Joe's user avatar
0 votes
1 answer
603 views

how to override module-page-builder/view/frontend/layouts.xml

i want to override module-page-builder/view/frontend/layouts.xml. please help me. i am not able to override. Thanks
Pradeep Sanku's user avatar
0 votes
1 answer
444 views

Magento 2: How to override the core interface and add a new constant?

I need to extend the core interface Magento\NegotiableQuote\Api\Data\NegotiableQuoteInterface and need to add a new constant but when I override the interface via preference its not working. When I ...
MagentoDev's user avatar
0 votes
1 answer
343 views

How to override Validation.xml from module-customer

I want to override vendor/magento/module-customer/etc/validation.xml This validation.xml in custom module. Baically I want to change below file location with my custom module file <rule name="...
Arun Sharma's user avatar
  • 1,315
0 votes
2 answers
353 views

Magento 2: how to specify the module name in custom theme?

I need to override success.phtml file from module vendor/magento/module-inventory-in-store-pickup-frontend/view/frontend/templates/success.phtml I'm not sure how to get the module name from module-...
CodeForGood's user avatar
0 votes
1 answer
145 views

Overriding a .phtml file in custom theme doesn't work

I've been trying to override D:\Projects\PMM-M2\public_html\vendor\magento\module-checkout\view\frontend\templates\success.phtml by placing the file in my custom theme at location D:\Projects\PMM-M2\...
CodeForGood's user avatar
1 vote
1 answer
368 views

How to override a phtml file in vendor folder

I am trying to override a file located in /html/vendor/mirasvit/module-search-ultimate/src/Search/view/frontend/templates/index/magefan/blog/post.phtml I have created a path under my custom theme ...
Nikos Klavdianos's user avatar
0 votes
2 answers
579 views

Overriding catalog_product_view.xml does not work

I am trying to override app/code/Mageants/SampleProduct/view/frontend/layout/catalog_product_view.xml in my theme. I copied it to app/design/frontend/Smartwave/porto_child/Mageants_SampleProduct/...
user4095519's user avatar
0 votes
1 answer
781 views

How do I extend/override \Magento\Theme\Block\Html\Topmenu::_getMenuItemClasses?

I cannot find it di.xml. Any ideas? I want to add a custom css class to specific TopMenu items. I don't know how to extend this.
Justin Collins's user avatar
0 votes
1 answer
1k views

How to override the Search.php using preference in magento 2?

I am not able to override the Search.php file by using preference in magento 2.3.4. Below is the my di.xml file. Please anybody can check the below code. <config xmlns:xsi="http://www.w3.org/...
Mahendra's user avatar
  • 716
5 votes
3 answers
2k views

Magento 2.4.3 - JS mixin file not loading on each page load

I tried to overwrite Magento_Catalog/js/catalog-add-to-cart.js only to extend the submitForm method as follows: app/code/Vendor/Module/view/frontend/requirejs-config.js /** * Copyright © Onectus, Inc....
Kloppo's user avatar
  • 95
0 votes
1 answer
1k views

Override Abstract class in Magento 2 not working

I'm using magento v2.4.3, i tried to override \Magento\Customer\Model\Address\AbstractAddress like this: app/code/Vendor/Module/etc/module.xml <?xml version="1.0" ?> <config xmlns:...
blue's user avatar
  • 128
0 votes
1 answer
52 views

Override vendor file issue in magento2

I am trying to override the below class file in my custom module. Magento\Deploy\Service\DeployStaticContent.php Vendor/Module/etc/di.xml <?xml version="1.0" ?> <config xmlns:xsi=&...
Manjunath's user avatar
  • 177
0 votes
4 answers
383 views

How to overide a html template

I want to override vendor/magento/module-tax/view/frontend/web/template/checkout/shipping_method/price.html So I have copied the file to my custom theme to: app/design/frontend/Company/Theme/...
Goose84's user avatar
  • 2,611
0 votes
2 answers
411 views

Magento 2 - How to disable a plugin

Problem: I am using the extension Fooman_PdfCustomiser. I need to disable the plugin named fooman_pdfcustomiser_paymentinfoblock. vendor/fooman/pdfcustomiser-implementation-m2/src/etc/di.xml: <...
Black's user avatar
  • 3,330
1 vote
1 answer
343 views

Override product description

I need to add some things to the Magento 2 description. I can't do it via admin area since the data needs to be generated procedurally, so I tried an override, but the closest I've got is this I need ...
Alberto Privado's user avatar

1
2 3 4 5
27