Questions tagged [extend]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 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
12 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
25 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
116 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
31 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
216 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
26 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
34 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
53 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
31 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
476 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
37 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 ...
0
votes
0answers
49 views

How to override part of a function for a block

I am trying to override part or all of a function for the file located here: Magento\Customer\Block\Adminhtml\Edit\Tab\Orders.php I want to change the customer_id to main_table.customer_id in the ...
4
votes
3answers
381 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
61 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
74 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
43 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
70 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
37 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
41 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
928 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
28 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
32 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
99 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
1k 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
848 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\...
3
votes
0answers
397 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
2k 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
363 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
358 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
85 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
121 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/...
1
vote
1answer
981 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
75 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 ?
13
votes
1answer
5k 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) ...
0
votes
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
94 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
203 views

Extending adminhtml controller from another module in Magento 1

this is my config.xml from my module: <admin> <routers> <adminhtml> <args> <modules> &...
5
votes
2answers
9k 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/...
1
vote
3answers
145 views

Custom Block Product List Injection failed

I have to display a list of product on the product view, depending on its sku. In order to do that, i have simply pasted the Random.php list example of Magento_Catalog. But in order to find the ...
2
votes
1answer
111 views

Can I override or extend a Magento 2 module?

My question is very simple but I couldn't find any answers so far. Is it possible to properly override or extend a Magento 2 module ? (Without duplicating the module sources). Here is an example: ...
1
vote
1answer
1k views

how to add another field to category edit page in backend?

In version 2.0.x I was able to add another tab to the category edit page in the backend. But since Magento2 moved to UI Components with version 2.1.x it's broken. I can't get my head around it ...
1
vote
0answers
54 views

Magento 2 Product editing error: Form\Gallery doesn't extend Element\AbstractElement

Today we've updated from version 2.0.6 to 2.1.2, it was everything but flawless. But I've managed to fix all te problems except one: When editing a product I receive this error: Exception #0 (...
1
vote
2answers
209 views

Extend Mage_Core_Model_Email_Template_Filter

I am trying to extend Mage_Core_Model_Email_Template_Filter class to add translate directive but I can't make it work. Here my module: app/code/local/Company/Module/etc/config.xml <config> ...
1
vote
2answers
2k views

Magento 2: Short Description label shown as “none” on product page

For some reason the label of the short description is shown as "none" in frontend's product page just before the short description.
1
vote
1answer
514 views

1.9 - Extending catalog/product controller breaks catalog/category

I'm trying to add an action "sample" to the product controller which was going fine. I wanted the url domain.com/catalog/product/sample/sku/{sku}/ so here's what I did: Added file Org_Catalog.xml in ...
1
vote
0answers
244 views

Magento 2: Definition of function getOptionsCollection

I'm trying to extend a function getOption() of Bundle Class(Magento\Bundle\Block\Catalog\Product\View\Type\Bundle.php) in my own Class using following code protected $_ProductBundle; public function ...
6
votes
0answers
947 views

How to extend core UI Component in Magento 2

I've tried to bring Sales -> Shipments grid into my extension. It works fine when I use this in my layout file .xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...