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

How to override the payment methods template while display in checkout page in magento 2

In Magento 1 /var/www/html/xxx/app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml. In Magento 2 What is the equivalent file for the above one in magento 2 and how to ...
1
vote
1answer
257 views

Magento 2: can't override js file

I tried to override magento/module-checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js For this in my custom module i have created under Module/Namespace/view/frontend, ...
1
vote
1answer
36 views

I can't find the correct Model for Invoice

I'm trying to change the invoice model for making changes in invoice pdf but I can't find this. I'm trying change /app/code/core/Mage/Sales/Controller/Abstract.php and /app/code/core/Mage/Sales/Model/...
1
vote
1answer
274 views

getModel return false after rewrite model

I was trying to rewrite product model. It's my config.xml <global> <models> <catalog> <rewrite> <product> ...
0
votes
1answer
325 views

Magento 2 REST API - Override Item Price while adding to Cart

I am trying to create orders via REST API with the steps listed in the following link. http://devdocs.magento.com/guides/v2.2/get-started/order-tutorial/order-intro.html I want to change the price ...
1
vote
1answer
553 views

Magento 2 - Override info.phtml from Module Sales

I have a custom module and I want to override a .phtml file. This is what I want to override: magento/vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml My module.xml: &...
0
votes
2answers
1k views

Magento 2 override template file using custom module

I need to override below template file using custom module Magento_ConfigurableProduct::product/view/type/options/configurable.phtml
7
votes
2answers
1k views

Circular dependency: Magento\Customer\Model\Session depends on Company\Modulename\Plugin\Config\Share and vice versa

How to override or Use plugin for isWebsiteScope() function from Magento\Customer\Model\Config\Share.php file, I have used plugin for below function but I want to get current customer session in ...
0
votes
1answer
26 views

How priorize multiple override?

I am using Magento 1.13 Enterprise. I have two custom modules which rewrite the core class app/code/core/Mage/Catalog/Block/Product/List.php : app ---code ------local ---------Mynamespace ------------...
2
votes
2answers
53 views

Best pratices to update the module-checkout

I want to add some custom text test to my mini top cart in my theme header section. I see it is located here: public_html/m2/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml ...
0
votes
2answers
241 views

Magento2 : Override core files vendor/magento/module-catalog/Pricing/Price/TierPrice.php

How to override vendor/magento/module-catalog/Pricing/Price/TierPrice.php ? in magento 2
0
votes
2answers
238 views

Magento 2.2 Override Sales Invoice attachment files

We need to override following files in custom module. /data/magento2/vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php /data/magento2/vendor/magento/module-sales/Model/Order/Pdf/Invoice.php ...
0
votes
2answers
82 views

Private method error while overriding Magento\Customer\Model\ResourceModel\CustomerRepository

I am using <preference> to override CustomerRepository, but Magento\Customer\Model\ResourceModel\CustomerRepository contains private functions and it throws me error Fatal error: Call to ...
0
votes
1answer
26 views

Magento Module not loading. Codepool local [closed]

I am trying to make a module to hide product types when tryng to create a new product. I have created the files as follows: app\etc\modules\Grando_Producttype.xml <?xml version="1.0"?> <...
0
votes
1answer
732 views

Override template phtml file in magento 2?

First I have created a module and place it in a file I want to override \app\code\Vendor\Module\view\adminhtml\templates\widget\grid\extended.phtml The original location is vendor\magento\...
0
votes
1answer
2k views

Override base/ui_component/customer_form.xml

I'm trying to override the following file and I need the changes to show in adminhtml. vendor/magento/module-customer/view/base/ui_component/customer_form.xml I have copied the file to the location ...
0
votes
0answers
78 views

Magento 2 rewrite not working

I need to override this class Magento\CatalogSearch\Model\ResourceModel\Fulltext Collection in my custom module. I have created di.xml in etc/frontend folder. and created the class and overridden ...
1
vote
1answer
189 views

Overriding core layout XML located in “base” not in “frontend”

I want to remove tier_price from vendor/magento/module-configurable-product/view/base/layout/catalog_product_prices.xml: <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All ...
2
votes
1answer
68 views

Override of a controller

I'm stuck at overriding a controller of a third party extension. I have followed the standard procedure for overriding a controller. I can't seem to get the route working. I have done the following: ...
0
votes
1answer
59 views

Custom options not loading after saving the product in admin - Magento 2.1.7

I tried creating few custom options for a product. A field type and dropdown type. After saving the product getting a javascript error in the console as shown in the screenshot data.forEach is not a ...
0
votes
1answer
319 views

how to override adminhtml block for a function?

Urapidflow has an issue which casued by a security patch and even their new version does not resolve the issue, the path for module file that I want to write an override is: app\code\community\Unirgy\...
1
vote
1answer
2k views

Override price renderer on listing pages via XML

I am trying to override a price template, namely price_final.phtml. etc/di.xml: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
1answer
380 views

How to override a CLI command?

I'd like to know if I can override a CLI, specifically the bin/magento setup:upgrade. I want to override the class Magento\Setup\Validator\DbValidator, the method checkDatabasePrivileges.
1
vote
2answers
173 views

Unable to override module_catalog items.phtml

I'm trying to make some minor changes to the template found at vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml. So I've created the a new file app/design/frontend/xxx/...
0
votes
1answer
134 views

Overriding a template from block

