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

How to override /vendor/magento/framework/Logger/Handler/system.php

I want to override this file vendor/magento/framework/Logger/Handler/System.php Basically I want to disable system.log and exception.log from var/log folder. I found that vendor/magento/...
0
votes
2answers
592 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=...
2
votes
2answers
1k views

Why my overriding of the success.phtml is not working?

I have copied and pasted the file from vendor/magento/module-checkout/view/frontend/templates/success.phtml to app/design/frontend/THEME/THEMENAME/Magento_Checkout/templates/success.phtml ...
0
votes
1answer
25 views

how come this override doesnt work magento 2

var config = { "map": { "*": { "Magento_Checkout/js/model/shipping-save-processor/default": "module_name/js/shipping-save-processor/default-override" } } }; var ...
2
votes
0answers
33 views

How to override lib/web/mage/validation.js in Magento 2.2.8?

In order to override lib/web/mage/validation.js in Magento 2.2.8 ? I have tried this way but not working. app/design/frontend/STORE/THEME/web/mage/validation.js Edited : it was due to custom theme!...
3
votes
2answers
597 views

How to rearrange the links available in header in magento 2.0.2?

To Rearrange the Header links(ie to bring the My Wishlist link at last)in magento 2.0.2 (parent-theme:blank) I just overrided the default.xml file in vendor/Magento/module_wishlist/view/frontend/...
0
votes
2answers
41 views

Magento 2 : Can't able to override controller

I need to override this below controller : Magento\Catalog\Controller\Adminhtml\Product\Attribute\Validate.php But, I can't able to override. I need to customize checkUniqueOption() function. di....
0
votes
0answers
9 views

Magento 2 : Edit custom option in order view page

I did override order view page info.phtml, how to edit custom option in here, I want to get the price of custom option in here.
2
votes
1answer
860 views

Overriding Magento\Catalog\Model\Layer class not working in Magento 2

Overriding Magento\Catalog\Model\Layer class not working in Magento 2. I'm trying to create a custom module for showing custom product collection with layered navigation. here i added di.xml file to ...
1
vote
2answers
103 views

Magento2.3.1 How to overide Model file?

I am using Magento2.3.1 and i trying to override model in our theme. our model file path app/code/XXXX/General/Model/Layer <?php namespace XXXXX\General\Model\Layer; class FilterList extends \...
2
votes
2answers
893 views

Custom Contact Form - Override Controller

I am trying to add a contacts form on multiple cms/products pages. I copied the default contacts form phtml and pasted it into a new phtml file. However, submitting the form redirects to the contacts ...
4
votes
2answers
1k views

Override method in LayoutProcessor

I want to make changes(PHP code) to the method processPaymentConfiguration, but I don't know how I can override the method so my changes have a higher priority. I can alter the LayoutProcessor file ...
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/...
1
vote
2answers
42 views

How to override newsletter.phtml (my account option) in Magento 2

I would like to edit the "General Subscription" text in my custom theme present in the My Account page under the Newsletter Subscription menu. I've already located the page which is: app/design/...
1
vote
2answers
40 views

Override CSS file from composer installed module

I've one composer module which has CSS stored in view/base/web/css/style.css How can I override this file so that I can modify it. I tried copying that file to my custom theme as below, app/design/...
3
votes
2answers
986 views

How to override layout file, which is already override by other theme - layout\override\base\somel_ayout.xml

How to override layout file, which is already override by other theme. For example, we have existing theme. app\design\frontend\<Vendor>\<themeone>\Module_Vendor\layout\override\base\...
1
vote
2answers
37 views

Override ui_component .xhtml template file

How can I override a ui_components' template file? The concerning file is: vendor/magento/module-ui/view/base/ui_component/templates/listing/default.xml I want to override this file so that it adds ...
0
votes
1answer
30 views

How to Override xml file into Parent Theme

I have installed one plugins 'cedcommerce' and enabled theme (ced_2k18) for it. My default theme is Porto. I want to override ced commerce plugin layout xml file into my parent theme. Basically i ...
0
votes
2answers
38 views

M2 how to add a custom css only to a module override?

I need to apply this code to checkout page: .header-wrapper-content.sticky-menu.active{display:none;} .hdmx__contact-button.hdmx__contact-button-right{display:none;} This hide the sticky menu and ...
1
vote
1answer
963 views

Magento2 how to override collection

I've just been working with Magento2 for 1 week. There are many things that made me confuse. I want to build a grid that show information from "directory_country_region" table but show only for "...
4
votes
1answer
1k views

Magento2.1: How to override the template in custom module?

I want to create an extension that will give shop owners ability to edit their product image. So I understand I need this template Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml I ...
0
votes
2answers
722 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 ...
1
vote
1answer
721 views

magento 2 how i ca override the config save controller adminhtml?

magento\vendor\magento\module-config\Controller\Adminhtml\System\Config\Save.php how can i override this controller in the magento 2
0
votes
1answer
30 views

Override modal-popup.html file Magrnto 2.3.2

Override vendor/magento/module-ui/view/base/web/templates/modal/modal-popup.html File Into Theme.. How To Override base/ folder file into theme ??? I m Try To Paste this file in to theme/Magento_Ui/...
0
votes
1answer
46 views

