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
319 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
1answer
248 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 ...
0
votes
1answer
282 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
1answer
185 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
3answers
587 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 ...
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
461 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 ...
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 ------------...
0
votes
2answers
291 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
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
122 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 ...
0
votes
1answer
63 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
2answers
68 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
36 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
62 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 ...
0
votes
2answers
769 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
462 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
531 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
0answers
232 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 ...
0
votes
0answers
390 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: <...
0
votes
0answers
367 views

Override magento 2 Framework classes

How can I override the following file: vendor/magento/framework/Locale/Format.php
0
votes
0answers
67 views

Block override not working

I am trying to override Magento\Catalog\Block\Widget\Link with Anshu\Custom\Block\Catalog\Widget\Link but it is not working. Anshu/Custom/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="...
0
votes
0answers
358 views

'Invalid method' error on custom module

I'm trying to get a better understanding of Magento module development and I've run into an issue I can't seem to figure out. I've built a custom module that allows users to pick the desired delivery ...
0
votes
2answers
363 views

How Do I override adminhtml phtml file without create custom module in Magento 2.1.9

I want to override \magento\module-user\view\adminhtml\templates\admin\fotgotpassword_url.phtml file without creating a custom module. Can you please help me How do I solve the problem?
0
votes
2answers
646 views

How to override Select.php block file in magento2

How to override vendor/magento/module-catalog/Block/Product/View/Options/Type/Select.php file I have followed below steps, but not working Step1: Created di.xml <preference for="Magento\Catalog\...
0
votes
1answer
28 views

How to use 2 different CSS sheets in M2 that user can choose in admin? Layouts or something else?

I am trying to create 2 new layouts called "3 column - full width" and "2 column - full width" so the user can choose either of those on any article page instead of having to resort to inline css ...
0
votes
1answer
615 views

How to override admin template with layout, how to get reference block

I want to override below templates. I tried with placing core layout in my custom module and place template in same directory structure. Can any one please tell me where I am making mistakes. ...
0
votes
1answer
60 views

Onepage Checkout Billing extension doesn't work [duplicate]

I can't find the error in the code. My module is shown in the Backend but the Block is not rewritten properly. This is my Code: config.xml <?xml version="1.0"?> <config> <modules>...
0
votes
1answer
257 views

Problem to override Product/attribute/backend/Media

I have a problem to override Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media. Here is what I did: config.xml <?xml version="1.0"?> <config> <modules> <...
0
votes
1answer
487 views

Magento override the collect function of “Mage_Sales_Model_Quote_Address_Total_Tax” not working

Please look at the module files, which I have created in order to override the Mage_Sales_Model_Quote_Address_Total_Tax class's collect method. app\code\local\Vs\CustomTax\etc\config.xml: <?xml ...
0
votes
1answer
240 views

can't override “modal-slide.html”

I'm trying to override modal-slide.html in my base theme so I place that file at: app/design/frontend/<vendor>/base/Magento_Ui/web/templates/modal/modal-slide.html But Magento just won't pick ...
0
votes
1answer
192 views

Over ride the catalog product template in magento 2 not working

I am trying the magento 2 and over ride the product details template as follows: app\design\frontend\Vendor\oppo\Magento_Catalog\templates\product\view/details.phtml and added some code there but it ...
0
votes
3answers
1k views

Magento 2, minicart, change “Go to Checkout” text to “Checkout” only

I have been trying to change Go to Checkout text to Checkout in mini cart in Magento 2. I have new theme applied and placed override file as follows: app/design/frontend/Darkmage/newtheme/...
0
votes
2answers
767 views

How Can Override Block (\Magento\Catalog\Block\Product\View\Options\Type\Select.php)

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference ...
0
votes
1answer
575 views

Magento 2 shipping method is not overriding

I am trying to override UPS shipping method. But it is not override. <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
0
votes
1answer
394 views

Magento 2 : Overriding CatalogWidget's ProductsList block

I'm trying to override Magento_CatalogWidget's ProductsList block the following way, but unsuccessfully. I have created a new module (app/code/MY_NAMESPACE/CatalogWidget), its tree structure is: ├── ...
0
votes
1answer
958 views

Make Adjustments To final_price Render Class On Product Pages Magento2

I am trying to change the render class for the final_price renderer on the product pages in Magento2. I have found the following block inside the vendor/magento/module-catalog/view/base/layout/...
0
votes
2answers
148 views

Overriding .phtml template

What is the recommended way to override the contact .phtml template. All I want to do is add HTML tags around the form so I can use bootstrap to give it a nice layout. As far as I know there is no ...
0
votes
2answers
3k views

Magento 2: How to override Ui & Component folder files

How to override these below files: vendor/magento/module-configurable-product/Ui/DataProvider/Product/Form/Modifier/ConfigurablePanel.php vendor/magento/module-ui/Component/Form.php ...
0
votes
2answers
83 views

I need override a model in third party extension

I'm doing this to override the model in other extension, but doesnt works <global> <modules> <!--<sitemap_resource> <rewrite> &...
0
votes
0answers
56 views

Can't overwrite js filed in Magento 2

I tried to overwrite **date.js(module-ui/view/base/web/js/form/element)** and **range.js (module-ui/view/base/web/js/grid/filters)**in my custom theme but it's not working. it not take me the changes ...
0
votes
1answer
87 views

Custom module to override CategoryController.php not working

To dodge the max of 1000 products in a category I tried to override CategoryController.php. I think I did everything right, but the module doesn't work. I'm working with Magento 1.7.0.2 Community ...
0
votes
0answers
57 views

Plugin issue in Magento 2

I created an Plugin to change the category links from ?catId=xxx to the real category name. My Plugin look like this: class CategoryPlugin { /** * Url * * @var \Magento\...
0
votes
0answers
106 views

Magento 2: How to override Item Info of MiniCart

I would like to override Item Info of Mini Cart here as well as on Checkout Sidebar I need to apply changes on price. Which files need to override & function?
0
votes
0answers
67 views

Magento Enterprise controller override issue

I am Trying to override magento controller but no luck Here is my config.xml <?xml version="1.0"?> <config> <modules> <Ktpl_Custom> <version>0.1....
0
votes
2answers
252 views

Magento Controller override Multiple times

I am trying to override Mage_Checkout's CartController's action addAction() but its not happening to override. Following is the scenario, Community Module overriding just "protected function ...
0
votes
1answer
268 views

Overridden Cart block does not load template

I'm trying to customize a Magento 2.1 cart page both by overriding the Block Cart and accessing some of the overridden elements in a new phtml template. I hit a roadblock after overriding the Cart ...
0
votes
1answer
1k views

Override Less file

im work on a new magento 2 page. Now i want change a css class over my custom theme.less file. But how can i override the css class? I want override the padding from the .header.content class which ...
0
votes
1answer
312 views

Magento override customer address controller not working

I am trying to override customer address controller but its't overrides Config.xml <frontend> <routers> <salesperson> <use>standard</use> ...
0
votes
1answer
325 views

Override local extension that overrides core

<global> <models> <sales> <rewrite> <order_pdf_invoice>Local_Extension_Model_Sales_Order_Pdf_Invoice</order_pdf_invoice> </rewrite> ...