Skip to main content

Questions tagged [extend]

The tag has no usage guidance.

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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....
0xh8h's user avatar
  • 485
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....
Ajith's user avatar
  • 66
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 ...
Krishnakumar C's user avatar
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 ...
odd_duck's user avatar
  • 1,396
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 ...
Giulio Savoca's user avatar
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 ...
Scott's user avatar
  • 273
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 ...
Pol Ravalitera's user avatar
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 (...
Xaiamedia's user avatar
  • 351
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 ...
Nausif's user avatar
  • 1,554
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?
fefe's user avatar
  • 947
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 ...
FraMakke's user avatar
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 ...
Austin Peterson's user avatar
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 ...
Boss Nass's user avatar
  • 264
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 ...
Harris's user avatar
  • 1
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 { ...
IHateMagento's user avatar
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 ...
Black's user avatar
  • 3,431
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 ...
MagentoDev's user avatar
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
surbhi agr's user avatar
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 = ...
Gijsve's user avatar
  • 99
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 ...
KaMZaTa's user avatar
  • 235
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/...
pinicio's user avatar
  • 766
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'; ...
kig's user avatar
  • 169
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\...
fudu's user avatar
  • 1,298
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?
Luigi T.'s user avatar
  • 332
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 ...
Giles Campbell's user avatar