Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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

Css file is generated in pub/static folder but looking at source file in browser it is not listed

After deploying my theme I see that the mycustom-m.css file is generated at /pub/static/frontend/Vendor/mytheme/en_US/css/mycustom-m.css, but it does not make any changes. Looking at the source file ...
0
votes
1answer
336 views

What is the best way to override _initProduct() in module-checkout\Controller\Cart\Add.php

What is the best way to override _initProduct() function in: vendor\magento\module-checkout\Controller\Cart\Add.php I have this in my di.xml: <type name="Magento\Checkout\Controller\Cart\Add"&...
0
votes
1answer
4k views

How to “override” default Magento2 “Luma” Theme with a Custom Theme

I created a custom Theme with "Luma" as its parent. Now I want to override .less / css stylings. (for example "header" background color) Thats the Folder structure I have: I did copy "_module.less" ...
0
votes
1answer
3k views

Magento 2 Override minicart.phtml template?

This is the Magento core template path: vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml I would like know how to override this template with my theme.
0
votes
2answers
34 views

Rewritting adminhtml block issues

This is my xml: <global> <blocks> <mynamespace_mymodule> <class>Mynamespace_Mymodule_Block</class> </mynamespace_mymodule> &...
0
votes
1answer
43 views

How to override template in magento 2.0?

Based on the theme development documentation http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-create.html here I could create a space for new theme in magento 2.0 but overriding ...
0
votes
1answer
154 views

Override Magento Catalog Detail view and List view

i am using Magento CE 2.1 version, i am trying to override Product detail view (Catalog). My folder structure is What are the files to override for Detail view and List view?
0
votes
1answer
130 views

When extending Mage_Tax_Helper_Data admin menu Sales>Taxes disappears

I'm trying to extend properly the core class Mage_Tax_Helper_Data with a module named "smartvat". All seem ok, my config.xml file: <?xml version="1.0"?> <config> <modules> <...
0
votes
1answer
301 views

rewrite _prepareCollection and add custom attribute to filter for product grid

i want to rewrite the product grid like this protected function _prepareCollection() { parent::_prepareCollection(); $this->getCollection()->addAttributeToFilter('supplier', array('...
0
votes
2answers
3k views

Magento 2 - Can't Change Page Layout Columns With An Override Layout File

I am able to change the layout columns if I extend a page's layout file, but it won't work if I use an override layout file. What do you have to do to change a page's layout columns with an override? ...
0
votes
0answers
32 views

How to scope class overwrite to affect only within module?

When I overwrite a Model/Controller/Helper overwrite through <rewrite/> in my module, how can I do it such that the overriding of the classes is scoped within my module and those that declares &...
0
votes
0answers
247 views

How to override 'vendor/magento/module-catalog/etc/product_types.xml' in Magento 2.1?

In Magento 2.0 if you put the file vendor/magento/module-catalog/etc/product_types.xml inside your module's etc folder, it'll be overridden. But this same behaviour is not working in Magento 2.1. So ...
0
votes
0answers
1k views

extending Adminhtml Product edit page in Magento 2

In Previous Magento released versions (2.0.*) I have successfully extended and it's working fine. When comes to Magento 2.1.0 the same functionality not working. I have tried below code. If I went to ...
0
votes
0answers
226 views

Overriding a class : Mage_Catalog_Block_Product_View_Type_Configurable

I want to override Mage_Catalog_Block_Product_View_Type_Configurableclass. I have created one module : Ved_Catalog Here are my module files: Code from config.xml : <config> <global> ...
0
votes
0answers
166 views

I am trying to override model class “Mage_Catalog_Model_Layer” but nor work?

I am trying to override "Mage_Catalog_Model_Layer" class but not work. i) config.xml <config> <modules> <Surtikart_Underprice> <version>0.1.0</version> &...
0
votes
1answer
32 views

Removing index.php from product pages results in 404 error [duplicate]

I have been trying to figure out how I can get rid of index.php before my product URLs. The home page is ok but when I click products it throws up 404. I have changed the config with seo url rewrites ...
0
votes
0answers
44 views

Override Adminhtml Order Create.php file in Enterprise

I want to override Mage_Adminhtml_Model_Sales_Order_Create file. For this purpose I am doing below code : config.xml <adminhtml> <rewrite> <sales_order_create>...
0
votes
1answer
709 views

Where to upload custom form.phtml?

I modified the text for the product review form but the website doesn't reflect the update. I edited: vendor/magento/module-review/view/frontend/templates/form.phtml I put uploaded it to my custom ...
0
votes
1answer
34 views

Magento 2, rerwite entire core module

I need to rewrite newsletter module. I nedd to add some fields to database and grid. And I need to change the form. What is the best way to do it in magento2? Shoud I add fields to ...
0
votes
1answer
346 views

Error when rewriting classes: call to member function on non-object

Pre I'm trying to do a very basic rewrite just to see if I can make it work. Unfortunately, no matter what class I rewrite I get fatal errors somewhere in magento. This is my code for trying to ...
0
votes
1answer
175 views

Want to override special price end date in list.phtml

i am trying to override special price start/end date time. i have done in view.phtml, but in list.phtml it is not applied when i set special price end date in admin panel. What i did wrong. Can ...
0
votes
1answer
198 views

Override do not apply in a custom module

I try to override the mini cart but by changes are not getting applied. I have the following in my di.xml inside custom module <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
1answer
309 views

How to override .phtml files in Magento 2 Tax module?

I want to override a .phtml file in following location, please guide me how to do that. vendor\magento\module-tax\view\base\templates\pricing\adjustment.phtml Thanks
0
votes
1answer
481 views

Can't make block and model rewrite working

I am getting mental break because I can't make my custom module which should rewrite 2 blocks and 1 model work. My module is loaded - I checked in admin panel System->Configuration->Advanced but ...
0
votes
0answers
178 views

Tier pricing rounding - to show float number for SAVE 3.55%

There is problem with "You save %" on tier prices. It shows only integer and I many cases this looks strange like, without desired precision. Buy 4 for 29.69 each and save extra 2% Buy 6 for 29.39 ...
0
votes
1answer
198 views

Simple local extension model extend problem

I wan't to extend local extension model with this existing config.xml: <config> <modules> <Smartwave_All> <version>1.0.0</version> </...
0
votes
1answer
415 views

Rewrite model to prevent changing shipping method at review order stage of checkout

I'm trying to override a model class to prevent customers changing the shipping address and method at the (final) order review stage of checkout, using this suggestion. This is the point at which the ...
0
votes
1answer
446 views

Overriding an overriden core model

I've followed some tutorials and referenced some questions on here yet my problem still festers. Magento version is CE 1.9.1.1 The company I work for has purchased an extension that overrides ...
0
votes
0answers
475 views

Override protected _toHtml() method

I am trying to override _toHtml() method of class Mage_CatalogSearch_Block_Autocomplete like below : app/etc/modules/Custom_Autocomplete.xml <?xml version="1.0" encoding="UTF-8"?> <config&...
0
votes
0answers
55 views

In block getModel error?

I have Block question class Question extends \Magento\Framework\View\Element\Template implements \Magento\Widget\Block\BlockInterface in function public function __construct( \...
0
votes
1answer
309 views

How to rewrite model Mage_Catalog_Model_Product_Attribute_Backend_Media?

I'm re-writing catalog/product_attribute_backend_media model in my module using folllowing configuration <global> <models> <catalog> <...
0
votes
1answer
85 views

Customer Class Rewrite Magento Enterprise Edition

I am facing a strange issue. Bascially I need to rewrite the customer authentication logic. So as to rewrite authenticate() method I have created a small module. The code for the module is as below: ...
0
votes
2answers
576 views

Help overwritting some model file and block of wishlist

I'm trying to override some files of wishlist core module. This is my config.xml file: <?xml version="1.0"?> <config> <modules> <Srh_Wishlist> <...
0
votes
0answers
167 views

how do overriding Block with template has changed?

I want to override the block : <block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart.additional" as="product.info.addtocart" template="product/view/addtocart.phtml"/> ...
0
votes
1answer
321 views

Overriding adminhtml form container

I want to override the form container in import section of admin. here is my config.xml : <global> <blocks> <editimport> <class>...
0
votes
1answer
83 views

access parent class on class overwrites in magento, from a sibling

It is required to overwrite customer_resource class. I added required config.xml options for resource rewriting, but when overwritten class method calls parent class method from itself, it actually ...
0
votes
2answers
549 views

How to override phtml using custom module

I want to override two phtml one is product view.phtml and another one is addtocart.phtml I m trying this code: <catalog_product_view> <reference name="product.info"> <...
0
votes
0answers
747 views

Varien's product.js method override is not working

I want to override initPrices method. For this in js folder i have created directory scommerce and in that directory created file product.js In product.js file code to override is as following: ...
0
votes
1answer
453 views

Rewriting price filter

I need to rewrite how filter looks, but there's no specific template for that the label rendering in Magento core, so what's the best way to edit how it looks? The code in Catalog/Model/Layer/Filter/...
0
votes
3answers
801 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&...
0
votes
1answer
529 views

Overwrite community model file

I try to overwrite the Exportorders.php in my extension which is located here: /app/code/community/Raveinfosys/Exporter/Model/Exportorders.php I created my own extension now in /app/code/local/...
0
votes
1answer
36 views

Filter payments of Buckaroo

I wrote an observer that filters payments based on another post from here. This works fine for Magento's default payment methods but not for the methods in Buckaroo and this is because Buckaroo has it'...
0
votes
0answers
550 views

Magento overwrite payment information block

I'm writing custom checkout section and I'm trying to overwrite payment information section of Magento and use existing methods defined in Mage_Payment_Block_Form_Container. What I'm doing? config....
0
votes
1answer
2k views

Navigation menu : page.xml doesn't call the overridden class (topmenu.php)

EDIT : solved by Jonathan Hussey. See at the end of post (or below) for another question if you want to help me about overridding template and layout :) subsidiary question : Can I override page.xml, ...
0
votes
2answers
2k views

override core files for inserting admin menu or adding it on extension

I have \app\code\core\Mage\Catalog\etc\adminhtml.xml where I have the admin menu and I want to have a sub menu for my manage products item: <products translate="title" module="catalog"> ...
0
votes
0answers
67 views

What is the best way to edit your Magento site's toplinks block in the top right hand corner, WITHOUT editing core files? [duplicate]

This is the block which contains "My Account", "Log In/Log Out" etc by default. I've seen a few suggestions on how to do this, but I haven't seen anything complete that doesn't involve editing core ...
0
votes
1answer
491 views

Trying to override a community pool template

So, I am trying to override a template from an extension we have installed. This is the template location: app/design/frontend/enterprise/default/template/affiliatepluscoupon/affiliatepluscoupon....
0
votes
1answer
261 views

How to override js file in lib folder for admin theme?

I need to override js located in lib/web/mage/backend in Magento/backendtheme. Basically i should get modified js in static content for admin theme.
0
votes
1answer
518 views

Magento 2: How to redirect from Model?

I have below code. I'm overriding Paypal Express 1 function. magento\app\code\Custom\Module\Model\Api\Nvp.php namespace Custom\Module\Model\Api; class Nvp extends \Magento\Paypal\Model\Api\Nvp { ...
0
votes
1answer
515 views

sales order grid custom column filter QLSTATE[42S22]: Column not found: 1054 Unknown column

Here is the class to rewrite sales order grid adding email column, there is an error for filtering by this email column SQLSTATE[42S22]: Column not found: 1054 Unknown column 'email' in 'where ...