Teapot Logo


Prestashop 1.6 – How to add voucher codes and discounts to your store. 

Hello again PrestaShop fans. In this video I'm going to take you through the technique for applying cart rules and discount vouchers to your PrestaShop store. This video comes hot on the heels of the previous one we published yesterday about adding API signature details to PayPal modules.

We've had the video transcribed so that you can easily follow the video. Just scroll down below the video and click on the instruction text.

Don't forget to share the video if you find it useful and if you have any comments or questions then just log into the video on YouTube and leave the comments in the box.


Video transcript.

Hi, and welcome to ‘How to PrestaShop’ and today, we’re going to look at how to apply cart rules and discounts vouchers to products and carts within PrestaShop.

I’ve created five common cart rules which you can use within Prestashop and I’ll go through each of these individually and just show you how you need to configure them within the back office. All cart rules will be contained within your price rules and cart rules section within Prestashop—so this section here (see screen). The five I’ve already created are showing in the list on this page (see screen), but if you want to actually add a cart rule, all you need to do click the button here at the top (see screen) and that will open that cart rule configuration page where you can add your discount codes. So I’ve already added some codes, so what we do is we just go in and edit those and I’ll just go through individual setting just so we can see how they work.

Time – 1m:01s.

So the first one is the standard 10% discount code; this one offers the customer 10% on all the products they’ve added to their cart when they get to the check out. The first box you’ll see is required and this is just a name, the name of your discount code. I’ve called this one standard 10% discount—and also a little description for each individual cart rule or code as well.

The next box is the actual code or the voucher code or discount code. Now Prestashop will enable you to generate this on the fly by clicking the button here (see screen) and it will generate a random number for the code or alternatively, you can add in your own code which relates to maybe the name of the particular voucher.

If you leave this empty, what will happen is the discount codes you’re creating would automatically be applied at checkout without the customer having to add any code. So if you were advertising a 10% on all products and you didn’t want the customer to have to enter a code when they got to the checkout, it would automatically take off the discount from their cart.

Time – 2m:19s.

It’s very, very handy to use if you’re doing maybe a flash sale or something like that and you don’t really want to advertise a code, you just want people to know that they’ll get the discount straightaway. You can highlight the code within the checkout, so if I was to go to the front office (see screen), you’ll see that the codes I’ve already created are highlighted here (see screen) below the voucher box and all the client need to do is click each individual code and add it to the box to add it to their checkout.

If you don’t highlight it, obviously, the code will not be shown here (see screen), but you may well have been advertising this code, printed advertising, or you’ve offered it to a customer in an email shot. So they have the code already, but you don’t want everybody else to see that code. When they get to checkout, it’s only those people you’ve targeted with that particular marketing voucher.

Time – 3m:17s.

So we’re going to highlight this code so it does show in the checkout. Partial use is if you would like the customer to be able to spend part of their voucher. So if they have a £50 pound voucher, and they’ve only spent £30 of it in their first purchase, then they will get another voucher for the remaining £20 so they can spend that at a later date. So basically you can split the voucher up into chunks as the customer spends it or you can say no, there is no partial use on this voucher and if they don’t spend the full amount of the voucher, they still use that voucher. So if they spend £40 and they applied a £50 voucher, they don’t get the extra £10 back as an additional voucher.

You can set the priority in which the vouchers are applied at the checkout. So this one (see screen), if there was a priority one voucher, that would be applied first and then this one (see screen) would be applied afterwards. So as you set the priority, this determines how they’re applied in the checkout. The last box here is if you want the voucher to be enabled, yes or no.

Time – 4m:24s.

The next tab are the conditions which have to be met for this voucher to be validated at checkout. It’s quite a few different validation checks you can put on each voucher. You can limit the voucher to an individual customer so if you are indeed John Doe, then this voucher would apply to you and will validate. If you’re not John Doe, then you won't be able to use this voucher. You can put a valid to and from date on the voucher, so you can put this in the future so it will start and be available maybe next week, but only run for one week or you can run it for a day. In fact, you can actually run batches on Prestashop by the hour or by the minute so you can maybe have a flash sale just for a few hours during the day when this voucher would be available. You can specify a minimum amount to which the customer has to spend before this voucher validates and you can determine what currency that minimum amount or minimum spend has to be within. That minimum can be including or excluding tax and it can also be including or excluding shipping.

Time – 5m:40s.

You can then set the amount of vouchers available at the checkout. I’ll put a random number in here (see screen), so there is plenty of these available for the customers, but once they’re used, obviously, the voucher will become invalid. Also, you can set the available uses of that individual voucher, so this particular voucher, the customer can only use once. Once they’ve used it once, they can't go back in and repurchase more items and try and use their voucher again. It will be assigned so that customer have already used it so the voucher will not validate at the checkout for a second time. You can restrict the voucher by carrier selection. You can also restrict it by customer group so you can—this particular batch at the moment (see screen) all groups are validated against this voucher, but I just wanted it to be a trade specific voucher for any of the trade customer groups that it will only validate if this particular customer that was in the trade customer group.

