Questions tagged [abstract-class]

General questions on the Magento Abstract Class.

Filter by
Sorted by
Tagged with
2
votes
1answer
70 views

Override abstract class

I have to override Sender.php which path is Magento\Sales\Model\Order\Email I try but its not work my code is : di.xml <type name="Magento\Sales\Model\Order\Email\Sender"> <plugin ...
1
vote
1answer
36 views

Difference between core_abstract_delete_after and core_abstract_delete_commit_after events in magento 2

Can anyone please explain to me what is the use of core_abstract_delete_after and core_abstract_delete_commit_after events in magento 2. For your information, it is declared in (Magento\Framework\...
0
votes
0answers
30 views

Magento 2 : How to override a Abstract Class? [duplicate]

I made some modification related to magento2 order pdf. I want to know how to override a abstract class AbstractPdf extends \Magento\Framework\DataObject
0
votes
0answers
73 views

Magento 1.9.x - How can rewrite Mage_Core_Model_Session_Abstract_Varien class

I am trying to re-write Mage_Core_Model_Session_Abstract_Varien class in my custom module but getting error : Recoverable Error: Argument 1 passed to Mage_Core_Block_Messages::addMessages() must be ...
0
votes
2answers
33 views

How to create Single abstract controller to inherit in other controllers

I would like to create a single abstract controller in which i will define my authorization code to check for user validity and want to inherit that controller in my other controllers, so that i don't ...
3
votes
2answers
514 views

Magento2 : Remove shipping charge and credit cart type and number from order invoice

I want to remove shipping charge and credit card type and credit card number from order invoice. please check image: I have overridden this core file vendor/magento/module-sales/Model/Order/...
0
votes
0answers
419 views

Fatal error: FileIterator contains 1 abstract method must therefore be declared abstract or implement the remaining methods

I need to add a custom shipping method. I was fallowging this tutorial: https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/ I am receiving this error: Fatal error: Class Magento\...
1
vote
1answer
663 views

Fatal error: Class 'Mageplaza\Core\Helper\AbstractData' not found [closed]

Fatal error: Class 'Mageplaza\Core\Helper\AbstractData' not found in /home/dukaania/public_html/testing2/app/code/Mageplaza/SocialLogin/Helper/Data.php on line 32 Facing this issue after run ...
0
votes
0answers
103 views

How to override abstactclass methods in magento2?

I want to override \Magento\ImportExport\Model\Import\Entity\AbstractEntity's method _saveValidatedBunches. I have tried using preference but it's not working. Can anyone help me
1
vote
3answers
597 views

I want to override AbstractTemplate.php of vendor\magento\module-email\Model\

I want to override AbstractTemplate.php of vendor\magento\module-email\Model\ in magento 2.1.12.I want to change getUrl method which are declare in AbstractTemplate.php.How can do it?
1
vote
1answer
393 views

Magento2 - Get Value of New Column in Tier Price Table

I have added a new column "admin_user" column in catalog_product_entity_tier_price table. This column value needs to come when following method is executed. $p=$productRepo->get('sample'); $tier=$...
2
votes
1answer
402 views

Abstract Class - override or rewrite?

I have a custom module for checkout. I want to add some custom code for function _getStepCodes() in app/code/core/Mage/Checkout/Block/Onepage/Abstract.php I found that abstract functions cannot be ...
1
vote
0answers
20 views

Magento:Custom code in abstract class [duplicate]

My requirement is to change the order of checkout steps. I have a custom module (Customization with checkout structure) for checkout. I want to change the function _getStepCodes() in app/code/core/...
5
votes
2answers
292 views

How to override class which extends Abstract Class

I want to override a class Magento\Catalog\Model\Product\Type\Simple di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
36
votes
2answers
10k views

Magento 2 - Object manager tries to instantiate Abstract class. ( Fatal error )

Playing around with Magento 2 but run into a problem I can not wrap my head around. The object manager tries to instantiate Abstract class, this gives an Fatal Error. Does someone know what might ...