Here is a small tutorial for beginners on how to use hooks in Prestashop 1.7. In comparison with Prestashop 1.6 version, I can say that 1.7 is a sweet candy. Theme development process is much easier and faster.
If you want to discover Prestashop 1.7 and you are a total beginner, this part of the blog is dedicated to you. You can follow our articles even if you don’t have any special knowledge of Prestashop. You can ask someone to install Prestashop or check this article to find out how you can install it in one click. And having a Prestashop installed, just check our articles and follow the lead.
When you consider applying a promotion for your e-commerce project, the first thing you would consider is to offer your customers a discount.
If you want to make a discount for your clients, you can choose between
- Cart Rules
- Catalog Price Rules
Cart Price Rules is a discount that is applied only in cart and is only allowed for customers that have discount coupons or exceed a certain number of items in one purchase or exceed a certain sum in one purchase.
Catalog Price Rules is a discount that is visible for everybody. You can see it in catalog and it looks like: $100 (crossed) $50.
If you want to enable it this kind of discount, you need to enter your Prestashop admin panel.
Then you can see “Price Rules” in the column on the left. Click to expand this section. And then click on Catalog Price Rules.
You will see the following window:
Now let’s take the following case:
You want to offer a 20% discount on women clothes.
You want to offer such a promotion and don’t know how you can do it. Let’s do it step by step.
Name: enter the name of your promotion. Only you will see it, don’t worry. Enter something like “20% OFF WOMEN CLOTHES”.
Now define the following:
Currency: if you want to offer the discount only for customers that pay in dollars, then select “Dollars”. Or, if you don’t want to limit the promotion by currency, then select “All Currencies” here.
Country: Select for which countries you want to apply the discount. If you select “All Countries”, then your discount will not be exclusive for certain coutnries only.
Group: You can define which customer groups are allowed to see and use the discount. Visitor, Guest, Customer. If you want to offer this discount only for those users that previously bought something from your store, then select “Customer” here. If you want to allow everybody to use the discount, then select “All Groups” here.
From Quantity: If you select “1” here, then this discount will be applicable if a customer buys at least 1 item. Then respectively if you select 2, a customer won’t get a discount if he purchases only 1 item.
From / To: You can select the period when your discount will be applied.
Define the Reduction type. You have 2 options here:
Reduction: then if you select Amount: enter the sum of discount. For example, $10 on every women’s clothe.
If you selected percentage as a Reduction type, then enter the percent of discount that you offer on each product. In our case, this is 20%.
Now let’s set up conditions. Let’s check the case again: 20% OFF WOMEN CLOTHES. We defined the percentage in previous settings. Now we need to define conditions. And here is only one condition: the discount is applicable only on women clothes.
At the bottom of this page you see templates of conditions: you can limit the discount and ofer it to a certain Category, Manufacturer, Supplier, Attributes or Features.
In Categories, select “Women” and press “Add Condition”.
This condition will be added to Condition group 1.
Now press “Save” and check if the discount was correctly applied.
In order to check active discounts, navigate to Price Rules => Catalog Price Rules. Here you can see the list of discounts that are currently applied on your store.
And here is how it will look on frontend: