Questions tagged [extend]
The extend tag has no usage guidance.
25 questions with no upvoted or accepted answers
8
votes
0
answers
1k
views
How to extend core UI Component in Magento 2
I've tried to bring the 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....
2
votes
1
answer
177
views
Unable to override \Magento\Directory\Block\Data class-magento2
Can anybody help me to add a class in getCountryHtmlSelect()
I have tried to override \Magento\Directory\Block\Data file using plugin but i can't extend that so i go for perference.
added code in di....
2
votes
1
answer
3k
views
Magento 2: How to override configurable.phtml block
I am just extended configurable block using a custom block, but I couldn't get the "selected_configurable_option" while changing the configurable options [ not getting simple product id ].
Did this ...
2
votes
1
answer
363
views
Extending Core Controller isn't Working
I am need of making a change to the Magento function _checkBaseUrl found within:
app/code/core/Mage/Core/Controller/Varien/Front.php
As best practice I am trying to extend it with my own module so I ...
1
vote
0
answers
187
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
0
answers
67
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 ...
1
vote
3
answers
189
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 ...
1
vote
0
answers
76
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
0
answers
560
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 ...
1
vote
1
answer
806
views
Extend or override blanks theme js
I have a custom theme which inherits from blank and I would like to override navigation-menu.js options how would I do that?
1
vote
2
answers
1k
views
Magento model extension experiment, return: "class does not exist"
trying to create a new model class to be used as a source model for the admin configuration setting of a new module, I got the following message:
Class Makke\GroupOrders\Model\Config\Source\Sort ...
1
vote
0
answers
165
views
Extend coupon code action to present a popup when certian coupon codes are entered
I have read the following: https://stackoverflow.com/questions/20267425/how-to-override-cart-controller-coupon-action-in-our-custom-module-magento
My question is how do I start writing this out. I ...
1
vote
1
answer
60
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
2
answers
71
views
How to override checkout_index_index.xml
this is the file present in my app/design dir. i need to disply shipping address section on right side bar and move the product overview section from right side bar to the place of currenct shipping ...
0
votes
2
answers
50
views
How do I hide images and compare button in category view List mode?
Using Codazon Fastest theme, I have created ~/fastest/fastest_child/Magento_Catalog/web/css/source/_extend.less which contains the following CSS extensions:
.catalog-category-view.product-item-photo {
...
0
votes
1
answer
63
views
Magento 2 - Change value in .less file of a third party module
I need to change a value in this file of a 3rd party module from my own theme:
vendor/amasty/xsearch/view/frontend/web/css/source/module/components/_search-input.less
Am I correct that I need to make ...
0
votes
1
answer
624
views
Magento 2: How to override the core interface and add a new constant?
I need to extend the core interface Magento\NegotiableQuote\Api\Data\NegotiableQuoteInterface and need to add a new constant but when I override the interface via preference its not working. When I ...
0
votes
1
answer
76
views
Extend Core Js File in magento2
I want to extend vendor/magento/Magento_Customer/view/frontend/web/js/address/js to my custom module.Please help
0
votes
1
answer
510
views
Override \Magento\CatalogSearch\Model\Advanced in Magento 2.4
Update
I think this is where it is going wrong:
ItemCollectionProviderInterface $collectionProvider = null,
ProductCollectionPrepareStrategyProvider $productCollectionPrepareStrategyProvider = ...
0
votes
1
answer
217
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 ...
0
votes
1
answer
194
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/...
0
votes
1
answer
192
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
0
answers
179
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\...
0
votes
1
answer
34
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
1
answer
204
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 ...