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
0answers
85 views

Grid showing a loader continouisly and a popup something went wrong

I created 2 sub menu under All customer and i created two grids the first for customers that belong to group1 and the second for customers that belong to group 2 but still don(t know how to filter the ...
0
votes
0answers
114 views

Magento 2: Display some colunms in the grid customer according to group

I have created a new menu so that when clicking on all customer, I have two sub menu: local and export And I want to have in the local grid the list of customers that belong to group 1 and in ...
0
votes
2answers
253 views

How Override the grid customer magento 2

I want to delete some columns from the grid also add new others(custom attributes) and show the list of customers according to group (i will have two grid according) to group) I added the sequence ...
0
votes
0answers
51 views

Magento 2 EE : Override configure function(addbysku.js) of Magento_AdvancedCheckout module using mixins

In addbysku.js file, I want to override the configure function of Magento_AdvancedCheckout module using mixins in Magento Enterprise Edition. And my js code is, define([ /* eslint-disable strict */ ...
1
vote
2answers
28 views

Rewrite Model in magento

I want to rewrite the Magento 1 model Mage_Sales_Model_Quote_Address_Total_Collector protected function _initRetrievers() How can rewrite this?
0
votes
2answers
59 views

Can't rewrite block (Mage_Review_Block_Product_View) Magento M1

Cant rewrite Mage_Review_Block_Product_View for some reason. In my config file I have: <?xml version="1.0"?> <config> <modules> <NameSpace_ModuleName> ...
0
votes
1answer
679 views

Override Magento UI js file

How can I override this file on my theme? /vendor/magento/module-ui/view/frontend/web/js/view/messages.js I'm a newbie to M2
0
votes
0answers
43 views

Filters in custom product collection M2

I have created a new category in backend and fetched products programmatically via override ListProduct block <preference for="Magento\Catalog\Block\Product\ListProduct" type="Custom\Vendor\Block\...
1
vote
2answers
85 views

Rewrite function , when should I use local/mage and when shouldI use the rewrite by a module

I'm working on Magento 1.9 I can see I have 2 options to rewrite a mage file . First, I just copy the file with the same path in local/mage/.... Second, I use a module and rewrite my method using etc/...
0
votes
2answers
284 views

Magento 2: Override js in custom module doesn't work?

I'm trying to override js in custom module, but that module which i want to override is already override some js from magento_checkout. And seem like it doesn't work :( Here is how i did: That ...
1
vote
2answers
117 views

How to override E:\xampp\htdocs\mage\vendor\magento\module-customer\Controller\Account controller magento 2?

Actually i am trying to override E:\xampp\htdocs\mage\vendor\magento\module-customer\Controller\Account controller using custom module here i am trying to to override $message = __( ...
0
votes
1answer
216 views

Magento 2 how to override the admin user's grid

I am trying to add new custom field in admin user's grid but it's not in UI components. They are generating grid with data object in Magento\User\Block\User. Can any one please provide the solution to ...
0
votes
2answers
449 views

Magento 2.1.10: How to override Magento\Framework\Session\SessionManager

I'm looking for solution for override. Magento\Framework\Session\SessionManager I use the usually way (preference in di.xml), but no hope. di.xml <?xml ...
0
votes
1answer
243 views

Proper path to place template overrides and translations for Mageplaza Blog extension

I recently installed Magento 2 Blog extension FREE and I want to adjust templates to suite my theme and add some translation strings. I know that template overrides should be placed in: app/design/...
0
votes
0answers
85 views

How to override Add to cart functionality in Magento 2.2

How to override Add to cart functionality in Magento 2.2 using custom extension?
0
votes
1answer
318 views

Magento 2.2: How can I override “checkout.item.price.unit” and “checkout.item.price.row” in the cart?

My goal is to switch out the .phtml files: magento_module-wee::item/price/unit.phtml as well as magento_module-wee::item/price/row.phtml with my own custom ones and change how the prices are displayed ...
2
votes
1answer
153 views

I am trying to override core interface in Vendor\magento\sales\Api\Data\OrderItemInterface.php

My di.xml code is here, is there any alternative way to override an interface for core file. <preference for="Magento\Sales\Api\Data\OrderItemInterface" type="Vendor\Name\Api\Data\...
0
votes
2answers
175 views

I am trying to override multishipping.php file in vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface I've added preferences tags in ../etc/di.xml ...
0
votes
1answer
167 views

Magento 2 - Issue on override of Multishipping checkout model

With this question I want to go further and to exactly know if it's possible to override: vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php so far I've experienced some ...
3
votes
1answer
189 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 ...
1
vote
1answer
430 views

Make “Pick up at store” function in checkout layout file

I'm about to override checkout phtml file and also make a javascript file which allows the change of shipping method when a customer choose "pick up at store". Let me show you what i am supposed to ...
1
vote
1answer
332 views

Magento 2 | Override Freeshipping.php

I want to override this file: /magento/vendor/magento/module-offline-shipping/Model/Carrier/Freeshipping.php I created a module, this is the di.xml file: <?xml version="1.0"?> <config ...
1
vote
0answers
47 views

how to overwrite the renderlayer.php in magento 2

When i try to overwrite the Renderlayer.php of module-swatches I am getting error [2018-09-24 06:48:41] report.CRITICAL: Warning: Declaration of Kygo\Swatches\Block\LayeredNavigation\RenderLayered::...
1
vote
0answers
20 views

Overwrite a class extended many times

When I have to override a method of a class that is used as extends in many modules I have to copy the class path and put it under app /local/Mage/.../Core_Class_Extended_ManyTimes.php. But there is ...
0
votes
1answer
29 views

List of files those are updated in upgrade Magento 2.2.x1 to 2.2.x2

I need to list all the files which are modified as we upgrade Magento 2.2.x1 to 2.2.x2.So that I can figure out the rewrites and the other plugins which I have made are working properly after the ...
1
vote
0answers
21 views

Magento 1.9 Can I override the registration page only for one of the stores?

I have multiple stores. I need to override the existing registration page, but only for 1 store? How can I achieve that?
5
votes
3answers
349 views

Magento 2: How to Override core file [closed]

I want to override this core file vendor/magento/module-tax/Model/Sales/Total/Quote I have already followed the standard Magento2 approaches to override core file but unable to fetch tax ...
2
votes
3answers
59 views

Magento override login template only for my brazilian shop

Can I override the login template only for my brazilian shop? The template that I want to override is located here: app/design/frontend/rwd/default/template/persistent/customer/form/login.phtml
1
vote
1answer
292 views

Overriding model file is not working in Magento 2.2.5

I tried to override model, but it is not working. I need to override: Magento\Catalog\Model\Product\Attribute\Backend\Price to Pawan\Catalog\Model\Rewrite\Product\Attribute\Backend\Price But it ...
1
vote
0answers
211 views

override getLoadedProductCollection of \Magento\Catalog\Block\Product\ListProduct

I am overriding getLoadedProductCollection() in my block where performing some custom query public function getLoadedProductCollection() { $myCategory = $this->...
0
votes
1answer
39 views

How to Override PTHML file in magento 2

I am trying to override phtml file. for that, I have changed the path in layout for phtml and block. but my changes are not working. I have made an error in the file but nothing happens. here is my ...
2
votes
1answer
978 views

Difference between Extend a layout and Override layout

In Magento2 currently, I override XML file using below way and make required changes. app/design/frontend/Vendor/Theme/Magento_Catalog/layout/default.xml But I have seen in Magento dev docs ...
0
votes
1answer
333 views

Magento 2.2.5: Error when trying to Override Widget

I'm doing override widget to my custom module. So everything was great in the backend, until i come to the frontend and see nothing at all. I mean it works perfect in backend, but not with the ...
0
votes
1answer
237 views

Override module-fedex Carrier.php constructor

I'm going to override module-fedex constructor, here is origin at \vendor\magento\module-fedex\Model\Carrier.php public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $...
4
votes
3answers
389 views

Magento2: Override default phtml file without create custom theme?

I'm trying to override customer's login.phtml file and I am able to manage the override by creating custom theme Tracks/customtheme, also I put the .phtml file in my custom theme like this /app/design/...
1
vote
3answers
999 views

Magento 2 : How to overrride catalog_product_view.xml

I am new with Magento 2. I wan't to change the page of detailed product: hide Qty box I do that with removing the label and maken an input as hidden. my problem is that I can't arrive to know how to ...
0
votes
1answer
62 views

Magento 2 getting Error override resource model

I have facing Below error when I override resource model Fatal error: Call to undefined method Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Interceptor::getAttributeId() ...
1
vote
3answers
234 views

How to override template Magento_Sales::order/items.phtml in custom module?

I have to override Magento_Sales::order/items.phtml frontend template in custom module. I have added below code to sales_order_view.xml file of my module. <?xml version="1.0"?> <page xmlns:...
1
vote
2answers
188 views

Magento 1.9 Override Model Problem

Path File i want Override app\code\community\OtherCompany\core\Model\Api\Rest\Client.php Path my file override app\code\local\MyCompany\MyModule\Model\Api\Rest\Client.php app\etc\modules\...
0
votes
0answers
34 views

Override class not working on linux server in magento2?

I want to override Magento\ImportExport\Model\Import\Adapter class i have set in di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
385 views

Magento 2 | Override CustomerData-File

I want to override this file: /var/www/magento2/vendor/magento/module-checkout/CustomerData/DefaultItem.php I guess I have to do this by a module. How do you override something like this? Thanks!...
0
votes
2answers
105 views

override Magento_Catalog in 2.2

I want to override prices in catalog module. What I did was to test on actual phtml vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml It works as intended. Now, ...
0
votes
1answer
141 views

Magento 2 | Override Magento_Downloadable

I want to override this file in my module: /var/www/magento2-dev/vendor/magento/module-downloadable/Helper/Download.php to /var/www/magento2-dev/app/code/My/Module/Helper/Download.php How can ...
0
votes
2answers
46 views

adding a new block with overwritten class fails

I have created a new module (to extend checkout): <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
1
vote
1answer
591 views

Magento 2 Override checkout model class

I am working with Magento2, so as per my requirement I need to override the "Magento\Checkout\Model\Cart.php" class, but the cart.php class look like as follow namespace Magento\Checkout\Model; use ...
0
votes
2answers
37 views

How to override .phtml files in Magento 2 without customising theme

I just want to override the customer account and login form for adding custom fields and external link. How do I do that using custom module please avoid creating the theme or customize the theme.
1
vote
1answer
875 views

Magento 2.2.5: Overriding Admin Controller sales/order

I need to override Admin sales/order/index controller, but still getting 404. Below the Steps I take to override - Created My Custom Module app/code/A2bizz/Order/registration.php <?php \Magento\...
1
vote
1answer
427 views

Magento 2 - Not able to override CouponManagement Model

I am trying to override Magento\Quote\Model\CouponManagement core vendor file. What I am trying to achieve is change the default error message when the wrong coupon code is added. My di.xml <?...
0
votes
0answers
57 views

Magento 2: How to remove code from html?

I need remove from the page checkout this: The code of this html is the next: <div class="billing-address-same-as-shipping-block field choice" data-bind="visible: canUseShippingAddress()"> ...
0
votes
1answer
238 views

Can we rewrite multiple blocks of same core extension?

Can we rewrite multiple blocks of a core extension like catalog ? like this : <blocks> <catalog> <rewrite> <class_name_here>...