How to Delete Catalog Price Rule by rule id Magento 2?

You can delete catalog rule by rule id in Magento 2 using delete by id method of catalog rule repository interface.

You can see a list of available Catalog Price rules from the admin panel by Marketing -> Promotions -> Catalog Price rule. Continue reading “How to Delete Catalog Price Rule by rule id Magento 2?”

How to Get Catalog Rule data by rule id Magento 2?

Get Catalog Rule information by Catalog rule id using Magento 2 with Catalog Rule Repository Interface.

You need to pass Rule id as an argument to get details of Catalog rule. Original Interface class is,
Magento\CatalogRule\Api\CatalogRuleRepositoryInterface Continue reading “How to Get Catalog Rule data by rule id Magento 2?”

How to check File is .tar using Magento 2?

Verify Filename has extension .tar or not using PHP Magento 2.

If the file is a valid tar file, the result will be true otherwise result will be false. Some time you need to verify the current file is tar or not in that scenario, this article is used for your development. Continue reading “How to check File is .tar using Magento 2?”