How to Check Product type is bundle by sku in magento 2?

You can check the Product type based on the SKU. If you have only product SKU and want to know about product type Bundle, you can know it easily.

First Load the Product repository by Product SKU, Call the getTypeId() method from the object and match it with Type class predefined product type constant. Continue reading “How to Check Product type is bundle by sku in magento 2?”

How to Retrieve Store code by cookie Magento 2?

You can get the current store code from the browser cookie using Magento.

Sometimes you required to detect store code before any request generated in a store and that time you will help this article. You can check the current store code in beforeDispatch() method of the request and verify for the current store code. Continue reading “How to Retrieve Store code by cookie Magento 2?”

Create a Plugin for Save Payment Information Checkout Magento 2.

You can create a Plugin for the method SavePaymentInformation() in Magento 2 to add your logic before or after Payment information is saved.

The method will be called after a click on the Place order button from the second step of the Checkout page.

Original Class to create plugin:
Magento\Checkout\Model\PaymentInformationManagement Continue reading “Create a Plugin for Save Payment Information Checkout Magento 2.”