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
0answers
16 views

Overriding function or replacing interface (core)

Magento beginner here. Currently, I am trying to send multiple options for a product attribute via REST API. Since Magento isn't capable of doing this I am trying to override the add function in ...
0
votes
1answer
10 views

Magento 2 How to Override Cart/Item/default.phtml file in my Custom module

I create Default.phtml file in Vdcstore/QuantityDropdown/View/frontend/templates/cart/item/default.phtml Hello I Create checkout_cart_item_renderers.xml file in Vdcstore/QuantityDropdown/View/frontend/...
0
votes
2answers
36 views

Magento2 Override getOrderOptions() in plugin

Magento2 override this function getOrderOptions() which is in the file vendor/magento/module-catalog/Model/Product/Type/AbstractType.php This is a abstract class. Please guide public function ...
0
votes
0answers
12 views

How to override API Interfaces of 3rd Party Modules

I want to override the Interface of a 3rd party Module ` app/code/Vendor/Module/Api/Data/ExampleInterface.php ` in some my custom module to add new methods. I have followed a guide but that didn't ...
0
votes
1answer
41 views

Magento2 : How to override /vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php

Does anyone know how to override this file?
0
votes
1answer
13 views

Can't override magento contact

I seem to be missing something when it comes to overriding controllers. This is a somewhat recurring question in here, but nothing I've found in other questions worked for me, so either they might be ...
0
votes
1answer
40 views

How to override core plugin method?

I would like to override core plugin method Core plugin path Magento\InventorySales\Plugin\StockState\CheckQuoteItemQtyPlugin.php In this file I would like to override aroundCheckQuoteItemQty() ...
0
votes
0answers
10 views

In Magento1.9 is there a way to override existing overseas customers from selecting shipping address same as billing at one page checkout?

Our client has a multisite which contains 5 individual sites selling different products. The client is based in Scotland and for years has been shipping worldwide. However, after Brexit, our client ...
0
votes
1answer
30 views

Magento 2: Problem overriding product/view/form.phtml in custom module

I tried using this in my catalog_product_view.xml: <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ -->...
1
vote
1answer
22 views

How to know which file to make changes in Magento 2

I am new in Magento 2 and I m having very difficulty in finding which templates or blocks to make changes. I know how to override files. I had previously made changes in the theme but still, I can't ...
0
votes
2answers
33 views

Magento 2 - Can't override class - must be an instance of

I created a preference override for Magento\Quote\Model\Quote\Item\CartItemPersister in my own module. But I get this error in the browser developer console: Total: Type Error occurred when creating ...
2
votes
1answer
46 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
14 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
25 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
17 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
39 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
55 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
49 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
65 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
44 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 ...
1
vote
1answer
212 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
61 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
25 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
16 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
48 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
77 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
30 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
57 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
53 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
76 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
16 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
90 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
121 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
41 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
99 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
65 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
100 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
158 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
150 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
180 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
102 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
59 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
86 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
76 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
22 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
257 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
18 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
12 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 ...

1
2 3 4 5
26