In Magento 1.x there is a special function for getting access to directories – Mage::getBaseDir(). In Magento 2.x it has been removed, but a whole new class has been added to fulfill the same mission. Please welcome Magento\Framework\Filesystem\DirectoryList. (more…)
Catalog price rules are used to offer a discount to your customers under certain circumstances. Unlike Cart Price Rules, these rules are applied before the product is added to cart.
To Enable a Catalog Price Rule, navigate to Marketing => Catalog Price Rules
Click Add New Rule.
Enter the name of the Catalog Price rule: 50% OFF on all pants.
Enter a description (it’s only for yourself).
Status: should be “Active”.
Select on which stores you want to apply the Catalog Price Rule.
Select for which Customer groups you want to apply the rule.
Set the period when this discount will be active.
Set “Category is one of …”.
Click on the button to expand the list of categories.
Put ticks in checkboxes of categories for which you want to apply the discount.
You can apply the discount as a percentage or as a fixed sum of money. In our case we select “Apply as percentage of original”.
Enter the Discount amount. 50% OFF – enter 50 here.
Now press “Save” and let your customers enjoy the discount.