Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [around-plugin]

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

1
vote
1answer
24 views

Magento 2 validate the form input using plugin and save the modified data

I am using custom plugin to validate the user input for customer profile. I have created Module Company_Module and create di.xml file in etc to verify the input given by the user: <type name="...
0
votes
2answers
23 views

Magento 2 describe attrubute property used in Plugin method

I am trying to create a simple module and I can't find the propose of the attribute name and type inside the tag type and plugin in di.xml. can anyone describe attribute name used in plugin? <?...
0
votes
1answer
33 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
31 views

Magento 2 : Swatches not display when use plugin around

I used around plugin to call custom phtml in category list page. It's working proper. But, In configurable product it's hide to display swatches. I upload here my files code. Which function should I ...
0
votes
1answer
24 views

Redirect from around plugin in Magento 2

How to redirect from around plugin to another page with an error ?
0
votes
1answer
91 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
54 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
120 views

Display notification/error message in frontend from a helper override

I have created a custom module for restrct one cms page access in few conditions. If the page is restricted, then I want to redirect the page to home page and display one message. My code is ...
0
votes
3answers
135 views

Customer redirect issue with plugin method magento2

I have used below code to write plugin method for loginPost controller. this is the code of etc/di.xml <type name="Magento\Customer\Controller\Account\LoginPost"> <plugin name="...
0
votes
0answers
100 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 ...
0
votes
0answers
46 views

Purpose of closure and callable in plugins

I am new in Magento.I am trying to understand how plugin works.But I do not understand the purpose of callable and closure .In many resources it is written that those are used to proceed the argument ...
1
vote
0answers
172 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: ...