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
3
votes
1answer
133 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.
3
votes
1answer
2k views

Difference between Extend a layout and Override layout

In Magento2 currently, I override XML file using below way and make required changes. app/design/frontend/Vendor/Theme/Magento_Catalog/layout/default.xml But I have seen in Magento dev docs ...
3
votes
4answers
2k views

Magento 2 override block not work properly

I am overriding the Catalog Search result block but it is only showing title not product listing. Can anyone tell what i missed here? di.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
3
votes
1answer
5k views

Magento2: Override layered navigation template

I am trying to override layered navigation template in a Magento2 app. Here is my code: Layout configuration: <!-- app/code/MyVendor/MyModule/view/frontend/layout/default.xml --> <page ...
3
votes
1answer
6k views

How to Override or Extend protected or parent function in Magento 2 using Plugin

I need to override protected function or parent function ex Magento\Checkout\Controller\Cart\Add is extended from Magento\Checkout\Controller\Cart and getBackUrl() is a Magento\Checkout\Controller\...
3
votes
1answer
580 views

How to override Paypal Standard Model

I am trying to override the Paypal Standard Model using the following files: app/code/local/Me/Paypal/etc/Config.xml <?xml version="1.0"?> <config> <modules> <...
3
votes
1answer
168 views

Magento 2 override /lib html file [duplicate]

I am trying to override an html file in the lib folder, but I cant get it to work. Here is what I have so far: Path to file I want to override: /lib/web/mage/gallery/gallery.html Path to file I want ...
3
votes
2answers
323 views

Magento 2 : How to override a custom module which install via composer?

I have installed one custom module using composer as usually that module was installed in vendor directory is there any way to override phtml file in the same module like name but on app/code module ...
3
votes
1answer
493 views

I am trying to override core interface in Vendor\magento\sales\Api\Data\OrderItemInterface.php

My di.xml code is here, is there any alternative way to override an interface for core file. <preference for="Magento\Sales\Api\Data\OrderItemInterface" type="Vendor\Name\Api\Data\...
3
votes
1answer
59 views

Overriding Layout

Here are the official documents. I am using "porto" as the parent theme, and "porto_base_child" as its child theme. In the backend I have porto_base_child selected for all store views. For the parent ...
3
votes
2answers
4k views

Magento 2 override the product collection(Magento\Catalog\Model\ResourceModel\Product\Collection.php)

We want to override the product collection model class(Magento\Catalog\Model\ResourceModel\Product\Collection.php) We flow the below process to override the addAttributeToSort method but not working. ...
3
votes
1answer
545 views

Magento 2 Override image problem (static image of parent theme)

