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
2answers
136 views

How to rename the product detail tab title, and display as the last tab?

How to rename the product detail tab title, and display as the last tab? This is what i added, but didn't make any effect. the file is at the following location: /app/design/frontend/Infortis/...
1
vote
1answer
43 views

How to override or extend template and layout files for an extension downloaded by composer?

I have an extension that is downloaded through composer, there are two files i would like to update. How to I override/extend the files? what is the correct paths i need to create in app/design/...
0
votes
1answer
53 views

What happen when two module override same file?

I am coming from Wordpress development & now I started Magento module development. I am following this tutorial. I am just trying to add social sharing buttons to the product edit page. ...
3
votes
2answers
114 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 ...
1
vote
2answers
268 views

Magento 2: Override XML file from vendor folder to app folder doesn't work/update

I tried to override the XML file by copying the file from vendor/magento/module-catalog/view/frontend/layout/catalog_category_view_type_default.xml to app/design/frontend/Infortis/base/...
1
vote
1answer
68 views

Magento 2.3 - extending layouts in custom theme

In Magento 2.* we could extend core layouts using custom theme, for instance, (assuming our custom theme is named Custom/our_theme) if we want to remove header & footer in customer login page we ...
0
votes
0answers
33 views

Magento 2 : How to override a Abstract Class? [duplicate]

I made some modification related to magento2 order pdf. I want to know how to override a abstract class AbstractPdf extends \Magento\Framework\DataObject
1
vote
0answers
22 views

New to Magento 2 - Is it possible to change every product price every minute?

I work in -precious metal industry- where item prices change every minute based on markets. At the basic level, UnitPrice=MarketPrice+Premiums per tier. My questions are: If we want to import ...
1
vote
1answer
613 views

How to override Customer registration fields to custom module in magento 2

I want to override Customer registration Fields to my custom module i copied the /public_html/vendor/magento/module-customer/view/frontend/templates/ and Layout to app/design/vendor/child_theme/...
2
votes
1answer
153 views

Magento 2.3 - Overide \magento\zendframework1\library\Zend\Locale\Data\xx.xml

Is there anyway to override and not change directly the \magento\zendframework1\library\Zend\Locale\Data\xx.xml ? This is so that I can change the decimal denoter from "," to "." for stores that ...
2
votes
1answer
73 views

Call to helper of module not change the Mage_ prexif by my module prefix

I have changed my etc/system.xml and my etc/config.xml with the structure which should replace the Mage_JaviNewListProductController_Helper_Data by Lecasa_JaviNewListProductController_Helper_Data. I ...
2
votes
0answers
235 views

How to override Magento_ConfigurableProduct/js/configurable.js

I'm following this instruction to override "Magento_ConfigurableProduct/js/configurable.js" but it doesn't work. I'm following this link: https://magento.stackexchange.com/a/131852/70258 After i ...
1
vote
1answer
38 views

Magento 2 in SEO Checker - “The Accessible Index Page is Configured wrong”

So I run our site (on Magento 2.2.3) thru an SEO checker and it flagged up an interesting issue: The Accessible Index Page is Configured wrong. Search engines see your https://www.xyz.co and https://...
1
vote
0answers
17 views

How many ways are there to create a controller and what are they?

I have been developing with Magento 1.9 for the last two weeks. I have found several problems to develop each project (probably because my first project with magento had a high level...). I come ...
0
votes
0answers
36 views

Payment Method Overwrite [duplicate]

I want to add new field in my payment method. I have added the field in phtml file in module but now I want to rewrite the file in my module. How can I achieve that?? Also let me know how to rewrite ...
1
vote
1answer
68 views

Rewrite phtml file and js file in Magento 2

Currently, I have cc card HTML in MyModule/Testing/view/frontend/web/template/form.html I want to rewrite this to phtml file with my module and js in web/js folder. How can I achieve that?
3
votes
1answer
52 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/...
2
votes
2answers
26 views

Whats the best way to override a block class in magento2

