Questions tagged [overrides]

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

1
vote
2answers
59 views

How to override button.phtml from Module_Backend in own module

I want to override following file in my custom module: module-backend/view/adminhtml/templates/wiget/button.phtml How can I do that?
1
vote
1answer
295 views

override admin .phtml file in my design

I got this file: /magento/vendor/magento/module-backend/view/adminhtml/templates/widget/button.phtml I have put it there: /magento/app/design/adminhtml/UV/bgn_medienshop_2017_admin/...
1
vote
2answers
291 views

magento 2 addtocart.phtml template file can not override

I need little help,I am trying to override vendor\magento\module-catalog\view\frontend\templates\product\view\addtocart.phtml but no luck I am using Magento 2.1 version. I tried below code in my ...
0
votes
1answer
180 views

Magento 2 Override Block is not returning to parent

I have override magento core block Magento\Theme\Block\Html\Breadcrumbs to programatically add Breadcrumbs on product page due to this issue So I have created below code to solve this issue. It is ...
1
vote
1answer
297 views

Overriding a layout file in magento2 is not working

What I want to override: vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml I copied the file to this location: app/design/frontend/[Vendor]/[MyCustomTheme]/...
0
votes
1answer
49 views

Extending Adminhtml blocks class _prepareCollection

I am trying to override a adminhtml block and I created all files accordingly. The problem is that it does not have any effect. My files are as follows: app/code/local/Grando/Groupfilter/etc/config....
0
votes
1answer
161 views

Adding new function in existing class

I want to add a new function in class Magento\CatalogWidget\Block\Product\ProductsList so, that I can use that function in template file of this block. Can I add a new function without using ...
0
votes
2answers
379 views

Magento2 product review captcha

I want to rewrite magento-review layout catalog_product_view.xml in my code how I achieved
0
votes
2answers
46 views

Modify Magento2 module php class

I have to add a work around fix for a payment method by adding a line of code to vendor/magento/module-payment/Helper/Data.php. I've tried my fix by adding it directly to that file and it's working, ...
1
vote
0answers
56 views

Magento 2 plugin not working for CommonTaxCollector model

I want to overwrite mapItem function which is under the CommonTaxCollector class. So, I have done this but getting undefined error. Uncaught Error: Call to undefined method Magento\Tax\Api\Data\...
1
vote
2answers
157 views

Magento 2.1.3: Overriding of vendor layout file with my custom layout file in Magento 2.1.3 is not working?

I have created a custom module in Magento 2.1.3 and its layout file is located in app/code/RP/Testmodule/view/frontend/layout/customer_account_create.xml but the system loads the layout from ...
0
votes
1answer
77 views

Magento 2 overriding a vendor xml file

I want to override an xml file of an extension module into my custom module, how can I do it?
0
votes
4answers
59 views

Overriding template not showing up

I am trying to override template of Magento_Review module I added new layout file under my module app/code/Custom/CustomReview/view/frontend/layout/review_product_list.xml <?xml version="1.0"?...
0
votes
2answers
472 views

Overwrite Abstract class

I am not able to overwrite the reorder.php file which is an abstract class. Anyone can help whether I have use di.xml or any other method.
0
votes
2answers
654 views

How to override magento theme layout file

I am a newbie to Magento 2.2.4 and i want to get bootstrap 4 css and my own js files.. As a first step trying to override the theme layout file. I created a theme and enabled it successfully. (All js ...
2
votes
4answers
1k 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 ...
0
votes
1answer
129 views

Override construct function in child class magento2

I want override a model class, for this I have made entry in di.xml and created a respective file on my custom module. My file is calling but now here apart from modify other functions I also need to ...
0
votes
2answers
81 views

How to override this block and template in my module?

I want to override these two files in a module: Block: /magento/vendor/magento/module-sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php Template: /magento/vendor/magento/module-sales/...
2
votes
1answer
45 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 ...
0
votes
1answer
56 views

How do I override a nested js file in a theme?

I have a custom module that uses a js file defined in: Vendor/Module/view/frontend/web/js/sub/directory/myfile.js. Works fine. I want to use a different file within a theme; from the documentation ...
3
votes
1answer
353 views

Magento2: Tier price higher than regular price

I figured out that if you set a tier price higher than the regular price, it will show the regular price anyway. Seems this is the "normal" funcionality, always show the lower price if it's possible. ...
0
votes
3answers
379 views

Magento 2.2 css override not working

I am new to Magento 2 development and stuck on changing .header .content css class.I have tried with creating a _theme.less file inside my local theme but the css is not overriding. Can you please ...
1
vote
1answer
51 views

How to override some specific product function?

Is it possible to override one specific product function? I need to write a custom function for the getImage function. Is there a way to do that in Magento 2?
1
vote
1answer
131 views

Why Plugin is not working on ListProduct 's getProductDetailsHtml

I have tried to create plugin of method getProductDetailsHtml of \Magento\Catalog\Block\Product\ListProduct. But this plugin is not working. di.xml <type name="Magento\Catalog\Block\Product\...
2
votes
2answers
341 views

Magento 2 : override phtml file issue

I faced problem with overriding a phtml file in Magento 2. I want this:- (1) Core Module of phtml Override By Custom Module called - A (2) Same phtml file of Module - A Override By Some Custom ...
0
votes
3answers
2k views

Magento 2 : How to Override vendor files in my custom theme

How to override below admin file in my custom admin theme ? /vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml
0
votes
1answer
538 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
228 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
254 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
304 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
495 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
24 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
51 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
228 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
210 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
73 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
685 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
73 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
170 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
62 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
56 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
280 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
342 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
170 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/...