A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
138 views

Override Customer Account Edit on Frontend

Magento 2 newbie. I am trying to override the default 'Customer Account Edit' form on the Frontend. I'm not able to get my template to "override", its always loading the default template [/html/...
0
votes
1answer
30 views

Magento 2: How to override new_grid.phtml in Custom Module?

I need to override product/widget/new/content/new_grid.phtml file in my custom module. Please tell me the possible ways to do it.
0
votes
0answers
12 views

How can I create a file that will override the core file containing the header section design of the frontend from my own module in app/code

How can I override the header section of the file containing the name of the default message and sign in options from my own module under app/code.
0
votes
1answer
97 views

Moving a vendor module to new cron group in magento 2

We are utilizing the Firebear module to import product and pricing data which run in the default cron group. The import takes quite a bit of time/resources so it was recommended to move the Firebear ...
0
votes
1answer
38 views

Magento 2: How we can add construct into overridden class

If There are no parent::__construct from parent class then How we can add construct into overridden class?
0
votes
0answers
24 views

Topmenu override declaration error Magento 2.3

Topmenu override declaration getting error in Magento 2.3
0
votes
1answer
15 views

Extend/Override Javascript Included from Layout (head->link)

I want to extend: vendor/magento/module-catalog/view/adminhtml/web/js/edit-tree.js Which is loaded by layout: vendor/magento/module-catalog/view/adminhtml/layout/catalog_category_edit.xml:12 Why I ...
0
votes
1answer
52 views

handle conflicts when override Order Sender class in magento 2

I am overriding OrderSender class for add custom variable in order confirmation mail. This variable's value is dynamic. but this file conflicts and give an error like "Type Error occurred when ...
0
votes
0answers
19 views

Edit a phtml file exists in adminhtml

I want to edit the invoice from adminhtml, so what is the best way to edit a phtml file in adminhtml folder?
0
votes
0answers
41 views

How do I override an html file located in the admin seccion? [duplicate]

I'm using the new Magento 2.3 pagebuilder and i'm trying to add a "span" tag inside a button of the banner/poster of the pagebuilder. I found out where I can change the pagabuilder view on my ...
0
votes
0answers
25 views

How to add custom method in product interface.And how to overide productinterface and product model

I want to add custom method in product interface and override product interface and product model.
0
votes
0answers
155 views

Magento2.3.0 How to overrite Customer this file Magento\Customer\Controller\Account

Please if anyone know how to override this file in our theme please reply me "Magento\Customer\Controller\Account" creatPost.php file This is my Mageplaza/HelloWorld/etc/di.xml <config xmlns:...
0
votes
1answer
127 views

Override SenderBuilder class to add Bcc when sending invoice

I didn't found an event when invoice email is sent, so i tried to override Magento\Sales\Model\Order\Email\SenderBuilder class, the override is working but getting the customer attribute invoice_email ...
0
votes
0answers
33 views

Magento2: unable to call catalog_product_view_type_downloadable.xml in magento2?

I have override the catalog_product_view_type_downloadable.xml in my module as MyVendor/Downloadable/view/frontend/layout/catalog_product_view_type_downloadable.xml But unable to call the changes ...
0
votes
0answers
49 views

How to override app/code/core/Mage/Core/Controller/Varien/Router/Admin.php?

I want to override core class of Magento 1: app/code/core/Mage/Core/Controller/Varien/Router/Admin.php How I can do that?
0
votes
0answers
28 views

Unable to override model class, only this file has problem

I am overriding Worldpay Model class that create xml request file. <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
159 views

Override __construct Magento\Catalog\Model\Product

I have overrided the Magento\Catalog\Model\Product. When I create a new function, I can access it with $this->_currentProduct->myNewFunction() in my code. But, in my new function, I need to ...
0
votes
1answer
65 views

What happen when two module override same file?

I am coming from Wordpress development & now I started Magento module development. I am following this tutorial. I am just trying to add social sharing buttons to the product edit page. ...
0
votes
0answers
36 views

Magento 2 : How to override a Abstract Class? [duplicate]

I made some modification related to magento2 order pdf. I want to know how to override a abstract class AbstractPdf extends \Magento\Framework\DataObject
0
votes
0answers
37 views

Payment Method Overwrite [duplicate]

I want to add new field in my payment method. I have added the field in phtml file in module but now I want to rewrite the file in my module. How can I achieve that?? Also let me know how to rewrite ...
0
votes
0answers
80 views

Magento 2. How to Override Search (CatalogSearch)

I want to hide the specific product which I select from Configuration using Categories in the Search. e.g if I select Gear Category in configuration then If I search the Product of the Gear I want to ...
0
votes
1answer
132 views

Override core files in Magento 1.9.4 (Varien.php)

What would be the most appropriate structure of the module in order to rewrite function validate() at app/code/core/Mage/Core/Model/Session/Abstract/Varien.php The idea is to rewrite that block ...
0
votes
0answers
16 views

Magento 2 Override Unit.phtml and Row.phtml in Magento_Checkout

I am trying to override both unit.phtml and row.phtml within my Magento_Checkout module. I am doing everything that I would normally do but it doesn't seem to be overriding like the other phtml files. ...
0
votes
1answer
21 views

Consequent overrides of core class

I have two modules: Vendor_Module1 Vendor_Module2 In either module I'm going to extend \Magento\Directory\Model\Currency to override different methods I noticed that only one module can override ...
0
votes
0answers
95 views

Magento 1.9.x - How can rewrite Mage_Core_Model_Session_Abstract_Varien class

