Skip to main content

Questions tagged [overriding]

Filter by
Sorted by
Tagged with
0 votes
1 answer
84 views

Override di.xml OR Exclude a code part to be added in generated\metadata\global.php

Basically I want to make magento default store credit(Magento_CustomerBalance) to be enable/disable at website level scope(by default its global level) I have overirded & made changes in certain ...
GunJan Mehta's user avatar
0 votes
0 answers
88 views

Magento 2 : Overriden UI Component in Custom Theme is not Working

Overriden UI Component in custom theme is not working. If I delete the existing/original ui_component file then only it is correctly loading from custom theme (from app/design/../..) Why this, How ...
Kuldeep Panditpawar's user avatar
0 votes
2 answers
101 views

Magento 2.4.2 : Override third party layout file

I have third party module where I want override its layout file. Third party module file: /app/code/Magecomp/Savecartpro/view/frontend/layout/savecartpro_customer_viewcart.xml <?xml version="1....
Shivani Singh's user avatar
0 votes
1 answer
178 views

Magento 2.4.2: Do I need to override system.xml in my custom module to add a new tab, section, group and field in the admin backend?

I need to set and get config data in Magento backend. I know that it is system.xml under module-backend that I need to add to. I am little confused as to how to override this file in my custom module. ...
CodeForGood's user avatar
0 votes
1 answer
975 views

Overriding invoice email template in Magento 2.3

I need to override invoice email template and add a variable (po number) in the template. I ve followed a few tutorials but they didn't help at all. I have an email template in admin panel at ...
user95895's user avatar
1 vote
0 answers
231 views

After overriding module-catalog/final_price.phtml 'From price' 'disappears from configurable products

My override of module-catalog/final_price.phtml makes the 'From' disappear from the price for configurable products. module-configurable-product too has a final_price.phtml in the same path as module-...
ralf's user avatar
  • 11
0 votes
1 answer
188 views

Magento2 remove Assign a Customer Group column from action dropdown

I want to remove Assign a Customer Group action from dropdown in customer grid but i cannot override it in custom module, can anyone let me know how to achieve it? i have tried by taking node and ...
bhargav shastri's user avatar
1 vote
2 answers
702 views

How to rewrite /lib/web/magnifier/magnifier.js file in a custom module in magento 2.3?

Can we rewrite files in the lib folder? If we can, I want to know how to rewrite /lib/web/magnifier/magnifier.js file in a custom module.
nagaratna's user avatar
0 votes
1 answer
1k views

Override Placeholder Image function in Magento2

I have a requirement like below. I have uploaded a placeholder images for "Base Image", "Small Image" and "Thumbnail Image" in admin settings. So whenever there is no product image is available, ...
Jafar Pinjar's user avatar
  • 1,951
6 votes
2 answers
5k views

Magento 2.3 : Remove Constraint from db_schema.xml file

I just try to override db_schema.xml file of a core customer module into my custom module , but there is no success. I need to remove a constraint defined in customer db_schema.xml file, how may I do ...
Amit Dwivedi's user avatar
  • 1,550
1 vote
0 answers
181 views

Magento 2.3.X - Override /checkout/cart to show my custom module

I am trying to create a module that replaces the default /checkout/cart page. I have created app/code/NewShop/Cart module and it just displays a text now. app/code/NewShop/Cart/etc/frontend/routes....
Kibret's user avatar
  • 43
0 votes
0 answers
765 views

Magento 2: Failed to load resource: the server responded with a status of 404 (Not Found)

I am trying to override magento 2 core js ' require-config.js file at path Test/JsOverride/view/frontend/ var config = { "map": { "*": { "menu": "...
Paras Arora's user avatar
0 votes
1 answer
249 views

Overriding CustomerData/Cart.php removes Total from MiniCart Magento 2

I have overridden \vendor\magento\module-checkout\CustomerData\Cart.php file in my custom plugin using di.xml using below code: <preference for="Magento\Checkout\CustomerData\Cart" ...
Khushbu's user avatar
  • 825
1 vote
0 answers
128 views

Issue with Overriding cart in Magento2.3.1