1) Use preference in di.xml and add new methods or do changes 2) Or create a new class which extends the actual class and attach the new class to your phtml. Lets suppose you want to extend Magento\...
1
vote
1answer
28 views

Magento override Catalog Compare controller doesn't work

for some reason the Compare controller override doesn't work for me, I tried about everything I could find, but it just doesn't happen and I am running out of ideas. Do you see anything I am doing ...
0
votes
2answers
313 views

Modify product collection in M2

I am overriding Magento\Catalog\Block\Product\ListProduct In function _getProductCollection I have added some extra code. public function _getProductCollection() { $collection = parent::...
1
vote
4answers
279 views

Need to override edit.phtml on cart page to add new button near it

I need to add new button near edit button on cart page. I want o override edit.phtml in my custom module. Can someone guide me how to achieve this? vendor/magento/module-checkout/view/frontend/...
0
votes
0answers
76 views

Magento 2. How to Override Search (CatalogSearch)

I want to hide the specific product which I select from Configuration using Categories in the Search. e.g if I select Gear Category in configuration then If I search the Product of the Gear I want to ...
5
votes
2answers
83 views

Magento 2 : How to override files from Magento core framework?

Actually I'm refering to #19247 for PHP 7.2 specific issue. that partially solved my issue but can't able to override that file. I tried using preference here's what I tried. <preference for="...
0
votes
1answer
86 views

Override javascript with self-minified versions

We tried enabling the built-in minification and javascript merge functions, but some functionality of third-party modules/plugins stopped working. So something is in conflict between how magento is ...
0
votes
1answer
127 views

Override core files in Magento 1.9.4 (Varien.php)

What would be the most appropriate structure of the module in order to rewrite function validate() at app/code/core/Mage/Core/Model/Session/Abstract/Varien.php The idea is to rewrite that block ...
1
vote
2answers
208 views

Magento 2: Layout override sequence custom theme vs extensions

I created a custom storefront theme and override the catalog_product_view.xml file in my custom theme. Below is the path. app\design\frontend\Akhilg\custom\Magento_Catalog\layout\catalog_product_view....
0
votes
1answer
42 views

Magento 1.9 overwrite core

Is it possible to overwrite Magento core functionality in this way? - Mage_Sales_Block_Order_Total { protected function _initTotals(){ //this is core } } and overwrite it with this - ...
0
votes
0answers
16 views

Magento 2 Override Unit.phtml and Row.phtml in Magento_Checkout

I am trying to override both unit.phtml and row.phtml within my Magento_Checkout module. I am doing everything that I would normally do but it doesn't seem to be overriding like the other phtml files. ...
1
vote
1answer
419 views

Magento 2 Override Gallery.php file

I would like to override /vendor/magento/module-catalog/Block/Product/View/Gallery.php file getGalleryImagesJson function In result I would like to get - public function getGalleryImagesJson() { ...
1
vote
1answer
115 views

How to add sub-menus to Magento admin dashboard in Magento2.2.5?

How to add sub-menu to Magento admin dashboard in Magento 2.2.5? I need to override the vendor file. Refer my Screenshot. Any help would be appreciated.
2
votes
0answers
52 views

ConfigurableProduct: How to get the configurable products out of stock?

I want to show all the attributes from my configurable product on my select. I followed this tutorial: Magento 2.2 How to show out of stock in configurable product, with some changes and fixes. So, I ...
1
vote
1answer
64 views

third party module controller overriding not working in magento 1

my config.xml <?xml version="1.0"?> <config> <modules> <Mindtwo_Formbuildercrfprotection> <version>0.0.1</version> <depends&...
2
votes
0answers
170 views

How to override Magento 2 welcome email upon new customer account creation

I need to customize default Magento welcome email template which is sending upon new customer account creation in my custom module. I'm using the following functions for sending welcome email upon ...
1
vote
0answers
45 views

Unable to override account creation email template

I need to modify the welcome email sent to user upon new account creation. I need to do this in my custom module. I tried to override the function sendNewAccountEmail in Magento\Customer\Model\...
0
votes
2answers
102 views

How to override getAvailableMethods method in Magento\Payment\Model\MethodList

anyone have idea how to override getAvailableMethods method from Magento\Payment\Model\MethodList class.
0
votes
1answer
21 views

Consequent overrides of core class

I have two modules: Vendor_Module1 Vendor_Module2 In either module I'm going to extend \Magento\Directory\Model\Currency to override different methods I noticed that only one module can override ...
0
votes
1answer
145 views

Magento 1.9.3 - Can we override Mage_Core_Model_Session_Abstract_Varien class?

I am trying to override Mage_Core_Model_Session_Abstract_Varien class but not getting success. My config.xml file - <models> <coreoverride> <class>...
0
votes
0answers
85 views

Magento 1.9.x - How can rewrite Mage_Core_Model_Session_Abstract_Varien class

I am trying to re-write Mage_Core_Model_Session_Abstract_Varien class in my custom module but getting error : Recoverable Error: Argument 1 passed to Mage_Core_Block_Messages::addMessages() must be ...
0
votes
2answers
553 views

Magento 2 How to override adminhtml Js components

Basically I want to override grid.js component file in Magento 2 Require config view/adminhtml/require-config.js Require config code. var config = { map: { '*': { ...
0
votes
2answers
74 views

How To Pass A Custom Price Value To Product List Price Renderer In Magento 2?

We have come across an issue that I'm trying to solve. In order to overcome this bug https://github.com/magento/magento2/issues/10009 where discounted prices are not applied per customer group, I've ...
1
vote
1answer
22 views

How to add new tab to any custom extension?

I have one previously installed extension which have 3 tabs already added , Now I want to add new tab below it , How can I achieve this . I want to add new tab regions . <adminhtml> <...
0
votes
1answer
39 views

Override function from grouped.php

I am changing the table for a grouped product. I have overridden the grouped.phtml file to make changes. But I need to override the function: getAssociatedProducts($product) // Grouped.php Because ...
0
votes
1answer
31 views

How to overwrite module-ui/Component/Form/Element/DataType/Date.php::public?

I changed the prepare function in vendor/module-ui/Component/Form/Element/DataType/Date.php. Now I want to override it in a way that is update safe. How would I do that? Using my own module? Magento ...
1
vote
0answers
57 views

Magento 2 - How to make responsive layout using child theme css?

How to override styles-m css to set responsive layout? I just add custom blocks in footer area which are not responsive in mobile view. How to override styles-m in Luma child theme? Thanks
0
votes
1answer
75 views

How to override a phtml from extension?

I am using Mega Menu free extension from Ibnab. I want to override menu file to add custom li. app/code/Ibnab/MegaMenu/view/frontend/templates/html/top-mega.phtml Is there any way to override this ...
0
votes
1answer
51 views

payment block rewrite not working

I want to rewrite Mage/Payment/Block/Form/Container.php with another file inside my module. In my module's config file, I have: <global> <blocks> <payment_form> <...
1
vote
1answer
85 views

Overriding a template file from a 3rd party module

What I know Overriding a template from vendor/magento/<magento_module> is straight-forward enough. So, to override a magento_catalog file I'd do: app/design/frontend/<Vendor>/<Child&...
1
vote
0answers
169 views

Private Function rewrite in magento2

i want to override helper class method private function _getGeneralFromAttributeSets(array $attributeSetIds) i use this code and create helper in my module folder <preference for="Test\Test\...
0
votes
1answer
494 views

Magento 2 - Overriding `Magento\Sales\Model\Order\Payment\Info` not working

I am trying to override the Magento\Sales\Model\Order\Payment\Info.php to solve an error due to serialized migrated data from Magento 1 to Magento 2. The method I am trying to override is a protected ...
0
votes
2answers
119 views

Magento 1 - setTemplate in block class constructor does not work

I try to overwrite the template app\design\frontend\venedor\custom\template\catalog\product\view\options\type\select.phtml with app\design\frontend\base\default\template\wr\catalog\product\view\...