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
2k views

Override the private function getConfiguredUsedProductCollection()

I'm trying to override a private function in Magento\ConfigurableProduct\Model\Product\Type\Configurable. I want to remove the line: ->addFilterByRequiredOptions() private function ...
0
votes
1answer
34 views

Override Extension (/vendor) in app/frontend

I'm trying to override a layout .phtml file for a 3rd party extension which is located in /var/vendor_name/extension. As I understand, I should not be modifying the /vendor files, but this extension ...
5
votes
4answers
3k views

Magento 2: Add a Custom Import Sample File to vendor/magento/module-import-export/Files/Sample directoy

I created a custom import module from two custom models and tables. The imports works fine, and without any error or problem now. But I noticed that next to Entity Type dropdown, appears a "Dowload ...
1
vote
0answers
17 views

Magento 2 - How to override knockoutjs template which is already overriden from a third party module?

I try to override the knockoutjs template vendor\amasty\module-single-step-checkout\view\frontend\web\template\checkout\summary\item\details.html from my own Theme. The module amasty\module-single-...
1
vote
3answers
149 views

Magento 2 - How to override knockoutjs template?

I try to override the following template from my own module vendor\magento\module-checkout\view\frontend\web\template\minicart\item\default.html but I don't find the file where I can override it, I ...
0
votes
1answer
36 views

How to override core files into custom module app/code?

I am added a custom attribute in my wishlist knockout core file, Code : https://codeshare.io/5ZlEv7 Line Number: 142 I want to override into my custom module, I am created a custom module, how to ...
0
votes
1answer
11 views

Magento 2 - Product gallery magnifier not working after overriding Gallery class

My magnifier is not showing anymore IF THE PRODUCT HAS MULTIPLE IMAGES, after I have overriden the gallery class! I have enabled the magnifier in THEME\etc\view.xml: <?xml version="1.0"?&...
2
votes
1answer
846 views

How can I override magento/framework/data/structure file in magento2?

I have created custom module to override this (Magento/Framework/Data/Structure) file. I have tried this in di.xml file: <preference for="Magento/Framework/Data/Structure" type="Modulename\...
0
votes
2answers
930 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
27 views

How to override adminhtml html file

I need to overwrite the file vendor/magento/module-customer/view/adminhtml/web/template/default-address.html. I have tried creating a custom module and adding the file in app/code/myvendor/mymodule/...
3
votes
2answers
852 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/...
2
votes
2answers
2k views

Magento 2 - Override template files in module

What is the correct way to override a template file ? I need to display custom text in place of In Stock and Price on the product page. I want to override the template - Magento_Catalog/view/...
0
votes
1answer
46 views

Override \Magento\CatalogSearch\Model\Advanced in Magento 2.4

Update I think this is where it is going wrong: ItemCollectionProviderInterface $collectionProvider = null, ProductCollectionPrepareStrategyProvider $productCollectionPrepareStrategyProvider = ...
0
votes
1answer
28 views

How to override third party module css into custom module

I am using a third-party module, i did model and template files override, how to override CSS in the custom module. Under web/css folder i am created three custom less file, how to rewrite from the ...
0
votes
3answers
1k 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
1answer
46 views

Override a model not working Magento 2

I tried to override a model in Magento\Quote\Model\Cart\Data\CartItem but I cannot override it. here is my di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
3
votes
2answers
3k views

How to override Pdf Invoice in Magento 2?

Magento 2: I was looking to add a custom text on the footer in pdf invoice. I have done this by adding a small piece of code here in this file vendor/magento/module-sales/Model/Order/Pdf/Invoice.php ...
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
2answers
46 views

Can't override list.phtml in Magento 2.4

I try to override the list.phtml in Magento 2.4 but it's not working. Here is the path to my new file : app/design/frontend/Magento/timeote/Magento_Catalog/templates/product/list.phtml All the other ...
0
votes
1answer
35 views

Magento 2 Override Config.xml File to change the status of Braintree Module

I am trying to override config.xml file of vendor/paypal/module-braintree-core/etc module to changed the "order_status" value from "processing" to "pending" . I have ...
3
votes
1answer
1k views

Magento2 rewrite: product resource collection class does not effect on functions

I have rewrite catalog product resource collection Magento\Catalog\Model\ResourceModel\Product\Collection. Class override successfully but functions override is not working. Suppose, i want ...
1
vote
1answer
21 views

Magento 2 error : Incompatible argument type: Required type: \Magento\Framework\Registry. Actual type: array; File:

Code use Magento\CustomerBalance\Helper\Data; use Magento\Framework\App\ObjectManager; use Magento\Framework\Registry; use Magento\Framework\View\Element\Template; use Magento\Framework\View\Element\...
2
votes
1answer
156 views

How to override the Catalog Widget PHTML file into custom module?

I need to override the widget template file /vendor/magento/module-catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml but in xml file the phtml file was not mentioned at any ...
0
votes
1answer
1k 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
1answer
26 views

