Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [overrides]

Questions about overriding core features (class rewrites, local code pool, theme overrides). For URL rewrites, use the "url-rewrite" tag instead.

0
votes
1answer
13 views

Magento 1.9 overwrite core

Is it possible to overwrite Magento core functionality in this way? - Mage_Sales_Block_Order_Total { protected function _initTotals(){ //this is core } } and overwrite it with this - ...
0
votes
0answers
6 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. ...
1
vote
0answers
16 views

Magento 2 Override Gallery.php file

I would like to override /vendor/magento/module-catalog/Block/Product/View/Gallery.php file getGalleryImagesJson function In result I would like to get - public function getGalleryImagesJson() { ...
1
vote
1answer
26 views

How to add sub-menus to Magento admin dashboard in Magento2.2.5?

How to add sub-menu to Magento admin dashboard in Magento 2.2.5? I need to override the vendor file. Refer my Screenshot. Any help would be appreciated.
1
vote
0answers
34 views

ConfigurableProduct: How to get the configurable products out of stock?

I want to show all the attributes from my configurable product on my select. I followed this tutorial: Magento 2.2 How to show out of stock in configurable product, with some changes and fixes. So, I ...
1
vote
1answer
24 views

third party module controller overriding not working in magento 1

my config.xml <?xml version="1.0"?> <config> <modules> <Mindtwo_Formbuildercrfprotection> <version>0.0.1</version> <depends&...
2
votes
0answers
17 views

How to override Magento 2 welcome email upon new customer account creation

I need to customize default Magento welcome email template which is sending upon new customer account creation in my custom module. I'm using the following functions for sending welcome email upon ...
1
vote
0answers
26 views

Unable to override account creation email template

I need to modify the welcome email sent to user upon new account creation. I need to do this in my custom module. I tried to override the function sendNewAccountEmail in Magento\Customer\Model\...
0
votes
2answers
31 views

How to override getAvailableMethods method in Magento\Payment\Model\MethodList

anyone have idea how to override getAvailableMethods method from Magento\Payment\Model\MethodList class.
0
votes
1answer
20 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
1answer
30 views

Magento 1.9.3 - Can we override Mage_Core_Model_Session_Abstract_Varien class?

I am trying to override Mage_Core_Model_Session_Abstract_Varien class but not getting success. My config.xml file - <models> <coreoverride> <class>...
0
votes
0answers
28 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
39 views

Magento 2 How to override adminhtml Js components

Basically I want to override grid.js component file in Magento 2 Require config view/adminhtml/require-config.js Require config code. var config = { map: { '*': { ...
0
votes
2answers
20 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 ...
1
vote
1answer
19 views

How to add new tab to any custom extension?

I have one previously installed extension which have 3 tabs already added , Now I want to add new tab below it , How can I achieve this . I want to add new tab regions . <adminhtml> <...
0
votes
1answer
8 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 ...
1
vote
0answers
23 views

Magento 2 - How to make responsive layout using child theme css?

How to override styles-m css to set responsive layout? I just add custom blocks in footer area which are not responsive in mobile view. How to override styles-m in Luma child theme? Thanks
0
votes
1answer
38 views

How to override a phtml from extension?

I am using Mega Menu free extension from Ibnab. I want to override menu file to add custom li. app/code/Ibnab/MegaMenu/view/frontend/templates/html/top-mega.phtml Is there any way to override this ...
0
votes
1answer
19 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
1answer
37 views

Overriding a template file from a 3rd party module

What I know Overriding a template from vendor/magento/<magento_module> is straight-forward enough. So, to override a magento_catalog file I'd do: app/design/frontend/<Vendor>/<Child&...
1
vote
0answers
49 views

Private Function rewrite in magento2

i want to override helper class method private function _getGeneralFromAttributeSets(array $attributeSetIds) i use this code and create helper in my module folder <preference for="Test\Test\...
0
votes
1answer
87 views

Magento 2 - Overriding `Magento\Sales\Model\Order\Payment\Info` not working

I am trying to override the Magento\Sales\Model\Order\Payment\Info.php to solve an error due to serialized migrated data from Magento 1 to Magento 2. The method I am trying to override is a protected ...
0
votes
2answers
36 views

Magento 1 - setTemplate in block class constructor does not work

I try to overwrite the template app\design\frontend\venedor\custom\template\catalog\product\view\options\type\select.phtml with app\design\frontend\base\default\template\wr\catalog\product\view\...
1
vote
1answer
36 views

Why is my override not working?

I've been trying to create an override for the addto.phtml file but it doesn't seem to be working. I have this theme file: /app/design/frontend/Vendor/theme/Magento_Catalog/product/view/addto....
1
vote
1answer
52 views

How to enable a shipping method for a specific SKU?

I'd like to create a module to enable the Table Rate Shipping Method if a product with a specific SKU is the customer cart. How could I do that?
0
votes
0answers
26 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
18 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
2answers
46 views

How Override the grid customer magento 2

I want to delete some columns from the grid also add new others(custom attributes) and show the list of customers according to group (i will have two grid according) to group) I added the sequence ...
0
votes
0answers
26 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
0answers
34 views

Calling parent::execute() in controller that extends an abstract class

I have a module where I would like to add functionality to disable it if a certain configuration variable is set. According to all resources I have read, including this question: How to dynamically ...
1
vote
2answers
19 views

Rewrite Model in magento

I want to rewrite the Magento 1 model Mage_Sales_Model_Quote_Address_Total_Collector protected function _initRetrievers() How can rewrite this?
0
votes
2answers
38 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
1answer
77 views

Override Magento UI js file

How can I override this file on my theme? /vendor/magento/module-ui/view/frontend/web/js/view/messages.js I'm a newbie to M2
0
votes
0answers
30 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\...
1
vote
2answers
35 views

Rewrite function , when should I use local/mage and when shouldI use the rewrite by a module

I'm working on Magento 1.9 I can see I have 2 options to rewrite a mage file . First, I just copy the file with the same path in local/mage/.... Second, I use a module and rewrite my method using etc/...
0
votes
2answers
40 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 ...
1
vote
2answers
70 views

How to override E:\xampp\htdocs\mage\vendor\magento\module-customer\Controller\Account controller magento 2?

Actually i am trying to override E:\xampp\htdocs\mage\vendor\magento\module-customer\Controller\Account controller using custom module here i am trying to to override $message = __( ...
0
votes
0answers
18 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
3answers
82 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
39 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
32 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
62 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 ...
2
votes
1answer
44 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\...
0
votes
2answers
52 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
54 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 ...
3
votes
1answer
119 views

Overriding template for a specific language

I would like to override a template but only for a specific language (ar_SA) The template I want to override is: Magento_Catalog/templates/product/list.phtml I have tried putting it in the following ...
1
vote
1answer
81 views

Make “Pick up at store” function in checkout layout file

I'm about to override checkout phtml file and also make a javascript file which allows the change of shipping method when a customer choose "pick up at store". Let me show you what i am supposed to ...
1
vote
1answer
59 views

Magento 2 | Override Freeshipping.php

I want to override this file: /magento/vendor/magento/module-offline-shipping/Model/Carrier/Freeshipping.php I created a module, this is the di.xml file: <?xml version="1.0"?> <config ...
1
vote
0answers
23 views

how to overwrite the renderlayer.php in magento 2

When i try to overwrite the Renderlayer.php of module-swatches I am getting error [2018-09-24 06:48:41] report.CRITICAL: Warning: Declaration of Kygo\Swatches\Block\LayeredNavigation\RenderLayered::...
1
vote
0answers
19 views

Overwrite a class extended many times

When I have to override a method of a class that is used as extends in many modules I have to copy the class path and put it under app /local/Mage/.../Core_Class_Extended_ManyTimes.php. But there is ...