We changed our privacy policy. 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
2
votes
1answer
31 views

Override method magento 2

I am using magento 2.4.3 EE version Is their any way to override below method protected function _calculate($rule, $item, $qty, $rulePercent) for below classes \Magento\SalesRule\Model\Rule::...
0
votes
0answers
11 views

Overriding Coupon Code REST API

I would like to send an extra Header argument in the PUT V1/carts/:cartId/coupons/:couponId that is utilized by the REST API (that handles that PUT request). To do this, I would like to override that ...
0
votes
0answers
22 views

Function is slower when it overrides another function

I experienced the following issue and I'm wondering if anyone out there did experienced something similar: when a function that overrides another function is called, its execution is slower than when ...
0
votes
1answer
12 views

How to override a method of a class where the method itself is defined in its parent class, and only called in the current class?

I would like to extend the OrderSender class, located at Magento\Sales\Model\Order\Email\Sender\ and then override the method prepareTemplate($order), this method is actually defined in the Sender ...
0
votes
0answers
29 views

How can Magento 2 Vendor Model file override with custom module file

Magento 2 default paypal order after IPN completed turn to order status "Processing". This is the default order status I need to change paypal order IPN completed after order status "...
0
votes
1answer
41 views

How to override a method in Magento 2

I would like to override a method of a class, but it does not work. The changes added to the method are not used. File \Magento\Sales\Model\Order\Email\Sender.php <?php /** * Copyright © Magento, ...
0
votes
1answer
22 views

Magento 1: Can't override Enterprise/GiftCardAccount/controllers/Adminhtml/GiftcardaccountController.php

I can't override the controller inside of the Enterprise/GiftCardAccount/controllers/Adminhtml/ folder <config> ... <admin> <routers> <adminhtml> <...
3
votes
0answers
30 views

is mixin for library file's method possible?

I was solving one of the issues from the other stack exchange question. The fotorama library file which is located in lib/web/fotorama/fotorama.js has one method navUpdate(){...} at 2765 line. I want ...
0
votes
3answers
36 views

Magento 2.4 : How to override \Magento\Sales\Model\Reorder\Reorderp model?

Model\Reorder\Data\ReorderOutput must be compatible with Magento\Sales\Model\Reorder\Reorder::execute(string $orderNumber, string $storeId): Magento\Sales\Model\Reorder\Data\ReorderOutput I am ...
0
votes
3answers
35 views

Is it possible to override methods with arguments using preference?

I want to disable verification email sending from certain route. At first, I thought that I would create a plugin which would change the customer email to the dummy one before actually sending the ...
0
votes
1answer
139 views

Overriding GetDirectoryTree.php - preference not working

Having issues overriding Magento\MediaGalleryUi\Model\Directories\GetDirectoryTree.php. It is related to a current Media Gallery bug that causes Folders not to display (https://github.com/magento/...
0
votes
1answer
44 views

How to override _getHtml() function form topmenu.php file in Magento 2

I want to override _getHtml() function from topmenu.php file using block. So Please help me THANKS.
0
votes
0answers
22 views

How do I add a new JS function via mixin to the Magento checkout payment page's shipping information section?

I am trying to add a mixin in Magento 2 for the checkout/payment page shipping info section. There is an existing section in vendor/magento/module-checkout/view/frontend/web/template/shipping-...
0
votes
0answers
15 views

Success screen stuck in luma theme Magento 2.3.5 Community Edition

everything good? I'm trying a problem that I've never caught in these 2 years of magento, I would like to know if you've been through this for tips on how to get out. On the success screen, the layout ...
0
votes
1answer
41 views

How to override .phtml files in Magento 2.4

I want to customize the Invoice page, so I override .phtml file in: vendor\magento\module-sales\view\adminhtml\templates\order\invoice\create\items.phtml I tried to create many files but failed: ...
0
votes
1answer
38 views

Magento 2 How to add missing products in Order Invoice

Here am having some orders of bundle products, after generating Invoice am getting only 3 products getting displaying, I need to add the missing products programmatically in the invoice PDF. here is ...
0
votes
0answers
22 views

Magento adding .html in the middle of url after last category

I migrated all my products and categories (thousands) over from M1 to M2 and persevered all the URL writes. I have now found that if we modify a category in M2 it is adding a .html to the end of the ...
0
votes
1answer
41 views

Magento 2.4.2: Overriding Carrier.php of Magento Fedex module doesn't work

I got to override Magento FedEx Carrier.php in Magento-fedex module which is seen in the screenshot below. The structure of the overriden Fedex module under app/code in the project is as below. All ...
0
votes
3answers
39 views

How to override stripe module?

I'm trying to override this template: vendor/stripe/module-payments/view/frontend/web/template/payment/form.html with app/design/frontend/Vendor/Theme/Magento_Checkout/web/template/payment/form.html ...
0
votes
0answers
51 views

How to override de.xml available in vendor/magento/zendframework1/library/Zend/Locale/Data/ in 2.4.2

I want to change the currency position and change date formatting as well Does any one know how to override this file in custom module in my case it is de.xml? What I want to make changes? Date ...
0
votes
1answer
13 views

How to initialize javascript when the user scrolls?

I need the javascript to load after the user scrolls. Right now I have a .phtml file that just has this, <div id="razoyo-gtm-user-code" style="display:none;" data-mage-init='{ &...
0
votes
1answer
65 views

Override sales_order_grid.xml to remove print options from mass action drop down in sales orders

Hello everyone, I'm trying to override the file sales_order_grid.xml to remove some print options from the mass action drop down in sales orders. I'm using Magento 2.4.2. The original file is located ...
0
votes
2answers
35 views

Magento 2 - preference override not working for method sendConfirmationRequestEmail of module-newsletter

I try to override the method sendConfirmationRequestEmail from the module-newsletter Module in vendor\magento\module-newsletter\Model\Subscriber.php. Attempt: app\code\Company\Newsletter2Go\etc\di.xml ...
0
votes
1answer
37 views

Override Extension (/vendor) in app/frontend

I'm trying to override a layout .phtml file for a 3rd party extension which is located in /var/vendor_name/extension. As I understand, I should not be modifying the /vendor files, but this extension ...
1
vote
0answers
23 views

Magento 2 - How to override knockoutjs template which is already overriden from a third party module?

I try to override the knockoutjs template vendor\amasty\module-single-step-checkout\view\frontend\web\template\checkout\summary\item\details.html from my own Theme. The module amasty\module-single-...
0
votes
1answer
76 views

How to override core files into custom module app/code?

I am added a custom attribute in my wishlist knockout core file, Code : https://codeshare.io/5ZlEv7 Line Number: 142 I want to override into my custom module, I am created a custom module, how to ...
0
votes
1answer
31 views

Magento 2 - Product gallery magnifier not working after overriding Gallery class

My magnifier is not showing anymore IF THE PRODUCT HAS MULTIPLE IMAGES, after I have overriden the gallery class! I have enabled the magnifier in THEME\etc\view.xml: <?xml version="1.0"?&...
0
votes
1answer
56 views

How to override adminhtml html file

I need to overwrite the file vendor/magento/module-customer/view/adminhtml/web/template/default-address.html. I have tried creating a custom module and adding the file in app/code/myvendor/mymodule/...
0
votes
1answer
126 views

Override \Magento\CatalogSearch\Model\Advanced in Magento 2.4

Update I think this is where it is going wrong: ItemCollectionProviderInterface $collectionProvider = null, ProductCollectionPrepareStrategyProvider $productCollectionPrepareStrategyProvider = ...
0
votes
1answer
87 views

How to override third party module css into custom module

I am using a third-party module, i did model and template files override, how to override CSS in the custom module. Under web/css folder i am created three custom less file, how to rewrite from the ...
0
votes
1answer
124 views

Magento 2 Override Config.xml File to change the status of Braintree Module

I am trying to override config.xml file of vendor/paypal/module-braintree-core/etc module to changed the "order_status" value from "processing" to "pending" . I have ...
1
vote
1answer
58 views

Magento 2 error : Incompatible argument type: Required type: \Magento\Framework\Registry. Actual type: array; File:

Code use Magento\CustomerBalance\Helper\Data; use Magento\Framework\App\ObjectManager; use Magento\Framework\Registry; use Magento\Framework\View\Element\Template; use Magento\Framework\View\Element\...
0
votes
1answer
56 views

Override a model not working Magento 2

I tried to override a model in Magento\Quote\Model\Cart\Data\CartItem but I cannot override it. here is my di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
0
votes
1answer
69 views

Magento 2 : override Magento_Sales::email/items/creditmemo/default.phtml

What is the best way to override below template file in module ? Magento_Sales::email/items/creditmemo/default.phtml
1
vote
1answer
60 views

Override Magento\Sales\Model\Order\Email\Sender\CreditmemoSender Magento 2

How to override below file in module ? Magento\Sales\Model\Order\Email\Sender\CreditmemoSender.php
1
vote
1answer
21 views

Magento2.4.2 own module class does not appear in generated (no error while setup:ci:compile)

sorry to bother but I'm really stuck with a strange problem. My goal is to have the invoice PDF changed but the class I've created to do this (which is currently a bunch of code from another guy) does ...
0
votes
2answers
162 views

Can't override list.phtml in Magento 2.4

I try to override the list.phtml in Magento 2.4 but it's not working. Here is the path to my new file : app/design/frontend/Magento/timeote/Magento_Catalog/templates/product/list.phtml All the other ...
0
votes
0answers
13 views

Listing page product grid design not applied on home page

I am trying to add category products on the home page using widgets, the product grid is shown without design what I made on the listing page. Listing page product grid : I moved wishlist icon from ...
0
votes
0answers
11 views

How can I override a Collection.php file from a 3rd party plugin?

I have 2 plugins that are clashing with each other. I figured out a fix, and I have to change a collection.php file, and I don't want it to get overwritten in a future plugin update. How can I get ...
0
votes
1answer
33 views

Issue overwriting a third party extension?

I'm trying to overwrite only this file but I'm having no luck in it working, am I doing something wrong? vendor/mageplaza/module-lazy-loading/Plugin/Model/Template/Filter.php app/code/MySite/...
0
votes
1answer
52 views

How to override top menu and add icon in Magento 2?

How to override top menu and add icon in Magento 2? I'm using Magento v2 and want to have icons added to each category menu item.? How can I override this? I added the Attribute for icon in category (...
0
votes
0answers
62 views

Magento 2: Override Magento Framework class Not working

I want to override this class function in Magento 2 \Magento\Framework\HTTP\PhpEnvironment\Request::getServer() etc/module.xml <module name="Test_Override" setup_version="1.0.0"&...
0
votes
1answer
24 views

How to override the square extension on the checkout page?

Im trying to customize the public_html/vendor/square/module-squareup-omni/view/frontend/web/template/payment/square.html I made override, but it doesn't work /public_html/app/design/frontend/Vendor/...
1
vote
2answers
174 views

Magento 2 how to override theme-adminhtml-backend view.xml in custom module?

By default Magento 2 creates more than 20 duplicates of each product image..! (why???) I have got this down to 5 using view.xml in my theme, but there is one extra set of image sizes I need to change, ...
0
votes
2answers
258 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
58 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
30 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
25 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
128 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
48 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 ...

1
2 3 4 5
26