Get Post data or Params Data in after plugin magento 2.

You can get Post Data value in After plugin using Magento 2.

You can get all the Params() data in after plugin which is sent by request. If you send the query string Or data within the URL, you can get those data using getParams() in after plugin. Continue reading “Get Post data or Params Data in after plugin magento 2.”

How to set Payment additional data in Magento 2?

Magento 2 You can set additional data in payment using setAdditionalData( ) method defined under Quote Module Payment.php class.

Magento\Quote\Model\Quote\Payment class used for set payment related data from quote to order. This class is used for set payment method, additional data, and other payment-related data to Order.

Continue reading “How to set Payment additional data in Magento 2?”

How to apply custom condition before product collection loaded magento 2?

You can apply custom conditions to Product Collection before load by creating a plugin in Magento 2. Some situation in your project need to add some conditions before product collection loaded you can achieve it by below way,

In Magento\Catalog\Model\ResourceModel\Product\Collection file load() method is used for load the product collection globally.

Continue reading “How to apply custom condition before product collection loaded magento 2?”