How to check product type is downloadable programmatically in Magento 2?

Verify Downloadable product type by product object in Magento 2 using SKU or by id.

You can retrieve product objects by the Product Repository interface in the Model Class and use the getTypeId() method to check the type of product. Continue reading “How to check product type is downloadable programmatically in Magento 2?”

How to Delete downloadable sample by id for Download product Magento 2?

Delete downloadable sample by sample id for the product Magento 2.

Each Downloadable Item supports the sample data of the attachment type like video, music, ebook, software file.

You can programmatically delete it by the sample id using code snippet with the delete($id) method. Continue reading “How to Delete downloadable sample by id for Download product Magento 2?”

How to get list of samples for downloadable product Magento 2?

You can retrieve the list of samples for the downloadable products in Magento 2 Programmatically by item SKU.

Samples Contain the information for the product which is downloadable with Sample title, Uploaded file or file URL. You can attach multiple samples for the single product from the Magento backend, product section with Downloadable Information Tab. Continue reading “How to get list of samples for downloadable product Magento 2?”