How to get Downloadable Product Links data from product object Magento 2?

Retrieve getDownloadableProductLinks() from the Product object in Magento 2 to fetch download product links information.

Core module module-downloadable contains the extension attributes type for the Magento\Catalog\Api\Data\ProductInterface. Attribute code downloadable_product_links used for the links details in the product object. Continue reading “How to get Downloadable Product Links data from product object Magento 2?”

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