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
3
votes
1answer
3k views

Payment method only admin Magento 2?

When working with Magento 2, sometimes we want to disable Payment methods on the Front page and use it only for Admin. Or, if we want to set more rules for Payment methods to check whether payment ...
3
votes
1answer
917 views

How to properly override a core JS file in Magento2

We are attempting to override the behavior of Bundle Products in Magento2, specifically, to enable user defined quantities for Checkbox type products within the bundle. We have written an extension, ...
3
votes
1answer
2k views

rewrite block not working

i try rewrite my block on app/local/lesson7/test/block but its not working my modules xml (lesson7.xml) <?xml version="1.0"?> <config> <modules> <Lesson7_Test> ...
3
votes
1answer
819 views

Override Adminhtml importexport dataflow Profile Controller

I'm trying to override ProfileController located in app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php I created a new module to handle that as following : app/etc/...
3
votes
2answers
3k views

Overriding Contact Controller - No difference

After running through every tutorial on the internet about overriding core controllers I resort to posting here. Magento: 1.9.1.1 community Namespace: Tft Module Name: Customcontact Files: /app/...
3
votes
2answers
1k views

Is it possible to hook into the image upload function on the wysiwyg editor?

I'm trying to trigger a function after an image has been uploaded using the wysiwyg editor but I don't think an events is fired after this operation. I know it's relatively easy to do so when you ...
3
votes
1answer
4k views

How to override / extend local extension model in magento?

I got a problem in overriding magento model local extension. Here is my module config: etc/modules/Mycompany_OrderExport.xml <?xml version="1.0" encoding="UTF-8"?> <config> <...
3
votes
2answers
6k views

Handling AJAX requests to display template partials

Pretty new to magento and I'm setting up a custom module to override the core newsletter. All I really want to do is add ajax submit to the form, which is straightforward so far, and also allow the ...
3
votes
1answer
61 views

Magento 2 - Argument 2 missing error on overriding file

I am trying to override Magento\Catalog\Block\Category\View added this code in di.xml <preference for="Magento\Catalog\Block\Category\View" type="Naheed\AllProducts\Block\Category\View" /> ...
3
votes
1answer
76 views

Magento 2 override /lib html file [duplicate]

I am trying to override an html file in the lib folder, but I cant get it to work. Here is what I have so far: Path to file I want to override: /lib/web/mage/gallery/gallery.html Path to file I want ...
3
votes
1answer
54 views

Override OnepageController.php Not Working

I'm trying to override the successAction in the app/code/core/Mage/Checkout/controllers/OnepageController.php. I have done the following: I've created my override folder here: app/code/...
3
votes
1answer
73 views

Overriding magento core scripts.js file: Magento 2

In our custom module, we have pages similar to the order page. We need some changes in the scripts.js file only in those custom module pages. Following is the core file we are using is module-...
3
votes
1answer
334 views

Magento 2 Override image problem (static image of parent theme)

