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

Magento 2: How to remove code from html?

I need remove from the page checkout this: The code of this html is the next: <div class="billing-address-same-as-shipping-block field choice" data-bind="visible: canUseShippingAddress()"> ...
0
votes
1answer
239 views

Can we rewrite multiple blocks of same core extension?

Can we rewrite multiple blocks of a core extension like catalog ? like this : <blocks> <catalog> <rewrite> <class_name_here>...
1
vote
1answer
24 views

Magento2: Duplicate 2 tables in an overwritten method

I'm overwriting a method to change the configuration of the table, the problem is that this column doubles it, magento adds the column of the overwritten file and the original file, if I delete the ...
0
votes
1answer
285 views

Contact Post Controller overridden in Custom Module not working

I have override contact form post controller in custom module. It is calling from my module but i am getting error as Fatal error: Uncaught Error: Call to a member function send() private function ...
1
vote
2answers
802 views

Magento 2 theme override: changes not showing

I am new to Magento 2 and theming and I'm having trouble overriding a particular template. I am running in developer mode. I have successfully installed my theme and applied it globally in the admin, ...
0
votes
0answers
304 views

Magento 2 EE : Override Layered Navigation Template

I want to override layered navigation template in my module(layer/view.phtml). I created catalog_category_view_type_layered.xml file in Companyname/Modulename/view/frontend/layout/ ...
0
votes
3answers
287 views

Show telephone number on customer dashboard

How do i display the telephonenumber on customer dashboard? I have extended the original class to add some functions, but I can't find the right way to show customer number. I read that ...
1
vote
1answer
23 views

Extends Dashboard customer for telephone number

I'm trying to extend Magento\Customer\Block\Account\Dashboard\Info.php file. I created a module, where I have my custom block, Info.php. I want to display the telephone number of the customer after. ...
0
votes
4answers
1k views

How to override contact us post action using plugin Magento 2

I want to override contact us post action using plugin as i have custom field in my contact form. I have created di.xml file, <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
2answers
574 views

How to override block .php file?

I got this file: module-sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php I want to override this in a custom module. How can I do that? Thanks!
1
vote
1answer
335 views

Magento 2.2 Overriding template file

I'm trying to override theme files in my custom theme based on the blank theme. I managed to override the css with a custom css file. So i know my path correct. This path is: <Vendor>/<...
1
vote
1answer
216 views

Override form.phtml in own module

I want to override following file in my custom module: module-sales/view/adminhtml/templates/order/create/shipping/method What I did so far: magento/app/code/view/adminhtml/layout/...
1
vote
2answers
83 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
436 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
360 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
233 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
437 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
56 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
269 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
3answers
565 views

Magento2 product review captcha

I want to rewrite Magento-review layout catalog_product_view.xml to show Recaptcha on a product review. How can I achieve this?
0
votes
2answers
57 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, ...
2
votes
0answers
80 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
181 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
111 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
77 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
671 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
876 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
2k 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
176 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
95 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
49 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
78 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 ...
4
votes
1answer
504 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
553 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
62 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
180 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
510 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
744 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
280 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
327 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
419 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
685 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
2k 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
27 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
54 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
284 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
297 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 ...