And you can also make a batch compatible with other cart rules. As you can see, I’ve got quite a few batches running here at the moment (see screen) and some of these, I might not want to actually give the discount if they’ve already applied a previous discount to the checkout, so within this setting, I can actually say that it’s not valid with any other cart rule within the system, so only this voucher could be used on it’s own, it can't be used with any of these other vouchers. This particular example though, I am going to make it available with all vouchers.

Time – 7m:30s.

You can also validate the voucher by insisting the particular items are within the cart, so if we say the rule concerns a particular product—and we can search for a product so we can add a product to this particular condition and that means that this blouse has to be within the cart at checkout for the 10% discount to be applied to all of the cart. If this particular product isn’t in the customer’s basket, then this voucher won't validate. But on this occasion, it doesn’t matter what’s in the cart. It doesn’t matter what voucher they use. It doesn’t matter what customer group they come from, this voucher will validate. And the final tab (see screen) is the action and what is actually going to take place if the voucher is validated.

You can have simply free shipping. You can apply a percentage discount or an amount as a discount. You can apply the discount without shipping or you can apply it to a specific product to the cheapest product or to the selected product. And the selected products would be within this condition here (see screen) whether you’re saying okay, we need make sure that they’ve chosen these particular products before the voucher validates so if there were two products in here (see screen), then we go to the actions tab, you could save it.

Time – 9m:10s.

The 10% discount would only apply to those you set within the condition rule on the previous tab. But this is a general 10% discount, so we add 10% in here for value (see screen) and it’s applied to the order without shipping so it adds the shipping on top of the order after the discount has been renewed.

So if we go to the front office, we can see that I’ve got all my vouchers available here (see screen) and here we have the standard 10% discount so all the client would need to do is add that discount voucher to the box, click okay and there we go, the 10% is been applied to the checkout and then the shipping’s added on top of that.

Well, that’s the standard 10% and where it has been illustrated or it is visible to the customer at the checkout. I’ll quickly illustrate what would happen if we didn’t show it at the checkout, but also made it apply automatically. So if we came back to here (see screen) with our code, what we do is we strip that code out. There is no code, then we’ll save. What I’ll also do is remove the highlighted option here (see screen), so it doesn’t get shown at checkout.

Now, if we go back to our basket—so at the moment, nothing has been applied to this particular basket, but because we’ve automatically enabled the discount by removing the voucher, when you refresh the cart (pause). So, it’s not highlighted - there’s no partial use, there’s no code. Let’s check that we’ve got this available with all other vouchers, compatible with other voucher rules, all vouchers are available.

Time – 11m:31s.

Try a new cart, then go shopping and add this to our cart, proceed to the checkout and there we go; automatically the 10% has been added to the cart without us adding any voucher, without us using the voucher code box, 10% is automatically applied at the checkout because we have said within this voucher here (see screen), there is no code required to validate this particular voucher. It would automatically be applied.

So if we go back to our voucher’s like and we’ll look at another option—so the second option I set up is a similar 10% discount, but this time we’re offering a free gift with the purchase. So the settings is exactly the same as the 10% discount. This time, we are going to apply a code so we will need to add that to the voucher box and the conditions are all the same. In fact, there are no conditions applied at all to this voucher, but the only change this time as well as adding our 10% discount here (see screen), we’re going to select and send a free gift and that’s enabled by clicking the send a free gift button.

Then the system allows you to chose a product, so if we chose a product of another dress, printed summer dress—and it also allows you to chose a particular combination of color or size of dress which you’re going to offer as a free gift. So let’s chose the green one; you can save and stay (see screen) – (pause). We’ll need to remove this voucher here. In fact, I think this one needs to be compatible with all other rules.

Time – 13m:56s.

We’ll check this and that should validate as illustrated in the cart. So its showing here is 10% discount with a free gift, so if we add this cart, it should add another 10% discount but also offer a free gift. So, offers another 10% discount and that discount is on the total cart value which is £26. It’s added another £2.60, but this time, its added a free gift, so what we can do if you— if you were again wanting this to happen automatically, you can remove the code so it doesn’t require a code at the checkout.

We’ll go back to our previous cart rule and we remove the automatic application, that voucher by adding the code. Let’s generate a code here; let’s save that one. We go back into our checkout; remove the item within our basket and start shopping again. This time, we’ll choose a printed dress, proceed to checkout—and because we didn’t require a voucher for the free gift and 10% discount, again it’s automatically applied it. It’s applied our free gift and it’s applied the 10% discount to the cart total.

Time – 15m:55s.

Okay, let’s go to our third cart rule—and this time, we’ve created a discount voucher for multiple items or products. Go into the settings of this (see screen), our cart rule; all of these are the same. We’ve actually added a voucher so it needs to generated - it’s needs to be added at the checkout. Go to our conditions - compatibility rules; it’s compatible with all our other vouchers. What we’ve done this time is we’ve actually added two products to the products selection which need to be within the cart and I’ll delete those and start again so you can see how that happens.

