We’re rewarding the question askers & reputations are being recalculated! Read more.

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

Trying to rewrite Catalog Product Collection

I'm trying to rewrite the Magento Catalog Product Collection - basically I have a specific filtering rule that must be applied every time a product collection is loaded, so I'm figuring that putting ...
3
votes
2answers
6k views

Wrong tab configuration. error?

I am trying to extend Mage_Adminhtml_Block_Customer_Edit_Tab_View class in order to pass in some functions and display them using a layout update in adminhtml/default/default/template/namespace/...
3
votes
1answer
3k views

rewrite a controller that is already rewriting another

Is it possible to rewrite a controller in a community module that is already rewriting a core controller? I have the syntax correct as it is working in other rewrites but in this specific case the ...
3
votes
2answers
135 views

Question of previous developers use of <rewrite>'s

I'm not only new to Magento, but also inheriting a project from a previous developer. The developer has a module called Adminhtml, which he used to customize the Adminhtml section, and inside the ...
3
votes
1answer
187 views

Overriding template for a specific language

I would like to override a template but only for a specific language (ar_SA) The template I want to override is: Magento_Catalog/templates/product/list.phtml I have tried putting it in the following ...
3
votes
2answers
310 views

Magento 1: use of observers and missing native core setter?

Yet another best practice question. So here's the thing, I have several modules that deal with setting different data on the core Magento block. I don't like to rewrite entire blocks and I tend to ...
3
votes
2answers
2k views

How to extend a core Product List Block model?

I want to extend pring a function into magento where I assemble some product data. In the end I want to call a function like $this->getAlternateTitle() within Lists and Products. This is what I ...
3
votes
1answer
2k views

Custom canonical tags

I am trying to override Magento's addLinkRel method to set custom canonical tags: I want my shop's canonical tags to point to the main shop's pages. So I created code/local/Fkoessler/MyProduct/etc/...
3
votes
2answers
943 views

What is the proper way to extend the Enterprise_PageCache_Model_Processor

I am trying to extend Enterprise_PageCache_Model_Processor and found that I can do it by making sure that I either modify the enterprise.xml in the app/etc global configs but I wanted to do it in a ...
3
votes
3answers
4k views

Magento/Apache internal redirects hang the server

I've asked a similar question on StackOverflow, but to no avail. Here is the issue I've been facing for the last few weeks: Once in a while our Apache server hangs, to bring everything back up I'm ...
3
votes
2answers
152 views

Replacing Magento 1 Controller Rewrites in Magento 2

Is there any general consensus on the best way to replace M1 style controller rewrites in M2? That is, in Magento 1, you could rewrite a URL path to point to controllers from your own module <...
3
votes
1answer
1k views

How to overide ui component form in magento 2?

I want to add a custom field in cms page form in admin side. cms_page_form is created by using ui component form. How can I override this form in my custom module?
3
votes
2answers
3k views

How to modify/update cart success message in Magento 2?

I want to modify/update the success message added by cart controller (Magento\Checkout\Controller\Cart\Add). As described here and here, I can use preference to override controller to update success ...
3
votes
1answer
2k views

Magento 2 : Overide Magento\Catalog\Block\Product\View\Gallery Block

I am working on custom extension and need to override Magento\Catalog\Block\Product\View\Gallery block. I have followed this method. In di.xml, <preference for="Magento\Catalog\Block\Product\...
3
votes
2answers
4k views

Changing main navigation?

I would like to change the dropdown behaviour of navigation. Which files need to be changed? I try to give the dropdown 100% width and place items inline I see this file /vendor/magento/module-...
3
votes
2answers
3k views

Magento2: Checkout cart total block class is not override

Try to Override Checkout cart total block \Magento\Checkout\Block\Cart\Totals#L11 but is not override.Getting the error: Recoverable Error: Argument 4 passed to Magento\Checkout\Block\Cart\Totals::...
3
votes
2answers
713 views

magento 2 override a functionality compared with magento 1

In magento 1 we have local - community - core areas inside app->code folder. When you want to override a functionality placing code with same names in local or community will do the job. working in ...
3
votes
2answers
230 views

Overriding local modules from community pool

