How to get Special price collection by Product SKU in Magento 2?

Get Special Price data by Product SKU in Magento 2. Special price is the price, which offers discount/sale to the original price.

You need to use interface,
Magento\Catalog\Api\SpecialPriceInterface to retrieve special price collection with price_from, price_to, store_id and sku. Continue reading “How to get Special price collection by Product SKU in Magento 2?”

How to check Product has custom options in Magento 2?

You can check if a product has a custom option exists (hasOptions()) or not in Magento 2 by Product Object.

Some product type contains options like Bundle and Configurable while Simple, Virtual, Grouped, Downloadable and gift card doesn’t support options. Continue reading “How to check Product has custom options in Magento 2?”

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