Questions tagged [extend]

The tag has no usage guidance.

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

Best method to use helper in any template

It seems to be impossible to use a helper in the template Magento_Catalog\templates\product\list\items.phtml. I have tried it via argument injection: app\design\frontend\company\base\Magento_Catalog\...
0
votes
2answers
17 views

Magento 2 - Incompatible argument type, even though constructor parent call matches extended class

I try to extend this class from my own module, because I need to inject another dependency to the constructor and add a few new methods: vendor\aheadworks\module-wbtab\Block\Wbtab\ProductList.php ...
1
vote
2answers
47 views

How to add new custom fields in existing GraphQL API (Query and Mutuation)?

I have basic knowledge about GraphQL. Now, I would like to convert my knowledge into action. For that, I want to know about few things like how can I add my custom field to any GraphQL Query and ...
0
votes
1answer
38 views

Add code to a method without edit Magento core file

I'm in this condition: Magento 2.3.4 with Elasticsuite installed and I want to customize the search box so when #search get focus the page get darker adding a <div class"blury"></div>. I ...
-1
votes
1answer
18 views

Error when extending the Magento\Catalog\Block\Product\ListProduct::class

I tried to extend the Magento\Catalog\Block\Product\ListProduct::class like this : namespace Vendor\Module\Block\Product; class ListProduct extends \Magento\Catalog\Block\Product\ListProduct { ...
1
vote
1answer
21 views

Declaration warning when extending _afterLoad() in AbstractModel

I've created a backend module to which I've added the possibility to set storeview specific data today. That worked and showed up fine. So I'm trying to load and save my storeview data now but it just ...
0
votes
1answer
59 views

Magento2 - Extend Magento Block class in custom module

Basically, I want to use some additional functionality in the layered navigation file Magento_LayeredNavigation::layer/view.phtml file for that using Objectmanager my code works fine. (Also I don't ...
0
votes
1answer
40 views

Magento 1 - Create own adminhtml theme (to override templates from adminhtml)

I need to override the file app\design\adminhtml\default\default\template\catalog\product\edit\options\option.phtml. What steps are required?
0
votes
3answers
67 views

Extend/Override .phtml file in Magento 2

I have a third party module, and I'm trying to override the third party .phtml file but it's not working for me. For these, I tried below ways. Third-Party Layout module: <?xml version="1.0"?> ...
0
votes
0answers
53 views

Extend layout xml in custom module

i would like to extend my child theme layout xml file from my custom module. It my child theme path: app/design/frontend/Smartwave/porto_child/Smartwave_porto/layout/default.xml <...
0
votes
0answers
22 views

keep extend Magento_Ui/js/form/element/wysiwyg but remove component dependency

I just want to extend almost content (not duplicate content to second file). And only remove component 'Magento_Variable/variables'. For reason i don't want to use variables in wysiwyg Is there a way ...
0
votes
1answer
27 views

Extend/Override Javascript Included from Layout (head->link)

I want to extend: vendor/magento/module-catalog/view/adminhtml/web/js/edit-tree.js Which is loaded by layout: vendor/magento/module-catalog/view/adminhtml/layout/catalog_category_edit.xml:12 Why I ...
2
votes
1answer
18 views

Adding option to a product create error

I'm extending the \Magento\Catalog\Block\Product\View file in AddToCart.php. In my AddTocart, I've added this line : $stock = $this->isInStockCustom($sku); Now, I'm adding options to my ...
1
vote
1answer
32 views

Add fullwidth background to related products

I am trying to add a full-width background to the related products on my magento 2 site extending the luma theme. the problem i am having is that the background is being applied but the left/right is ...
0
votes
2answers
216 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
69 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
473 views

How i can extend more than one class in magento 2? [duplicate]

<?php use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; use Magento\Framework\View\Result\PageFactory; use Magento\Framework\App\RequestInterface; use ...
0
votes
1answer
47 views

How to override Quick Order model

I'm working on a Magento 2.2.3 B2B, with the Quick Order feature enabled, and I can't find a way to extend a method of the Magento\QuickOrder\Model\Cart model. So far I tried the usual: MyCompany/...
1
vote
1answer
162 views

Magento 1.9 Extend Model, Load It Before Parent

Class Test1/Module1/Model/A { protectedfunction doSomething(){ //behaviour //behaviour //behaviour } } Class Test2/Module2/Model/B extends Test1/Module1/Model/A { ...
2
votes
1answer
60 views

How do I extend css with theme that doesn't call extend?

sorry if this is obvious or has been answered. I tried looking around and didn't see it. Also I'm getting around Magento okay but by no means an expert. I have a Magento 2 theme that it was ...
0
votes
1answer
44 views

Is this the correct way to write a constructor that extends this other PHP file?

I am using Magento 2.2.6. The file I am extending is \Magento\UrlRewrite\Model\Storage\DbStorage. It has the following constructor: /** * DB Storage table name */ const TABLE_NAME = 'url_rewrite'; ...
0
votes
1answer
828 views

Magento 2 - How to extend wysiwyg setup.js to add language settings?

i need to modify: setup: function (mode) { if (this.config['widget_plugin_src']) { tinyMCE.PluginManager.load('magentowidget', this.config['widget_plugin_src']); } ...
2
votes
2answers
44 views

Extends constructor

I have a class that extends \Magento\Customer\Block\Account\Dashboard\Info and I want to extend its constructor to get customer session, but how do I extend constructor? PhpStorm is highlighting my ...
4
votes
3answers
679 views

how to override Reviews Module

I'm working on Custom module in which I need to override Magento's reviews Module. I want to add some extra fields in Magento's Review Form. I created Preferences in adminhtml/di.xml Now whenever I ...
0
votes
0answers
105 views

Magento 2.2.5: _init() return error “ Allowed memory size of 792723456 bytes exhausted”

I'm doing "Banner Slider", and I'm following module-catalog/category. So when i trying to copy this file: C:\xampp\htdocs\magento\vendor\magento\module-catalog\Model\ResourceModel\Product\...
2
votes
1answer
22 views

What does it really mean to “extend” a style?

If the purpose of _extend.less in a custom theme is to "extend" a style, what does this really mean? Should it be used in the following cases: Change the value of an existing attribute of an existing ...
1
vote
0answers
116 views

Magento 2 top.links loads and then disappears

I am learning Magento 2 theme and I am playing with layout. My goals is to move account links (Default welcome msg, Sign In, My account etc etc) into the navbar. I used Magento Luma as parent theme ...
1
vote
0answers
48 views

Proper way of adding custom code to vendor module?

Is there a guide somewhere to overriding, extending or otherwise adding to the composer module sets that show up in /vendor/? I've run into a couple of scenarios where I just have to make a few small ...
0
votes
1answer
106 views

Magento2 extend a class from SalesRule module

I'm using magento 2.2 and I'm trying to extend a class, more exactly this one: \Magento\SalesRule\Model\Utility And I'm facing an error: Declaration of MagePal\CouponCodeExtraValidation\Model\...
0
votes
2answers
40 views

Best way to change a color

I have created a new theme which is inheriting from Luma. Let's say I want to change the .page-header color, what is the best approach to do this? Should I use a _extend.less file? Or should I copy ...
0
votes
1answer
52 views

Inserting Button in customer account navigation - Sorting order

I inserted a button in customer/account navigation with the following file in my own module: MyCompany/CustomRouter/view/frontend/layout/customer_account.xml: <?xml version="1.0"?> <page ...
2
votes
1answer
1k views

Magento2 LESS extend/override custom theme

I have been going through research and tests for whole day and still found answers do not work for my case or I just do not understand how to properly implement them - therefore post here: I have ...
0
votes
1answer
31 views

What's the best way to manipulate the product list in the category page?

How can I manipulate the list of products which will be shown on the category page?
0
votes
1answer
35 views

Overriding Custom module's controller in Magento2 giving error

I am trying to override the controller of an extension in Magento2. My di.xml file is:- <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
112 views

Including static blocks in a product description

I'm trying to follow this article by Marius so that I can use {{block}} calls in a product description, as many of our products have the same detailed product description, with some minor capacity ...
1
vote
1answer
2k views

Magento 2.2 <preference> not working to override a model class

I want to override a model call (Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector). We used preference to override a model call inside di.XML like magento 2.1.x But it is not working on Magento ...
6
votes
1answer
1k views

Magento 2 Extend Ui DataProvider file

I have created a module. All working fine. Just want to extend one file but can't success. I added extra field at admin tier price using this file. \Magento\Catalog\Ui\DataProvider\Product\Form\...
6
votes
1answer
667 views

When to use mixins and when to use map?

I'm following magento 2 official documentation to create my checkout step. I'm very new to knockoutjs, requirejs, js components which are massively used in magento 2, specially in checkout. I'm ...
1
vote
2answers
3k views

Extending Third Party Modules in Magento 2

In Magento 2 for themes, it's incredibly easy to extend from a parent. This follows a nice logical hierarchy when inheriting theme .xml and .phtml files. This is clearly defined in the theme.xml. ...
2
votes
1answer
493 views

How to extends virtual type from di.xml

Is it possible to extends virtual type class declared in di.xml ? If yes how ?
1
vote
1answer
491 views

How to extend core templates in Magento 2

How to extend vendor/magento/module-checkout/view/frontend/templates/cart/form.phtml so I can add another button to it? I tried it by creating my own module and copied the above file to app/code/"...
0
votes
1answer
95 views

Trying to extend Layout. File not used at all

I try to extend /vendor/magento/module-sales/view/frontend/layout/sales_order_view.xml Therefore I created /app/design/frontend/Company/basic/Magento_Sales/layout/sales_order_view.xml inside my ...
0
votes
1answer
147 views

Impossible to Extend Mage_Contacts_IndexController

I can't extend the Mage_Contacts_IndexController. I followed this guide http://www.blog.magepsycho.com/adding-upload-field-in-contact-form-and-send-as-attachment/ I made app/etc/modules/...
3
votes
1answer
1k views

Magento 2:i18n folder to custom theme

I want to edit .csv file in module-wishlist to my custom theme. I have copied the the file from module-wishlist and copied to app/design/frontend/vendor/theme/Magento_Wishlist/i18n/en_US.csv. ...
2
votes
2answers
76 views

How to create REST API's in Magento 2?

I have to create a REST API that can be used in android phone to list all the products including product image using category id ?
15
votes
1answer
7k views

Best way to extend module less found in web/css/source/module, like _minicart.less?

Which is then the best way to extend less files content in <module>/web/css/source/module/, like for instance Magento_Checkout/web/css/source/module/_minicart.less? Assuming that to A) ...
1
vote
1answer
2k views

Magento 2 move block after another

I want to add some new functionality to the order create view in adminhtml Following magento 2 docs guide I just have to reference the block I want to extend, as far as I understood. My block is ...
1
vote
1answer
111 views

How we can extend Varien_File_Csv class in magento?

I want to open CSV file in a+ mode for append content. I open Varien_File_Csv class and check for that but I did not found any option for open file in a+ mode.
1
vote
1answer
223 views

Extending adminhtml controller from another module in Magento 1

this is my config.xml from my module: <admin> <routers> <adminhtml> <args> <modules> &...
7
votes
2answers
12k views

How can I extend a UI component JavaScript in Magento 2?

I know there is already a topic about this, as well as a documentation, but I just can't get it to work: How can I extends a UI Components' JavaScript in Magento 2? I'm trying to extend Magento_Ui/...