I have an extension in the local pool. I would need to override the Block in the module. Can I do it from the community pool. (yes, I know this is not how it should be done, but I'm making a small ...
3
votes
3answers
747 views

Config.xml override not working

I have been trying to override Mage_Adminhtml config.xml, so that Grouped Products do not appear while creating an order from admin. I have checked line by line, don't know why its not working. The ...
3
votes
1answer
1k views

Magento 2 - How to remove '--Please Select--' option from Custom Option dropdown on Product page

In Magento 2 I am trying to remove first option "--Please Select--". Here is my code. After the rewrite, I am not able to see custom option dropdown itself but the page is loading. Please let me know ...
3
votes
2answers
408 views

Override vendor/magento/module-ui/view/base/web/js/modal/confirm.js Magento2

Can anyone help how to over ride vendor/magento/module-ui/view/base/web/js/modal/confirm.js file in theme. Thanks
3
votes
2answers
3k views

Override Extension Helper

I'm trying to override a part of an helper of Help Desk MX extension. So I created a module with the following file: app/etc/modules/company.xml <?xml version="1.0" encoding="utf-8"?> <...
3
votes
2answers
544 views

Magento 2 module not working. Override fails

I am trying to write a module that filters products in a product collection. For that I have tried to override Magento\Catalog\Model\Layer. These are the files in the module: /Viking/FilterProducts/...
3
votes
2answers
3k views

How to override html file in magento 2.1

I need to customize Magento_Checkout module. I have tried to copied that html files into my theme path but the override is not working Override path mentioned in below /app/design/frontend/Vendor/...
3
votes
3answers
3k views

Magento resource Collection override

I have been trying to override Magento resource collection class. I have found few solutions but it seems can't get it to work. The class is located in: App/code/core/Mage/Reports/Model/Resource/...
3
votes
1answer
266 views

Overwriting controller vs overwriting action controller request

I'm busy working though Grokking Magento by Vinai Kopp, and reached a part where he explains where he explains how to rewrite requests to (eg) the checkout/cart controller, and he gives an example of ...
3
votes
2answers
72 views

Trying to add XSRF validation to contact form

I am trying to block a recent "Contact Us" form spammer. I figured the best way to do this is by adding a form key and validating it in the controller. This works when I modify core files, which is ...
3
votes
1answer
1k views

Possibilities in local.xml configuration

I'm rather new to Magento and read in this article that it is possible to configure the base_url values in app/etc/local.xml. Would be nice to have this functionality for running multiple environments,...
3
votes
2answers
2k views

Magento 2 error occurs when using <preference> to override a model class

I'm trying to override a model class Customer.php, maybe I've configure it wrongly, this error occurs: a:4:{i:0;s:316:"Recoverable Error: Argument 21 passed to Magento\Customer\Model\...
3
votes
1answer
242 views

Rewrite Mage_Core_Controller_Varien_Front

How can I rewrite Mage_Core_Controller_Varien_Front? I have already tried the way we rewrite controllers but it is not working. ADDED CODE <frontend> <routers> <...
3
votes
2answers
2k views

How to override grouped.phtml file in my own module in magento 1.9.1.0?

I want to overwrite grouped.phtml file located at app\design\frontend\rwd\default\template\catalog\product\view\type\ path in my own module. My magento version is 1.9.1.0. Please guide me.
3
votes
1answer
2k views

Extending a controller doesn't appear to work

I'm trying to externd a controller. The customer controller to be exact. I found a example on Inchoo But I can't get it to work. I tried turning off all othermodules. I've checked everything ...
3
votes
1answer
1k views

Rewrite in custom module to non existing core class model

I found it is possible to do a rewrite on a core class that does not actually exist.... Usage case example: I am creating a reCaptcha module that integrates google recaptcha into magento's core ...
3
votes
2answers
1k views

How to override magento default search result

I want to override magento default search result, what I want to do is if products are not assign to any category then those products are not display on frontend in search result, by default magento ...
3
votes
1answer
4k views

Magento2: Override layered navigation template

I am trying to override layered navigation template in a Magento2 app. Here is my code: Layout configuration: <!-- app/code/MyVendor/MyModule/view/frontend/layout/default.xml --> <page ...
3
votes
1answer
6k views

How to Override or Extend protected or parent function in Magento 2 using Plugin

I need to override protected function or parent function ex Magento\Checkout\Controller\Cart\Add is extended from Magento\Checkout\Controller\Cart and getBackUrl() is a Magento\Checkout\Controller\...
3
votes
1answer
540 views

How to override Paypal Standard Model

I am trying to override the Paypal Standard Model using the following files: app/code/local/Me/Paypal/etc/Config.xml <?xml version="1.0"?> <config> <modules> <...
3
votes
2answers
106 views

Magento 2 : How to override a custom module which install via composer?

I have installed one custom module using composer as usually that module was installed in vendor directory is there any way to override phtml file in the same module like name but on app/code module ...
3
votes
1answer
314 views

M2.1.9 : How to override the magento default .phtml file under vendor\magento\module-sales\view\frontent\templates\email\items.phtml

There. After success migration work, i need to handle devlopment work,ugh. I'm a mad newbie about Magento2 so could you let me know how to overwrite the default phtml file under vendor/magento .. ...
3
votes
2answers
691 views

How the Base folder will help on Magento 2 modules or themes fallback mechanism

As from official docs : base : used for both front end and admin html. As the part of Magento Theming, how and when to use base folder and how the fallback work with base folder. As i observed in ...
3
votes
1answer
508 views

Magento2 cannot override class Magento\GroupedProduct\Model\Product\Type\Grouped?

I was trying to override the above class (Magento\GroupedProduct\Model\Product\Type\Grouped) Below is my app/code/Best/CustomGrouped/etc/adminhtml/di.xml <config xmlns:xsi="http://www.w3.org/2001/...
3
votes
1answer
895 views

Magento 2: controller preference not working after setup:di:compile

I need to rewrite a couple of adminhtml controllers in Magento 2. I am using preference and my configuration in etc/di.xml file looks like this: <?xml version="1.0"?> <config xmlns:xsi="http:...
3
votes
1answer
903 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
801 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
36 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" /> ...