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

How to verify File is Archive or not using Magento 2.

Check Given file is an archive or not using Magento 2 by Magento\Framework\Archive Class.

Archive class has a logic to verify the given file is an archive or not in Magento 2. Continue reading “How to verify File is Archive or not using Magento 2.”