I am currently trying to override a register.phml from a custom module in my own custom module. My modules name is UV_Mitgliedsnummer, the custom module I want to override the template from is ...
1
vote
2answers
62 views

Override phtml in my module

I created a module and now I want to override a .phtml file from another module. What is the best way to do that?
1
vote
1answer
34 views

Overwrite community model method issue in Magento 1

This is my config xml from my custom module: <models> <emailtester> <rewrite> <variable>Mynamespace_Mymodule_Model_Mailer_Variable</variable> ...
3
votes
1answer
996 views

Magento 2 - How to remove '--Please Select--' option from Custom Option dropdown on Product page

In Magento 2 I am trying to remove first option "--Please Select--". Here is my code. After the rewrite, I am not able to see custom option dropdown itself but the page is loading. Please let me know ...
0
votes
2answers
65 views

Form Block Override seems to work but is Never Called

This is a very common question, but this one is a little different. I'm trying to overwrite/rewrite a Form block from another module. I'm already rewriting other blocks from this module without ...
0
votes
1answer
35 views

How to write two model rewrites

Is this a valid rewrite? I can't seem to find the answer to: How to rewrite to models from the same Module? Do I need to separate the classes or can I put both under rewrites? This is not working so ...
0
votes
1answer
60 views

Inject class for overridded class

I override the \Magento\Catalog\Block\Product\View it's working but I am trying to inject class means it's not working please tell me what I did wrong and tell me how to do this without injecting the ...
5
votes
3answers
6k views

Magento 2 : Override core Interface and Model

I am trying to override core interface of Customer Group. I add my custom get and set methods to core Api interface. Vendor\magento\customer-module\Api\Data\GroupInterface.php Where its working ...
0
votes
2answers
481 views

How to override adminhtml block file in Magento 2

How to override module-customer/block/AdminHtml/Group/Edit/Form.php I have created custom module for that please find my code for that. etc/di.xml <?xml version="1.0"?> <config xmlns:xsi=...
0
votes
1answer
401 views

Magento 2: Extending a controller but adding an additional parameter in the constructor

I have been struggling with a problem for a while and hope somebody can point me in the right direction. I am attempting to extend a native controller by adding my own module. This appears to have ...
4
votes
1answer
962 views

How to Override phtml file in Magento 2?

I am overwriting vendor/magento/module-catalog/view/frontend/templates/product/view/attributes.phtl and I tried puting the overriden file in two locations but no chages occur First: app/code/<...
0
votes
1answer
372 views

Magento2: How to override paypal-express.html & authorizenet-directpost.html?

I want to add unique IDs to the 'place order' buttons on checkout. I found the right templates on the vendor folder & tried to copy them to my custom theme on app/design: vendor/magento/module-...
0
votes
1answer
457 views

How to override vendor/magento/framework/DB/Adapter/Pdo/Mysql.php and vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php?

I created a custom module and to try to override vendor/magento/framework/DB/Adapter/Pdo/Mysql.php and vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php but <preference for="...
0
votes
2answers
87 views

Fall back from a core file

is it possible to use magento core files as fallback? Example: I really need to make a change in this file: app/code/core/Mage/Core/Controller/Varien/Action.php It will work if I create a copy at ...
0
votes
2answers
757 views

Magento 2 Controller override not working

I have to override 2 controller 1 override is working and 1 override not working <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
1answer
420 views

Magento 2 : AdvancedSalesRule override validate method

I need to validate custom quote item details, So I am overriding module AdvancedSalesRule "\Magento\AdvancedSalesRule\Model\Rule\Condition\Product" file. But Not getting quote item Id in model object. ...
0
votes
1answer
32 views

Overriding Custom module's controller in Magento2 giving error

I am trying to override the controller of an extension in Magento2. My di.xml file is:- <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
0answers
98 views

Magento 2 ProductInterface Override

I need to Override Default Magento 2 ProductInterface to add extra key's to Product Details API response.
2
votes
2answers
2k 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. ...
1
vote
2answers
328 views

magento 2 override to custom module

Can anyone help me how to override the following files to custom module vendor/magento/module-sales/Model/Order/Item.php vendor/magento/module-sales/Api/Data/OrderItemInterface.php thanks
0
votes
0answers
160 views

Magento 2: How to override the crontab.xml of CustomModule1 from CustomModule2?

How can I override the crontab.xml of CustomModule1 from CustomModule2? I know that if it was a Magento module from vendor I could just use the same path on app/code to override it, but I need a way ...
1
vote
1answer
1k views

Magento 2.2 <preference> not working to override a model class

I want to override a model call (Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector). We used preference to override a model call inside di.XML like magento 2.1.x But it is not working on Magento ...
0
votes
1answer
2k views

Magento 2 Override third party module block file

I am working a Magento2 project and I have installed a third party module magefan/module-blog which is used for manage Blog/post.This module is installed in Magento Vendor folder. path is magento/...
0
votes
0answers
319 views

Override vendor plugin Magento 2

Having some difficulty implementing this answer: How to override or disable core Plugins in Magento2? I have this vendor plugin I need to override the afterToHtml method... Vendor DI entry: <...
2
votes
0answers
38 views

Override magento 2 default files

How to override default magento 2 file vendor/magento/framework/Reflection/ExtensionAttributesProcessor.php in my custom module.
0
votes
0answers
335 views

Override magento 2 Framework classes

How can I override the following file: vendor/magento/framework/Locale/Format.php