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 about overriding core features (class rewrites, local code pool, theme overrides). For URL rewrites, use the "url-rewrite" tag instead.

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

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 the ...
0
votes
1answer
21 views

How Override the grid customer magento 2

I want to delete some colunms 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 sequeence ...
0
votes
0answers
15 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
24 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
18 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
34 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
39 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
21 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
28 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
36 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
62 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
14 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
52 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
27 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
24 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
33 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
34 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
40 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
26 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
112 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
42 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
30 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
21 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 ...
0
votes
1answer
20 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 ...
1
vote
0answers
20 views

Magento 1.9 Can I override the registration page only for one of the stores?

I have multiple stores. I need to override the existing registration page, but only for 1 store? How can I achive that?
5
votes
3answers
61 views

Magento 2: How to Override core file [closed]

I want to override this core file vendor/magento/module-tax/Model/Sales/Total/Quote I have already followed the standard Magento2 approaches to override core file but unable to fetch tax ...
1
vote
3answers
43 views

Magento override login template only for my brazilian shop

Can I override the login template only for my brazilian shop? The template that I want to override is located here: app/design/frontend/rwd/default/template/persistent/customer/form/login.phtml
0
votes
1answer
22 views

Prevent a model from being saved

I'm trying to prevent a model from being saved by setting Mage_Core_Model_Abstract's _dataSaveAllowed property. This is going to happen inside an overriding Abstract.php file within local pool. app/...
1
vote
1answer
189 views

Overriding model file is not working in Magento 2.2.5

I tried to override model, but it is not working. I need to override: Magento\Catalog\Model\Product\Attribute\Backend\Price to Pawan\Catalog\Model\Rewrite\Product\Attribute\Backend\Price But it ...
1
vote
0answers
22 views

override getLoadedProductCollection of \Magento\Catalog\Block\Product\ListProduct

I am overriding getLoadedProductCollection() in my block where performing some custom query public function getLoadedProductCollection() { $myCategory = $this->...
0
votes
0answers
19 views

How to override part of a function for a block

I am trying to override part or all of a function for the file located here: Magento\Customer\Block\Adminhtml\Edit\Tab\Orders.php I want to change the customer_id to main_table.customer_id in the ...
0
votes
1answer
36 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 ...
1
vote
1answer
92 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 ...
0
votes
1answer
96 views

Magento 2.2.5: Error when trying to Override Widget

I'm doing override widget to my custom module. So everything was great in the backend, until i come to the frontend and see nothing at all. I mean it works perfect in backend, but not with the ...
0
votes
1answer
63 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 $...
4
votes
3answers
73 views

Magento2: Override default phtml file without create custom theme?

I'm trying to override customer's login.phtml file and I am able to manage the override by creating custom theme Tracks/customtheme, also I put the .phtml file in my custom theme like this /app/design/...
1
vote
3answers
100 views

Magento 2 : How to overrride catalog_product_view.xml

I am new with Magento 2. I wan't to change the page of detailed product: hide Qty box I do that with removing the label and maken an input as hidden. my problem is that I can't arrive to know how to ...
0
votes
1answer
37 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() ...
1
vote
3answers
38 views

How to override template Magento_Sales::order/items.phtml in custom module?

I have to override Magento_Sales::order/items.phtml frontend template in custom module. I have added below code to sales_order_view.xml file of my module. <?xml version="1.0"?> <page xmlns:...
0
votes
0answers
39 views

How to override category menu?

I am new to Magento extension development. Trying to override the main menu (Category menu) in my custom module. I have tried this in my custom module. app/code/Test/Module/view/frontend/layout/...
0
votes
2answers
50 views

Magento 1.9 Override Model Problem

Path File i want Override app\code\community\OtherCompany\core\Model\Api\Rest\Client.php Path my file override app\code\local\MyCompany\MyModule\Model\Api\Rest\Client.php app\etc\modules\...
0
votes
0answers
31 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
1answer
100 views

Magento 2 | Override CustomerData-File

I want to override this file: /var/www/magento2/vendor/magento/module-checkout/CustomerData/DefaultItem.php I guess I have to do this by a module. How do you override something like this? Thanks!...
0
votes
2answers
30 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
1answer
30 views

Magento 2 | Override Magento_Downloadable

I want to override this file in my module: /var/www/magento2-dev/vendor/magento/module-downloadable/Helper/Download.php to /var/www/magento2-dev/app/code/My/Module/Helper/Download.php How can ...
0
votes
0answers
61 views

Override Sales Create New Order Page

I am trying to override the create new order page so that append comments is not selected by default. This is the file I need to overwrite, vendor/magento/module-sales/view/adminhtml/templates/...
0
votes
2answers
31 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:...
1
vote
1answer
188 views

Magento 2 Override checkout model class

I am working with Magento2, so as per my requirement I need to override the "Magento\Checkout\Model\Cart.php" class, but the cart.php class look like as follow namespace Magento\Checkout\Model; use ...