I want to add a custom button having a different value on the cart page I am facing issues with JS and won't understand what below line will do: data-mage-init='{"Magento_Checkout/js/action/update-...
Yogita's user avatar
  • 784
0 votes
1 answer
92 views

I have compilation error like Incompatible argument type: Required type: \Magento\Shipping\Model\Rate\ResultFactory. Actual type: array; File:

use Magento\OfflineShipping\Model\Carrier\Flatrate\ItemPriceCalculator; use Magento\Quote\Model\Quote\Address\RateRequest; use Magento\Shipping\Model\Carrier\AbstractCarrier; use Magento\Shipping\...
nikita's user avatar
  • 1
4 votes
1 answer
428 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 ...
Hassan Al-Jeshi's user avatar
0 votes
2 answers
1k views

Magento 2 : Issue With Override Magento\Checkout\Model\Session

i am override the checkout model seesion in this way in magento 2.2.5 "\app\code\Namespace\Modulename\etc\di.xml" <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Radha Krishna's user avatar
1 vote
1 answer
887 views

Magento2 override module-ui base admin template file?

i want to override following file in my custom module so that when magento admin sales grid renders this template from vendor it would take file from my module: vendor\magento\module-ui\view\base\web\...
bhargav shastri's user avatar
0 votes
1 answer
165 views

Magento2.2.2: Module override cause in Wysywig editor shows broken image

I have to override the Customer module. vendor/magento/module-customer/Model/Indexer/Source.php in my custom module app/code/Magenticians/Moduleproduct/Model/Indexer/Source.php here is ...
Hafiz Arslan's user avatar
1 vote
0 answers
143 views

Issue in Overriding Magento_Contact's form.phtml file

I want to override the form.phtml file from the magento's core contact module using my custom theme. So i created a folder structure like below, app/design/frontend/Ziffity/Weight/Magento_Contact/...
Aji's user avatar
  • 300
3 votes
1 answer
2k views

Remove Qty Box from mini cart and the page of checkout page

I have a site to buy a unique product (qty =1) so i need to eliminate Qty from mini cart, i just overrided /web/template/minicart/item/default.html : i removed div Qty but she still there any idea how ...
Developper Magento 's user avatar
1 vote
1 answer
561 views

Unable To Override " getJsonSwatchConfig() " Method in Magento 2

I am working on magento 2 and want to override getJsonSwatchConfig method of Magento\Swatches\Block\Product\Renderer\Configurable class to meet the requirement but facing an issue. I have overrided ...
Chander Shekhar's user avatar
0 votes
1 answer
849 views

How to override vendor theme in app/design folder magento 2?

We have one project which has a custom theme in vendor folder. Like vendor/{Vendor}/{custom-theme}/ vendor/{vendorname}/custom-theme/registration.php <?php \Magento\Framework\Component\...
Prince Patel's user avatar
  • 22.9k
0 votes
4 answers
278 views

Overriding template not showing up

I am trying to override template of Magento_Review module I added new layout file under my module app/code/Custom/CustomReview/view/frontend/layout/review_product_list.xml <?xml version="1.0"?...
Daniel_12's user avatar
  • 680
6 votes
5 answers
6k views

$block->getViewModel() returning NULL

I am overriding the layout and adding ViewModel in that layout but when I try to fetch the ViewModel getting below error PHP Fatal error: Uncaught Error: Call to a member function getCodes() on ...
Daniel_12's user avatar
  • 680
0 votes
1 answer
2k views

Overriding Base file template file

There is a file that is used asynchronously in the front end called listing.html at the following path. vendor/magento/module-catalog/view/base/web/template/product/list/listing.html It is used by ...
Leon's user avatar
  • 35
0 votes
1 answer
216 views

Getting product object inside defaultinvoice.php file for getting custom attribute values

I will tell what i have done till now. I have made a custom module to override the Magento\Sales\Model\Order\Pdf\Items\Invoice\DefaultInvoice file and its working fine. I am able to get sku, ...
Shyam Krishna Sreekumar's user avatar
2 votes
1 answer
2k views

Magento 2 How to override extension frontend template file?

I have one extension and it has the following file: app/code/[Namespace]/[Module]/view/frontend/templates/test.html I want to override that specific file in my theme: app/design/frontend/[Namespace]/[...
Rajan Soni's user avatar
  • 1,019
0 votes
1 answer
210 views

How to override core block class correctly? - Magento 1.x

1 way: to copy directory structure of core block to local code pool and copy core block file. For example : app/code/core/Mage/Catalog/Block/Navigation.php to app/code/local/Mage/Catalog/Block/...
Kyrylo Romantsov's user avatar
3 votes
0 answers
696 views

Possible useless methods overriding magento2

This is a grid collection file. In this i didn't get any grid issues. According to CodingStandard it shows this warning: ---------------------------------------------------------------------- 32 | ...
chris's user avatar
  • 341
2 votes
2 answers
2k views

Override HTML Template from custom module not working

I am trying to override HTML template in my custom module. I am working on Magento ver 2.2.2 Vendor/Moule/view/frontend, I have created a requirejs-config.js file: var config = { map: { ...
user00247's user avatar
  • 638
2 votes
0 answers
67 views

The magento custom sorting functionality is not working

I am creating a Magento module to add a sorting option of a bestseller on the category page. For doing so I have to override few classes in the core. In the beginning, I have created config.xml file. ...
Akshay Vasu's user avatar
2 votes
4 answers
2k views

Magento2 Best practice to edit layout xml file

Suppose that I want to edit the file vendor/magento/module-theme/view/frontend/layout/default.xml Do I edit the file directly? It seems not a best practice to me. Or is there anyway I can ...
eulercode's user avatar
  • 121
1 vote
1 answer
190 views

Template overriding not working

I need to override the template:module-checkout/view/frontend/web/template/shipping.html I have created requirejs-config.js var config = { map: { '*': { 'Magento_Checkout/...
P S's user avatar
  • 1,983
1 vote
1 answer
213 views

Magento2 Custom module Footer

I have Created a Custom Email template module, I wants asign all the footer design same as my module footer design, how to override Default Footer to my custom email module. Thanks
shivashankar m's user avatar