Having a parent theme, I have created a child theme. (Magento 2.2) Parent theme: Mgs/claue Child theme: Bee/elag In the web there is a Title of page with a background css: .page-title-wrapper { ...
3
votes
1answer
648 views

How to override/extend base layout file via Module in magento2?

How can we override/ extend a base layout file via Module in Magento2? For example, I need to override the "catalog_product_prices.xml" from module-catalog/view/base/layout/catalog_product_prices....
3
votes
4answers
542 views

Can not override Magento/Checkout/Model/DefaultConfigProvider.php file

I want to change a file in Magento\Checkout\Model\DefaultConfigProvider file I am trying to change data in function but I can not override funciton Where I am going to Wrong. I have Created a File ...
3
votes
1answer
624 views

Magento 2 : How to override core js in Extension?

In magento 1.X we can check my exention is enabled or not in xml via below kind of code. <action method="removeItem" ifconfig="easylife_switcher/settings/enabled"> <type>skin_js&...
3
votes
2answers
214 views

Need to override Mage_Core_Block_Abstract function _toHtml()

I have 4 different stores in the same Magento system, so I have 4 different themes. One of them is overriding on /code/community/mage/cms/block/block.php the function _toHtml() like this: protected ...
3
votes
0answers
33 views

I want to rewrite phtml file in module-grouped-product

I am trying to rewrite the phtml file but it's not working my code is : a main file path is public_html/vendor/magento/module-grouped-product/view/frontend/templates/product/view/type/grouped.phtml ...
3
votes
0answers
41 views

Magento 2 Can We override **Add New Product** Page ? in custom_module on frontend area?

I want to make a custom page where vendor can add New Product with all text fields which Magento provide from the backend. I want to override this same page on my custom module on the frontend side. ...
3
votes
0answers
264 views

Magento 2 theme HELP

Not long ago I made my first Magento 2 custom/child theme so that my website changes won't be erased when I upgrade to another version. I now want to override some core Magento 2 files that I need ...
3
votes
1answer
70 views

Overriding Magento 2 file causes fatal error

I've created an override by copying the original file here and then making my changes: app/code/Vendor/Module/view/adminhtml/templates/order/create/items/grid.phtml I have created a layout XML to ...
3
votes
1answer
126 views

How to Override custom module Model in custom module Magento 2?

I have two Modules in app/code. Xyz_Xyz - Module that already exists. I can't change its file. Abc_Abc - Module that I creating to override Xyz_Xyz Model. The code I try is here. app/code/Abc/Abc/...
3
votes
0answers
351 views

No Way to Clear/delete a Selected Image using Media Browser on category edit page

With reference to this Q&A there's another question. How do I clear the image selected using the Media Browser on category edit page in the admin Panel? Here's what I tried: in app/code/...
3
votes
1answer
984 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 ...
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\...
3
votes
0answers
321 views

Magento2 : Override Admin Js file

I am working on Magento 2.1 CE. My current active Theme is the Default LUMA Theme I wish to override the CORE Modules "bundle-input-type.js" located in "vendor\magento\module-bundle\view\adminhtml\...
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 ...
3
votes
1answer
3k views

Magento 2 : Getting an error “syntax error, unexpected 'Abstract' (T_ABSTRACT)”

I have create 2 files as below : Namespace/Module/Model/Test.php <?php namespace Namespace\Module\Model; use Namespace\Module\Model\Payment\Method\Abstract; class Test extends Abstract { } ?> ...
3
votes
2answers
676 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/...
3
votes
0answers
1k views

layout.xml : change item renderer in checkout_onepage_review [closed]

I would like to change the item listing presentation in the checkout page. I then made a custom checkout/onepage/review/item.phtml file and in my module layout file I defined it based on the original ...
3
votes
3answers
2k views

override admin product information page

I was created admin module for manage supplier information, next I want to add supplier list drop down to product details ( catalog > manage product > Inventory >) How to do it ?
2
votes
2answers
12k views

Override core checkout cart controller

I have already included a custom controller in my local module. The config.xml snippet for it is: <routers> <subscription> <use>standard</use> ...
2
votes
4answers
6k views

Magento 2 : Override Template From “module-theme”

I want to override sections.phtml file from vendor/magento/module-theme/view/templates/html/ I am using default magento theme I have created structure, app/design/frontend/Magento/Magento-Theme/...
2
votes
2answers
2k views

Override AbstractPdf class in magento2

It is not good way to override core class of Magento. But I have to do this because I am in way that class is abstract and method is protected so I think preference and pluginshould not work. I found ...
2
votes
4answers
282 views

Trying to override Mage_Core_Model_Domainpolicy

I'm trying to override the model Mage_Core_Model_Domainpolicy. Everything should work by now, but, obviously, it doesn't. This is my config.xml: <?xml version="1.0" encoding="UTF-8"?> <...
2
votes
4answers
5k views

how to override Catalog\Category\Abstract.php

I want to override Catalog\Category\Abstract.php page. I have modified following things config.xml <global> <blocks> <adminhtml> <rewrite> ...
2
votes
3answers
4k views

Best Practice: How to add a column to a backend grid ?

Usually we need to add to the Order Grid some column, so let take this as example. There are 3 ways to do that: Rewrite the grid block in our custom module Use an observer on the event ...
2
votes
1answer
5k views

Magento 2 Training Overriding a core class

I'm trying to implement a basic m2 class override following the M2 Fundamentals Course and it is not working. Here is what I have in my Training/Test/etc/di.xml <?xml version="1.0"?> <!-- /*...
2
votes
1answer
2k views

Custom ajax loader gif in Magento 2

How can I override the default ajax loader gif in Magento 2? I can only find answers to do this in Magento 1
2
votes
2answers
490 views

Block override for new order creation not working

I have created a simple module which adds an indicator to the store selection form when creating a new order from the backend. Example As you can see it works, the problem is that it only works when ...
2
votes
2answers
3k views

Magento 2 : override resource model that is called by factory method

I am trying to override \Magento\Sales\Model\ResourceModel\Report\Order\Createdat by using <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
1answer
260 views

Add files to core or to local? (Not override)

I am installing the RedSys module http://www.redsys.es following their guide. At some point of their guide they say the following: 4.Se deben colocar los ficheros de la carpeta “Source”, incluido ...
2
votes
1answer
1k views

rewrite model not working

ihave problem again with my rewrite, i tried create rewrite model on my lesson app/code/local/Lesson/Test/etc/config.xml <?xml version="1.0"?> <config> <modules> <...
2
votes
1answer
3k views

How to override magento-checkout CustomerData/Cart.php?

I need some changes in CustomerData/Cart.php to have child products added to cart displayed in minicart. Can I make this overrides inside my Theme Folder. I would not like to have my changes smashed ...
2
votes
4answers
3k views

Override adminhtml form

I must rewrite the Sitemap form in the adminhtml. I must add a new field but I can't display that. I've checked on Google and the results haven't help me. <?xml version="1.0"?> <config> ...
2
votes
1answer
1k views

Rewrite Adminhtml Model doesn't work

I need to rewrite app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php my config.xml : ... <global> <models> <mymodule> <class>...
2
votes
2answers
212 views

When to use model rewrites in Magento

I want to know when we should use model rewrites ? What's the down-sides of it ? I mean when we rewrite a core model class, we should know that no extension can rewrite the core class from now on, so ...
2
votes
1answer
2k views

Can not override Sales Resource Model Collection class

I am trying to override Mage_Sales_Model_Resource_Order_Collection My custom module's config: <?xml version="1.0" encoding="UTF-8"?> <config> <modules> <...
2
votes
1answer
154 views

How do extensions override non-rewritable classes

I was going to put together a tiny extension to enable Template hints under global scope, but got stuck trying to rewrite core/template. Class rewrites only work for classes instantiated via one of ...
2
votes
2answers
2k views

How to override adminhtml file in Magento 2 [duplicate]

We have to override vendor adminhtml file in magento2. \magento\module-sales\view\adminhtml\templates\order\view\info.phtml Does anyone know how can i do this? Thanks

1
3 4
5
6 7
24