Having a parent theme, I have created a child theme. (Magento 2.2) Parent theme: Mgs/claue Child theme: Bee/elag In the web there is a Title of page with a background css: .page-title-wrapper { ...
3
votes
1answer
491 views

M2.1.9 : How to override the magento default .phtml file under vendor\magento\module-sales\view\frontent\templates\email\items.phtml

There. After success migration work, i need to handle devlopment work,ugh. I'm a mad newbie about Magento2 so could you let me know how to overwrite the default phtml file under vendor/magento .. ...
3
votes
2answers
965 views

How the Base folder will help on Magento 2 modules or themes fallback mechanism

As from official docs : base : used for both front end and admin html. As the part of Magento Theming, how and when to use base folder and how the fallback work with base folder. As i observed in ...
3
votes
2answers
4k views

How to override Pdf Invoice in Magento 2?

Magento 2: I was looking to add a custom text on the footer in pdf invoice. I have done this by adding a small piece of code here in this file vendor/magento/module-sales/Model/Order/Pdf/Invoice.php ...
3
votes
1answer
1k views

Magento 2 override Pricing\Price\ConfigurablePriceResolver how to solve?

Hi I'm using Magento 2. I'm trying to override Pricing\Price\ConfigurablePriceResolver by adding a plugin or preference in the app/code folder but I can't make it work. I need to replace the ...
3
votes
1answer
806 views

Magento2 cannot override class Magento\GroupedProduct\Model\Product\Type\Grouped?

I was trying to override the above class (Magento\GroupedProduct\Model\Product\Type\Grouped) Below is my app/code/Best/CustomGrouped/etc/adminhtml/di.xml <config xmlns:xsi="http://www.w3.org/2001/...
3
votes
1answer
1k views

Magento 2: controller preference not working after setup:di:compile

I need to rewrite a couple of adminhtml controllers in Magento 2. I am using preference and my configuration in etc/di.xml file looks like this: <?xml version="1.0"?> <config xmlns:xsi="http:...
3
votes
1answer
970 views

How to properly override a core JS file in Magento2

We are attempting to override the behavior of Bundle Products in Magento2, specifically, to enable user defined quantities for Checkbox type products within the bundle. We have written an extension, ...
3
votes
1answer
2k views

rewrite block not working

i try rewrite my block on app/local/lesson7/test/block but its not working my modules xml (lesson7.xml) <?xml version="1.0"?> <config> <modules> <Lesson7_Test> ...
3
votes
1answer
854 views

Override Adminhtml importexport dataflow Profile Controller

I'm trying to override ProfileController located in app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php I created a new module to handle that as following : app/etc/...
3
votes
2answers
4k views

Overriding Contact Controller - No difference

After running through every tutorial on the internet about overriding core controllers I resort to posting here. Magento: 1.9.1.1 community Namespace: Tft Module Name: Customcontact Files: /app/...
3
votes
2answers
1k views

Is it possible to hook into the image upload function on the wysiwyg editor?

I'm trying to trigger a function after an image has been uploaded using the wysiwyg editor but I don't think an events is fired after this operation. I know it's relatively easy to do so when you ...
3
votes
1answer
4k views

How to override / extend local extension model in magento?

I got a problem in overriding magento model local extension. Here is my module config: etc/modules/Mycompany_OrderExport.xml <?xml version="1.0" encoding="UTF-8"?> <config> <...
3
votes
2answers
6k views

Handling AJAX requests to display template partials

Pretty new to magento and I'm setting up a custom module to override the core newsletter. All I really want to do is add ajax submit to the form, which is straightforward so far, and also allow the ...
3
votes
1answer
320 views

Magento 2 - Argument 2 missing error on overriding file

I am trying to override Magento\Catalog\Block\Category\View added this code in di.xml <preference for="Magento\Catalog\Block\Category\View" type="Naheed\AllProducts\Block\Category\View" /> ...
3
votes
1answer
66 views

Override OnepageController.php Not Working

I'm trying to override the successAction in the app/code/core/Mage/Checkout/controllers/OnepageController.php. I have done the following: I've created my override folder here: app/code/...
3
votes
4answers
3k views

How to override core files into app/code/Magento folder in magento2

How do I override core files in app/code/Magento folder in Magento 2? I want to change core functionality so I need to override core files in the app/code/Magento folder instead of directly changing ...
3
votes
1answer
139 views

Overriding magento core scripts.js file: Magento 2

In our custom module, we have pages similar to the order page. We need some changes in the scripts.js file only in those custom module pages. Following is the core file we are using is module-...
3
votes
1answer
737 views

How to override/extend base layout file via Module in magento2?

How can we override/ extend a base layout file via Module in Magento2? For example, I need to override the "catalog_product_prices.xml" from module-catalog/view/base/layout/catalog_product_prices....
3
votes
4answers
946 views

Can not override Magento/Checkout/Model/DefaultConfigProvider.php file

I want to change a file in Magento\Checkout\Model\DefaultConfigProvider file I am trying to change data in function but I can not override funciton Where I am going to Wrong. I have Created a File ...
3
votes
1answer
637 views

Magento 2 : How to override core js in Extension?

In magento 1.X we can check my exention is enabled or not in xml via below kind of code. <action method="removeItem" ifconfig="easylife_switcher/settings/enabled"> <type>skin_js&...
3
votes
2answers
216 views

Need to override Mage_Core_Block_Abstract function _toHtml()

I have 4 different stores in the same Magento system, so I have 4 different themes. One of them is overriding on /code/community/mage/cms/block/block.php the function _toHtml() like this: protected ...
3
votes
0answers
53 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 ...
3
votes
1answer
239 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 ?
3
votes
0answers
158 views

magento 2 how can I overwrite ar_SA.xml language symbol file?

I want to overwrite this file in my module. vendor/magento/zendframework1/library/Zend/Locale/Data/ar_SA.xml How can I archive this ?
3
votes
0answers
38 views

I want to rewrite phtml file in module-grouped-product

I am trying to rewrite the phtml file but it's not working my code is : a main file path is public_html/vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml ...
3
votes
0answers
50 views

Magento 2 Can We override **Add New Product** Page ? in custom_module on frontend area?

I want to make a custom page where vendor can add New Product with all text fields which Magento provide from the backend. I want to override this same page on my custom module on the frontend side. ...
3
votes
1answer
96 views

Overriding Magento 2 file causes fatal error

I've created an override by copying the original file here and then making my changes: app/code/Vendor/Module/view/adminhtml/templates/order/create/items/grid.phtml I have created a layout XML to ...
3
votes
1answer
165 views

How to Override custom module Model in custom module Magento 2?

I have two Modules in app/code. Xyz_Xyz - Module that already exists. I can't change its file. Abc_Abc - Module that I creating to override Xyz_Xyz Model. The code I try is here. app/code/Abc/Abc/...
3
votes
0answers
480 views

No Way to Clear/delete a Selected Image using Media Browser on category edit page

With reference to this Q&A there's another question. How do I clear the image selected using the Media Browser on category edit page in the admin Panel? Here's what I tried: in app/code/...
3
votes
1answer
1k views

Magento2 rewrite: product resource collection class does not effect on functions

I have rewrite catalog product resource collection Magento\Catalog\Model\ResourceModel\Product\Collection. Class override successfully but functions override is not working. Suppose, i want ...
3
votes
2answers
1k views

How to override layout file, which is already override by other theme - layout\override\base\somel_ayout.xml

How to override layout file, which is already override by other theme. For example, we have existing theme. app\design\frontend\<Vendor>\<themeone>\Module_Vendor\layout\override\base\...
3
votes
2answers
12k views

Magento 2 - Override default product page template file

I want to add some static data in magento 2 product page in details.phtml So please tell me how can i override this file without create any new module : /opt/lampp/htdocs/magento2/vendor/magento/...
3
votes
0answers
350 views

Magento2 : Override Admin Js file

I am working on Magento 2.1 CE. My current active Theme is the Default LUMA Theme I wish to override the CORE Modules "bundle-input-type.js" located in "vendor\magento\module-bundle\view\adminhtml\...
3
votes
2answers
4k views

How to override cart\addcontroller in magento 2?

I want this function in \code \StwBuyXGetY \BuyXGetY \Controller\Checkout\Cart\Add.php(this is written in magento 1.9, I want to convert it into magento 2). But I cant add any new function in add ...
3
votes
1answer
3k views

Magento 2 : Getting an error "syntax error, unexpected 'Abstract' (T_ABSTRACT)"

I have create 2 files as below : Namespace/Module/Model/Test.php <?php namespace Namespace\Module\Model; use Namespace\Module\Model\Payment\Method\Abstract; class Test extends Abstract { } ?> ...
3
votes
2answers
939 views

How to rearrange the links available in header in magento 2.0.2?

To Rearrange the Header links(ie to bring the My Wishlist link at last)in magento 2.0.2 (parent-theme:blank) I just overrided the default.xml file in vendor/Magento/module_wishlist/view/frontend/...
3
votes
0answers
1k views

layout.xml : change item renderer in checkout_onepage_review [closed]

I would like to change the item listing presentation in the checkout page. I then made a custom checkout/onepage/review/item.phtml file and in my module layout file I defined it based on the original ...
3
votes
3answers
2k views

override admin product information page

I was created admin module for manage supplier information, next I want to add supplier list drop down to product details ( catalog > manage product > Inventory >) How to do it ?

1
3 4
5
6 7
26