I am trying to re-write Mage_Core_Model_Session_Abstract_Varien class in my custom module but getting error : Recoverable Error: Argument 1 passed to Mage_Core_Block_Messages::addMessages() must be ...
0
votes
2answers
95 views

How To Pass A Custom Price Value To Product List Price Renderer In Magento 2?

We have come across an issue that I'm trying to solve. In order to overcome this bug https://github.com/magento/magento2/issues/10009 where discounted prices are not applied per customer group, I've ...
0
votes
1answer
41 views

Override function from grouped.php

I am changing the table for a grouped product. I have overridden the grouped.phtml file to make changes. But I need to override the function: getAssociatedProducts($product) // Grouped.php Because ...
0
votes
1answer
31 views

How to overwrite module-ui/Component/Form/Element/DataType/Date.php::public?

I changed the prepare function in vendor/module-ui/Component/Form/Element/DataType/Date.php. Now I want to override it in a way that is update safe. How would I do that? Using my own module? Magento ...
0
votes
1answer
52 views

payment block rewrite not working

I want to rewrite Mage/Payment/Block/Form/Container.php with another file inside my module. In my module's config file, I have: <global> <blocks> <payment_form> <...
0
votes
0answers
96 views

Grid showing a loader continouisly and a popup something went wrong

I created 2 sub menu under All customer and i created two grids the first for customers that belong to group1 and the second for customers that belong to group 2 but still don(t know how to filter the ...
0
votes
0answers
124 views

Magento 2: Display some colunms in the grid customer according to group

I have created a new menu so that when clicking on all customer, I have two sub menu: local and export And I want to have in the local grid the list of customers that belong to group 1 and in ...
0
votes
0answers
52 views

Magento 2 EE : Override configure function(addbysku.js) of Magento_AdvancedCheckout module using mixins

In addbysku.js file, I want to override the configure function of Magento_AdvancedCheckout module using mixins in Magento Enterprise Edition. And my js code is, define([ /* eslint-disable strict */ ...
0
votes
2answers
61 views

Can't rewrite block (Mage_Review_Block_Product_View) Magento M1

Cant rewrite Mage_Review_Block_Product_View for some reason. In my config file I have: <?xml version="1.0"?> <config> <modules> <NameSpace_ModuleName> ...
0
votes
0answers
45 views

Filters in custom product collection M2

I have created a new category in backend and fetched products programmatically via override ListProduct block <preference for="Magento\Catalog\Block\Product\ListProduct" type="Custom\Vendor\Block\...
0
votes
2answers
305 views

Magento 2: Override js in custom module doesn't work?

I'm trying to override js in custom module, but that module which i want to override is already override some js from magento_checkout. And seem like it doesn't work :( Here is how i did: That ...
0
votes
1answer
255 views

Magento 2 how to override the admin user's grid

I am trying to add new custom field in admin user's grid but it's not in UI components. They are generating grid with data object in Magento\User\Block\User. Can any one please provide the solution to ...
0
votes
2answers
509 views

Magento 2.1.10: How to override Magento\Framework\Session\SessionManager

I'm looking for solution for override. Magento\Framework\Session\SessionManager I use the usually way (preference in di.xml), but no hope. di.xml <?xml ...
0
votes
1answer
268 views

Proper path to place template overrides and translations for Mageplaza Blog extension

I recently installed Magento 2 Blog extension FREE and I want to adjust templates to suite my theme and add some translation strings. I know that template overrides should be placed in: app/design/...
0
votes
0answers
86 views

How to override Add to cart functionality in Magento 2.2

How to override Add to cart functionality in Magento 2.2 using custom extension?
0
votes
1answer
351 views

Magento 2.2: How can I override “checkout.item.price.unit” and “checkout.item.price.row” in the cart?

My goal is to switch out the .phtml files: magento_module-wee::item/price/unit.phtml as well as magento_module-wee::item/price/row.phtml with my own custom ones and change how the prices are displayed ...
0
votes
2answers
192 views

I am trying to override multishipping.php file in vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface I've added preferences tags in ../etc/di.xml ...
0
votes
1answer
187 views

Magento 2 - Issue on override of Multishipping checkout model

With this question I want to go further and to exactly know if it's possible to override: vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php so far I've experienced some ...
0
votes
1answer
29 views

List of files those are updated in upgrade Magento 2.2.x1 to 2.2.x2

I need to list all the files which are modified as we upgrade Magento 2.2.x1 to 2.2.x2.So that I can figure out the rewrites and the other plugins which I have made are working properly after the ...
0
votes
1answer
39 views

How to Override PTHML file in magento 2

I am trying to override phtml file. for that, I have changed the path in layout for phtml and block. but my changes are not working. I have made an error in the file but nothing happens. here is my ...
0
votes
1answer
260 views

Override module-fedex Carrier.php constructor

I'm going to override module-fedex constructor, here is origin at \vendor\magento\module-fedex\Model\Carrier.php public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $...
0
votes
1answer
66 views

Magento 2 getting Error override resource model

I have facing Below error when I override resource model Fatal error: Call to undefined method Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Interceptor::getAttributeId() ...
0
votes
0answers
35 views

Override class not working on linux server in magento2?

I want to override Magento\ImportExport\Model\Import\Adapter class i have set in di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
2answers
119 views

override Magento_Catalog in 2.2

I want to override prices in catalog module. What I did was to test on actual phtml vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml It works as intended. Now, ...
0
votes
2answers
46 views

adding a new block with overwritten class fails

I have created a new module (to extend checkout): <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
0
votes
2answers
41 views

How to override .phtml files in Magento 2 without customising theme

I just want to override the customer account and login form for adding custom fields and external link. How do I do that using custom module please avoid creating the theme or customize the theme.