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
1answer
11 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="...
0
votes
0answers
16 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
21 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
19 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
79 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 ...
0
votes
1answer
30 views

Magento 2.3: Checkout page displays only `loading image` after checkout_index_index.xml was overridden in the custom theme

The checkout page now display loading image forever after I have overridden the checkout_index_index.xml in the custom theme to remove faxfield from the checkout page. Below is the screenshot showing ...
0
votes
1answer
21 views

Magento 2 : override abstarct class method

I want to override mone method prepare of class Magento\Ui\Component\Form\Element\AbstractOptionsField I tried to do with preference but there is no effect I also tried using plugin but it throws ...
0
votes
0answers
11 views

Overwrite EmailNotification from Module Customer

Can anyone let me know how can I Over write EmailNotification File in our custom module. I tried this way by modifying methods of private function sendEmailTemplate( $customer, $...
0
votes
1answer
25 views

How to override php class in magento 1.9

I want to make changes in the PHP file of a third-party module installed in Magento 1.9.x The path of the file is app/code/community/Fooman/PdfCustomiser/Model/Mypdf.php I want to change this class ...
0
votes
0answers
18 views

I need to change the order page title

I need to change the order page title. I don't want to show the Magento order ID I need to show ** External order Id** from Database how to change it.
0
votes
1answer
16 views

Override the newsletter subscription success email template in Magento2

How can I override the core email template of newsletter subscription success email template in Magento2? Thanks for the help
0
votes
1answer
26 views

Overriding \Magento\Quote\Model\ShippingMethodManagement not successful

I've created a module to override di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
0
votes
0answers
8 views

Magento 2.3.4 Update/Overwrite Validation rules for store

Need to allow Dashes for store code: file: Magento\Store\Model\Store Method: _getValidationRulesBeforeSave Regex to overwrite: new \Zend_Validate_Regex('/^[a-z]+[a-z0-9_]*$/i'); Anyone any ideas?
1
vote
1answer
114 views

Override track.phtml

Before marking as duplicate go through once I'm facing issue with overriding module-sales/view/frontend/templates/email/shipment/track.phtml I'm using Magento 2.3.3 Answer is here but its not ...
0
votes
1answer
46 views

Magento2: Override block not working

So i am trying to override the module-customer -> Block -> Account -> AuthorizationLink.php What i did is: I made a folder Customer in: app -> code -> Theme -> Customer in the ...
0
votes
1answer
17 views

Magento2 override block from theme level without custom module

I currently have a Magento_Shipping folder in my theme which is overriding the frontend files from magento/module-shipping Is it possible for me to override the block files from theme level without ...
0
votes
1answer
30 views

i want to override file vendor/magento/module-theme/view/frontend/layout/default.xml in magento 2.3 porto theme

I am using smartwave porto theme in magneto 2.3.2.I am new in magento.How to override this above title file. But I checked in app/design/frontend/Smartwave/porto/Smartwave_Porto/ In above path module-...
0
votes
3answers
61 views

Magento 2: How to override file Mail.php

I want to override this file :vendor\magento\module-contact\Model\Mail.php vendor/module/Model/Mail.php <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for ...
0
votes
1answer
75 views

Custom catalogsearch layout and template override not displaying custom block content [EDITED]

Edit: Could not having crontab and cron set up affect compiling the layout files and be related at all to the custom layout not loading? I have since moved all my logic out of the app/design/frontend/...
0
votes
1answer
29 views

How to display only two products as Cross Sell products in cart page Magento 2.3.2?

How to show only 2 products as corss sells in the cart view page, irrespective of the product that gets added to cart. Thanks.
0
votes
0answers
30 views

Confusion - Need Help Overriding html File and Passing Data

I successfully overrode a third party module's one step checkout shipping.html file within my custom module, but no data is passing into it. Are there other steps I have to follow in order for data to ...
0
votes
1answer
33 views

Custom options programatically magento2

I am trying to save custom options(drop_down type) for a specific product. In my case, I need to add a custom option in the loop. My code is here $json ='{"productID":"1","productPrice":"5585.00",...
0
votes
0answers
20 views

Should I avoid overriding? What can I do instead?

I want to add my custom fields and edit grids in admin sales order create page. The layout file consist of blocks and child blocks (link to layout). I would like to add my block after 'search' block. ...
0
votes
1answer
39 views

Magento2: How to override Catalog Product Mass Delete file?

I want to override Catalog Product Mass Delete file in Magento2 vendor/magento/module-catalog/Controller/Adminhtml/Product/MassDelete.php My Code: di.xml <?xml version="1.0"?> <...
0
votes
0answers
35 views

Magento2: Override issue for lib/web/jquery.js

I am trying to override below file in my custom theme. lib/web/jquery.js Seems it been override. But It stop other jquery from working. Due to this a lot of console error arise. Here is my code ...
1
vote
3answers
88 views

Magento 2 - How to override module from vendor?

I try to change some "view" files from a module called Amasty_MegaMenu. I installed the module via composer. It is located in vendor\amasty\mega-menu. So I created app/code/Amasty/MegaMenu with ...
1
vote
2answers
59 views

How to extend a third party extension?

I'm trying to edit a function from a third party extension, in this case, the moloni one. I want to override a function that is in Vendor\moloni\magento2\libraries\MoloniLibrary\Controllers\Products....
0
votes
0answers
64 views

Magento 2 : How to Override Magento\Catalog\Pricing\Render\FinalPriceBox in two different modules?

I'm overriding a Magento\Catalog\Pricing\Render\FinalPriceBox in my two different modules. Vendor\Module1\etc\di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
2answers
37 views

Magento 2 - overriden class extending overriden class not working

I have overriden the class Magento\Catalog\Block\Product\ProductList\Upsell with my own Company\Base\Block\Product\ProductList\Upsell. The class Magento\Catalog\Block\Product\ProductList\Upsell ...
0
votes
0answers
19 views

How to override SimpleProductPrice Model the right way?

I want to override the function executeByDimensions for some reasons. Below is my implementation. <!-- Vendorname/Modulename/etc/di.xml --> <?xml version="1.0"?> <config xmlns:xsi="...
0
votes
2answers
126 views

How to override “/vendor/magento/framework/Mail/Template/TransportBuilder.php”?

I want to override this file : /vendor/magento/framework/Mail/Template/TransportBuilder.php Did anyone know how to override this file. Thank you in advance.
0
votes
2answers
35 views

Unable to override Helper Class in Magento2

I have used below code to override helper class. Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=...
0
votes
1answer
22 views

Magento 2 how to override Magento\Directory\Block\Data using preferences?

This is my code but the block is not overrided My di file : <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
2answers
55 views

Magento 2 cant override the minicart.html file using html

I am going to override the minicart.html file using knockout for my custom code as below at the default file location is : /var/www/html/magento226/pub/static/frontend/Magento/luma/en_US/...
0
votes
1answer
86 views

Magento 2 , After the override model file give an error

I override block file Form.phpof catalog search module all work fine, but when override model file Advanced.php give an error from Form.php Error filtering template: Type Error occurred when creating ...
1
vote
1answer
121 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 ...
5
votes
2answers
97 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 Let me know if anyone has a ...
0
votes
1answer
89 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
72 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
29 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
26 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
55 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
118 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
28 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
36 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
104 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
44 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
23 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
59 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 ?

1
2 3 4 5
25