So as you choose a button, you get your unselected items and this will be your full catalogue of the products here and I’ve just added two items; faded shorts and a Chiffon dress (see screen). So this rule does need to include those products, so I’ve added those two items here. Again, we’ve made it compatible with all other cart rules. And what we’ll do in the actions this time — we’re doing our usual 10% discount, but we set to selected products so by ticking this, that would then add the 10% discount just so those two items we’ve chosen.

Time – 17m:37s.

What I’ll do is I will remove the code so this happens automatically. Lets just delete the items within my basket and we’ll look for one of those items within this store (see screen). The printed Chiffon dress (pause). So if we add that to the cart and go to checkout because we’ve also enabled the 10% discount with a free gift automatically; that’s been applied. Also, our discount for multiple items and products has also been applied so by adding this product to the checkout, it has picked up the voucher which we’ve set as available for this individual product.

So you could in theory, within the conditions of the multiple product discount—here, you could have 10 or 20 items within your condition so as soon as though items are added to the cart, it will apply the 10% discount voucher without the customer having to worry. So if you’re advertising orange Chiffon dresses at 10% discount this week, whenever somebody adds that to the cart, then the discount will be applied.

Go back to our cart rules and we go through the final two we’ve set up today. And this is a discount for an individual customer so you may have a voucher running for an individual customer. They won a competition or it’s for you to give them as an offer individually but you don’t want any other customer to have this voucher or be enabled to use this voucher. You just want it to be applied to an individual client or customer.

Time – 20m:00s.

So the same set up here, but this time, importantly, we’re not going to highlight this within the cart. You don’t want anybody else to see this voucher apart from our chosen client or customer, and everything else is set the same. The difference here and the conditions—if you actually limited it to John Doe (see screen), there’s 9,999 available, but in theory, more than likely, we’ll just make this as available of one available and they can only use it once as well.

So it’s restricted to John Doe so only he can use this at the checkout. And also if you look at the—so we’re looking at John Doe 99 (see screen), we look at the checkout. This isn’t illustrated here at all. It’s not visual to any of other customer, so only John Doe would know about that particular voucher code. And you can set as many as these up as you like for individual customers.

If you didn’t want to apply them to an individual customer, but you wanted it to apply to a customer group—so you say okay, it’s not an individual customer, but I want this voucher to apply to all my trade customers, you could remove all other customer groups from this voucher. For anybody who was a trade customer or a VIP customer within your store, as soon as they log in, they will be able to use and validate this individual voucher so you could assign it to an individual customer or you could assign it to an individual customer group. And the final voucher I set up today is to offer a voucher or a discount on just one particular item.

Time – 21m:57s.

So again, the information is fairly standard. We are going to require a code for this particular voucher. It will be highlighted so you’ll be able to see this when you check out. The conditions are the printed Chiffon dress. What I’ve done with this one is I’ve set up—the printed Chiffon dress has to be within the checkout so the first thing to validate would be to make sure the printed Chiffon dress was in the checkout.

So without that in the checkout, this voucher will not validate. For the actions to apply our 10% discount on a particular item which is demo seven, which is the printed Chiffon dress. So what we could say is let’s not choose the same item we satisfied in the conditions. Let’s choose a shirt; so the faded short sleeved tshirt, the discount will apply to that particular product. So to validate this individual voucher, the customer needs to have a Chiffon dress within their basket. And if they’ve also chosen to buy the faded short sleeved tshirt, they will get the discount off of that particular tshirt. So if we go back to here (see screen), we have our Chiffon dress and search for the faded tshirt, we add that to our cart. Proceed to checkout. We can add our faded tshirt discount as well and it should validate because we have the printed Chiffon dress within our checkout.

Time – 24m:04s.

But if I was to delete the other item, if we go back and add the faded short sleeved tshirt to our checkout, add to cart (PAUSE)— okay, it’s offering a free gift as well to that particular item. I think we’ve set up another voucher for that. Let’s go back and look at our free gift—10% free gift.

Time – 24m:53s.

Technical error LONG PAUSE

Time – 26m:04s.


We add this to our cart again. If we see our free Chiffon dress, then we’ve got another voucher—so there we go. It’s just this one on it’s own.

Now, if we go back to our voucher for an individual product, which is this one here, I’ll try to use that voucher code. You should deny this voucher code because we haven't got the printed Chiffon dress in our cart, which it does.

Time – 26m:47s.

So what this enables you to do is to set a cart rule which enables you to decide exactly what is within your basket and what is actually discounted once you get to the checkout.

I hope these vouchers help you out. There’s many, many ways you can set vouchers and many ways you can offer discounts to customers within the store and I hope these five give you a good start on offering vouchers and discounts within Prestashop and I hope you join us for our next ‘How to Prestashop’. Please share. Comment in the box (see video) if you wish and we’ll see you on the next tutorial.

End of transcript.

Back to Insights