Magento 2 : override Magento_Sales::email/items/creditmemo/default.phtml

What is the best way to override below template file in module ? Magento_Sales::email/items/creditmemo/default.phtml
2
votes
3answers
7k views

Magento2: How to override admin files

I need to add some modification on the following file so that i'm trying to overwrite the file in local vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml to app/design/...
2
votes
3answers
988 views

How can I override admin create order controller?

I am trying to override adminhtml_sales_order_create controller. I have created a small module app/code/local/Akina/Sales/etc/config.xml <?xml version="1.0"?> <config> <modules> ...
0
votes
2answers
4k views

How to override adminhtml phtml files in magento2

How to override adminhtml phtml files in magento2? I want to place a custom text in customer edit page welcome to magento2. For this I have created a theme and placed app\design\adminhtml\Vendor\...
1
vote
1answer
1k views

Magento2 how to override collection

I want to build a grid that show information from "directory_country_region" table but show only for "country_id" with id = "TH". I'm using UI component & Magento\...
0
votes
2answers
1k 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
1answer
1k views

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

magento_root\vendor\magento\module-config\Controller\Adminhtml\System\Config\Save.php how can i override this controller in the magento 2
6
votes
3answers
2k 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="...
1
vote
1answer
34 views

Override Magento\Sales\Model\Order\Email\Sender\CreditmemoSender Magento 2

How to override below file in module ? Magento\Sales\Model\Order\Email\Sender\CreditmemoSender.php
1
vote
1answer
21 views

Magento2.4.2 own module class does not appear in generated (no error while setup:ci:compile)

sorry to bother but I'm really stuck with a strange problem. My goal is to have the invoice PDF changed but the class I've created to do this (which is currently a bunch of code from another guy) does ...
12
votes
5answers
35k views

Mage::log() does not log in all files used by Magento?

I have overwritten Sitemap.php in app/code/local/Mage/Sitemap/Model/Sitemap.php. The file seems to be used, if I remove all contents, there's an error as expected. I copied the complete content of ...
0
votes
0answers
11 views

Listing page product grid design not applied on home page

I am trying to add category products on the home page using widgets, the product grid is shown without design what I made on the listing page. Listing page product grid : I moved wishlist icon from ...
2
votes
2answers
1k 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 ...
0
votes
0answers
11 views

How can I override a Collection.php file from a 3rd party plugin?

I have 2 plugins that are clashing with each other. I figured out a fix, and I have to change a collection.php file, and I don't want it to get overwritten in a future plugin update. How can I get ...
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 ...
1
vote
1answer
2k views

Magento 2: How to override configurable.phtml block

I am just extended configurable block using a custom block, but I couldn't get the "selected_configurable_option" while changing the configurable options [ not getting simple product id ]. Did this ...
1
vote
1answer
2k views

Magento 2: How to override Related.php class file under Ui/DataProvider folder?

I just want to rewrite modifyMeta method on vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Related.php file and I have done following things in file but not succeeded. I have ...
0
votes
3answers
2k 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/...
38
votes
3answers
66k views

Extending / Overriding JS in Magento 2

As Magento2 is using RequireJS for loading scripts, and there's no more skin folder, I've stuck with a problem: How can I replace Magento's module JS file by my modified version? For example — the ...
1
vote
2answers
89 views

Magento 2 how to override theme-adminhtml-backend view.xml in custom module?

By default Magento 2 creates more than 20 duplicates of each product image..! (why???) I have got this down to 5 using view.xml in my theme, but there is one extra set of image sizes I need to change, ...
2
votes
3answers
3k views

How to override Magento 2 framework file?

I try to override this file : vendor/magento/framework/View/Element/Html/Link/Current.php I create a module.xml, registration.php and di.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
0
votes
1answer
30 views

Issue overwriting a third party extension?

I'm trying to overwrite only this file but I'm having no luck in it working, am I doing something wrong? vendor/mageplaza/module-lazy-loading/Plugin/Model/Template/Filter.php app/code/MySite/...
3
votes
3answers
8k views

Magento2 - override 3rd party module layout file in custom theme

We have a custom theme with some layout / template overrides Now we have installed a 3rd party module, which is overriding one of layout files in our custom theme. So, only module's override is being ...
3
votes
2answers
1k 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\...
0
votes
1answer
32 views

How to override top menu and add icon in Magento 2?

How to override top menu and add icon in Magento 2? I'm using Magento v2 and want to have icons added to each category menu item.? How can I override this? I added the Attribute for icon in category (...
0
votes
0answers
29 views

Magento 2: Override Magento Framework class Not working

I want to override this class function in Magento 2 \Magento\Framework\HTTP\PhpEnvironment\Request::getServer() etc/module.xml <module name="Test_Override" setup_version="1.0.0"&...

1
2 3 4 5
26