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?”

How to disable Company field from Checkout page in Magento 2?

You can disable Company field from Checkout page using Magento 2. Company field came with Native Magento in the checkout page.

Sometimes the client doesn’t want to display extra field like company name, fax or any other unnecessary field from the checkout page.

In Magento 2 You can disable extra field like Company using XML file or by creating a plugin. Continue reading “How to disable Company field from Checkout page in Magento 2?”