Magento 2.3: How to override page content

How to override the content editing page to customize it. do you have any ideas?
0
votes
1answer
36 views

Magento 2 : How to get parent method while we extend the class

I am extending this class : Magento\Sales\Model\Service\InvoiceService My extended file : namespace Company\Vendor\Model\Service; use Magento\Sales\Api\InvoiceManagementInterface; use Magento\Sales\...
1
vote
1answer
29 views

Custom Module's template override not loading initially unless the page is refreshed

I have the below template override in a custom module, the file path is: app/code/Vendor/Module/view/adminhtml/layout/sales_order_create_index.xml <?xml version="1.0"?> <page xmlns:xsi="...
14
votes
2answers
6k views

How to override or disable core Plugins in Magento2?

I am building a marketplace using Magento2. For that reason I need to be able to load the order of the customer using the vendor's customer credentials. The problem with this is that Magento2 uses a ...
0
votes
4answers
52 views

How can I override following file?

In the above attach file I want to change Magento\SalesRule\Model\Rule\Condition\Address to Company\SalesRule\Model\Rule\Condition\Address
1
vote
1answer
63 views

How to Override WishList Customer Data in magento 2

i Want to Override Magento\Wishlist\CustomerData\Wishlist public function getSectionData() { $counter = $this->getCounter(); return [ 'counter' => $counter, ...
1
vote
1answer
809 views

Magento 2.2.5: Overriding Admin Controller sales/order

I need to override Admin sales/order/index controller, but still getting 404. Below the Steps I take to override - Created My Custom Module app/code/A2bizz/Order/registration.php <?php \Magento\...
1
vote
1answer
21 views

Magento 2 : Override addtocart.phtml for all kinds of products

How can I override addtocart.phtml for all types of products, this code works fine only for simple and configurable products, but I want to override all kinds of products. <page xmlns:xsi="http://...
0
votes
1answer
28 views

Magento2 : Override Category List page with No dependency on Other Custom Module

I want to override category.products.list to display 1 custom attribute value to each product in list. and i know i can override product/list.phtml to my module and there i can customize code in loop ...
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 ...
2
votes
2answers
81 views

How to over ride php file in magento 2.3

I want to do some changes in vendor/magento/framework/Stdlib/DateTime/Date.php How can I override the file in app folder?
1
vote
3answers
51 views

Override PrepareTemplate function of Magento\Sales\Model\Order\Email\Sender.php in Magento 2.3

I want to override PrepareTemplate function of Sender.php and have tried to override Sender.php with the help of link Override abstract class but its not working for me. I have followed the exact ...
0
votes
3answers
795 views

Overriding Magento Sitemap Model Class

I try to override Mage_Sitemap_Model_Resource_Catalog_Product class. Here is my files: File \magento\app\etc\modules\Own_Sitemap.xml <?xml version="1.0" encoding="UTF-8"?> <config&...
3
votes
2answers
2k views

How to override cart\addcontroller in magento 2?

I want this function in \code \StwBuyXGetY \BuyXGetY \Controller\Checkout\Cart\Add.php(this is written in magento 1.9, I want to convert it into magento 2). But I cant add any new function in add ...
1
vote
2answers
1k views

In a custom module I override the cart item template

How do I correct my code to fix this? In my custom module I have the file app/code/MyCompany/MyModule/view/frontend/layout/checkout_cart_item_renderers.xml with the following code: <?xml version="...
0
votes
1answer
29 views

Magento2 : How to override FinalPrice.php file in Magento2

I want to override vendor/magento/module-catalog/Pricing/Price/FinalPrice.php with constructor argument. Note : File overriding is working fine but when I create constructor in the overridden ...
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
1answer
65 views

override coupon management and guestcoupon management core vendor files magento 2

I want to override Couponmanagement.php of Magento\quote\Model\CouponManagement and guestcouponmanagemet.php of Magento\quote\Model\GuestCart\GuestCouponManagement but my plugins are not working....
0
votes
2answers
3k views

Magento 2 : Override layout.xml File Within Custom Module

Looking at the Magento 2 docs, you can override a base/core layout.xml file - http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-override.html Is it possible, to overide within ...
0
votes
2answers
488 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?
4
votes
1answer
471 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
0answers
14 views

Customer account wishlist block replacement removes content

I have replaced the vendor/magento/module-wishlist/Block/Customer/Wishlist.php for my own app/code/myVendor/myModule/Block/Customer/Wishlist.php I have written in the app/code/myVendor/myModule/etc/...
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
4
votes
3answers
970 views

How to override crontab.xml?

I need to override a crontab.xml from: vendor/magento/module-integration/etc/crontab.xml <job name="expired_tokens_cleanup" instance="Magento\Integration\Cron\CleanExpiredTokens" method="...
0
votes
0answers
24 views

Magento 2 : Add a custom attributes to quote

I have a custom quote module, that i would like to modify and add 2 custom fields, The admin quote module is similar to sales order admin pages, so i want override the admin templates and layouts to ...
0
votes
2answers
59 views

Magento 2 What we can do when two modules override same block?

I have two modules which are using the same block function. i.e. module 1-> ABC, module 2-> XYZ both modules are using preference method to override core module's block file. => Let say in core ...