Questions tagged [around-plugin]

Denotes questions about Magento 2 AroundPlugins. For general questions use "plugin" tag.

12 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
20 views

Product compare plugin not working

Here is the plugin i created for limiting 3 products can be added into comparison. But it not loading, add one know what is the problem? etc/frontend/di.xml <?xml version="1.0"?> <...
1
vote
0answers
523 views

Magento 2.1.11 - Interceptor throwing ltrim expects 1 parameter to be string, object given warning exception

I want to make a plugin to do something around a custom made checkout method. I do have other interceptors working prior to adding this, but this one I am getting a ltrim warning. CRITICAL: ...
0
votes
1answer
82 views

Overriding Magento 2.3 Checkout Cart Control Using Plugin using around but not working

What I am trying to achieve is when a product is added to the cart, the customer will have the option to add a special gift box. As every product has a different gift box and price so to do this what ...
0
votes
2answers
44 views

how to create aroundplugin for abstractentity?

I have created around plugin for isAttributeValid function for Magento\ImportExport\Model\Import\Entity\AbstractEntity but it is not working. code: <type name="Magento\ImportExport\Model\Import\...
0
votes
0answers
20 views

My plugin is not working

I need to change the result of getMultilineFieldConfig from Magento\Checkout\Block\Checkout\AttributeMerger. I have a MyVendorName/Checkout module. On etc folder I have di.xml file with: <config ...
0
votes
0answers
53 views

aroundSavePaymentInformationAndPlaceOrder plugin not working in magento 2

etc/di.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config....
0
votes
0answers
90 views

Magento 2 System Config Plugin

I have created a custom tab in system config and added 1 field Module Enable Yes/No and 1 Dynamic fields which is depends on Module Enable. When Module Enable is set Yes I created various dynamic ...
0
votes
0answers
28 views

Magento 2 system config Concatenate data to existing field with plugin beforeSave or aroundSave

I have a drop down field containing fruits where I would like to concatenate some data e.G: Using a Plugin save the data like so: Bananas are high in potassium Where are high in potassium is the ...
0
votes
1answer
90 views

Magento 2.2.2 : Redirect not working from plugin

di.xml <type name="Magento\Framework\AppInterface"> <plugin sortOrder="1" name="noroute_redirect" type="Namespace\ModuleName\Plugin\AppInterfacePlugin"/> </type> ...
0
votes
1answer
354 views

Magento : Around Plugin for LoginPost

I would like to write a plugin for Magento\Customer\Controller\Account\LoginPost. Actually I've custom template that is called when customer clicked on Proceed to Checkout. (Only when customer is not ...
0
votes
1answer
61 views

Page cache issue, my plugin only works after the first page load

I have created a module that autoselects a currency based on the user's country using a plugin for Magento\Store\Model\Store::getDefaultCurrencyCode() . On the first page load it will show the ...
0
votes
0answers
193 views

Magento2: Stop user registration email notification to customer programmatically

I want stop email notification for user registration(createuser) programmatically. We can use plugin, observer, extend createpost controller. Can anyone please suggest which way is standard to do ...