Questions tagged [inheritance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
12 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 ...
0
votes
0answers
6 views

Reference different CollectionFactory in parent module based on which child module calls it

TL;DR How can I make a Module's classes (e.g. Blocks, Helpers) reference different CollectionFactories based on which child Module calls it. Without hardcoding these into the parent. (parent module ...
1
vote
1answer
96 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
0answers
34 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
1answer
498 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
2answers
199 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
1answer
139 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
2answers
81 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
1answer
69 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
2answers
379 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?
0
votes
1answer
8k 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
2answers
112 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
1answer
242 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: ...
2
votes
1answer
2k 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
1answer
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
2answers
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
1answer
36 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
1answer
464 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
1answer
224 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
1answer
2k 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
1answer
127 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 ...
1
vote
1answer
559 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
1answer
804 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
1answer
121 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 ...
2
votes
2answers
2k 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' ...