Questions tagged [inheritance]
The inheritance tag has no usage guidance.
27 questions
1
vote
1
answer
148
views
is it possible to extend the block class in model
Is it possible to extend block class in model? if so, how to do it. please provide me with example. I have inherited model a class from model and i want to inherits class in block using the class i ...
0
votes
0
answers
45
views
how to inherit account_new_no_password.html in magento 2
I have tried this:
var config = {
map: {
'*': {
'Magento_Payment/template/payment/cc-form.html':
'Namespace_Module/template/payment/cc-form.html'
}
}
};
1
vote
3
answers
2k
views
Magento 2 di.xml Parameter configuration inheritance explanation with example
I read about the Parameter configuration inheritance in Magento documentation but not able to understand the concept properly!
https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/di-xml-...
1
vote
0
answers
32
views
Custom Magento theme not extending from custom parent theme
So I'm working on creating a custom parent theme I can reuse for a bunch of different projects and then a child theme for custom styles for a client to extend from that theme.
I had the custom child ...
2
votes
1
answer
388
views
Inheriting CSS in child theme's child theme
I'm relatively new to this, so i hope someone can help me out.
In my store i have a child theme of blank. The changes in this child theme get properly displayed on the store front and everything not ...
2
votes
0
answers
69
views
How to add fields to new custom module page in magento 2
Here the registration fields
i need this fields to new custom module pages
how to do ??
can i inherit this all fields
need fields
1.phone no
2.company
3.street address
note:
this all fields ...
0
votes
1
answer
2k
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 ...
1
vote
2
answers
456
views
Inherit Widgets from Theme Parent
[[ TLDR: I'm looking for info about (or a module) that would allow me to have child themes inherit widgets from their parents. For widgets that were created on the backend. ]]
This is for Magento 1....
1
vote
1
answer
175
views
Magento 2 Luma Theme inherence error 2.2.1 CE
I have a problem when I add a new theme in my new Magento 2.2.1 CE from scratch, and I try to inherent Luma theme. I sow to many examples but nothing work for me. If I put as parent blank work well ...
0
votes
2
answers
114
views
Theme Inheritance
I have installed Magento 2.1.7, and theme Luma.
I then created a custom theme to inherit from Luma.
I was wondering if the content (blocks and widgets) are also inherited from the parent theme. In my ...
0
votes
1
answer
84
views
Inheritance from 3rd party template
I'm trying to create my own template and inheritance from another that I bought on themestore. I think it's a good practice, just for change some things, doing this way the 3rd party template is ...
0
votes
2
answers
434
views
new block for Customer Account - preferable inheritance
I want to add custom block with custom logic to customer account. Is there any preferable inheritance in this case fro new block?
3
votes
1
answer
14k
views
Call a parent's parent method without calling the parent's method. parent::parent::method()? [duplicate]
I have an extension that has a block class that extends
Mage_Catalog_Block_Product_List_Toolbar
The extension has its own getPagerHtml(), which calls parent::getPagerHtml() at the end.
I need ...
1
vote
2
answers
214
views
How do I not repeat code while not being able to extend multiple blocks?
I've created a new custom module to store manufacturers, which links to products via a custom attribute on products.
There are 2 places I want to use the manufacturer details. One is on the product ...
0
votes
1
answer
305
views
Extending class not working unless you copy all methods
In my module I want to overwrite the method
public function collect(Mage_Sales_Model_Quote_Address $address) in
Mage_Sales_Model_Quote_Address_Total_Abstract.
If I copy only that method in my class:
...
1
vote
1
answer
3k
views
Parent class method _construct() is overriden by class that extends it and has same method
I'm having some troubles with passing properties between related classes.
Let's say we have a parent class:
class Company_Interface_Model_Import_Product extends Mage_Core_Model_Abstract {
...
1
vote
1
answer
2k
views
Magento2 - Using Luma - Can't add CSS or JS
new Magento2 installation, went through a whole series of learning where I could not figure out why my default head blocks xml wasn't working to load my custom css/js files... as per the new theme in ...
0
votes
2
answers
2k
views
How is getContinueShoppingUrl() called by Mage::getSingleton('checkout/session')?
I'm using Magento 1.9 and am trying to gain a better understanding of the method, getContinueShoppingUrl(), when called by Mage::getSingleton('checkout/session') but can't seem to find the file that ...
1
vote
1
answer
38
views
How do I make this query use my model class which extends Magento's core model class?
class Ebuynow_Mdlogistics_Model_Order extends Mage_Sales_Model_Order
{
public function getNewUnshippedOrders()
{
$orders = Mage::getModel('ebuynow_mdlogistics/order')->getCollection(...
2
votes
1
answer
521
views
Custom Report extending another Report
I used the following project and created a custom report: https://github.com/technodelight/magento_custom_reports_example
I changed stuff in the report. mainly there is another table joined to the ...
2
votes
1
answer
240
views
Class inheritance question in magento (google analytics)
In a custom module I'm inserting universal analytics so I have to change a few functions from Ga.php file
In Ga.php there is:
class Mage_GoogleAnalytics_Block_Ga extends Mage_Core_Block_Template
{
//...
1
vote
1
answer
3k
views
Class rewrite extends block but without access to it's private functions
I've had to re-write a block of a third party module, I only want to re-write one function in the class but my re-write won't work unless I copy across the private functions from the class I extended.
...
0
votes
1
answer
159
views
How can I extend the AccountController using events rather than inheritance?
I've successfully extended the core Mage_Customer_AccountController via inheritance (using an approach very close to this one), however I'd rather use events to add my extra functionality.
In my case ...
2
votes
1
answer
680
views
Inheritance of attributes sets
I created a simple hierarchy of attribute sets, basing each one on its parent attribute set, adding attributes in each level.
Now I discovered that one ancestor attribute set needed another attribute....
0
votes
1
answer
844
views
Quick create simple product doesn't inherit custom attributes
I set up a list of custom attributes in a configurable product, and I found that the quick create form is really handy to set up the simple associated products.
Problem: the simple products are not ...
0
votes
1
answer
124
views
What type of Inheritance is better for customizing code?
I am trying to customize the catalog and sales/order grids in magento.
There are 3 ways I know, by which I can implement by custom logic on these grids:
Multilevel inheritance
for example
...
3
votes
2
answers
3k
views
Calling Grandparent Class in magento class inheritance
UPDATE:
This issue was finally tracked down as a class inheritance issue.
The original code in class becomes invalid, due to fact that the class inheritance has been updated, and the 'parent::parent' ...