Get Website id from website code Magento 2.

Magento 2, You can retrieve Website id from the website code. Sometimes you need website id from the code, You have website code already exists but need website id, You can get it simply with Magento.

Use Interface:
Magento\Store\Api\WebsiteRepositoryInterface Continue reading “Get Website id from website code Magento 2.”

How to retrieve Coupon details by Coupon code Magento 2?

Coupon code used to get a discount from the order. Different types of coupons available for the eCommerce store like, only specific Item has a discount, a discount for the whole cart and so.

If you want to get coupon data by coupon code, You can retrieve the data of coupon by its code. Continue reading “How to retrieve Coupon details by Coupon code Magento 2?”

How to Get Applied rule ids of the item from the Order Magento 2?

You can get applied rule ids of the product item from the Sales Order by order item id.

A customer has applied the shopping cart rule for the order and if any item contains that specific rules, after place order, the sales item persists the shopping cart rule id in the sales_order_item database table for the item level. Continue reading “How to Get Applied rule ids of the item from the Order Magento 2?”