PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

Make Voucher NOT cumulative with itself

8 replies to this topic
#1
sm3004

    PrestaShop Apprentice

  • Members
  • PipPip
  • 107 posts
Hi,

I have a problem with a voucher and cannot find any solution in the forums.


How do I make a voucher that is cumulative with other vouchers but not with itself?

Currently I have a voucher that gives 10% off to everyone, but if I enter cumulative with other vouchers, then I can enter the voucher code over and over again and it keeps taking an additional 10% off.

Please help.

#2
abaveeMike

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts
You could set "Quantity per each user" to 1
Abavee | Sex Toys Online: Warning Adult Content

#3
sm3004

    PrestaShop Apprentice

  • Members
  • PipPip
  • 107 posts
This will only allow the user to use the code once and never again, or is that a wrong assumption???

I need them to be able to use it once per order but they can order 30 times and for every one of those orders, they can use the discount.

#4
abaveeMike

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts
You are correct in that it would only allow the customer to use the voucher once. As far as I can tell there is no way to do what you are needing out of the box
Abavee | Sex Toys Online: Warning Adult Content

#5
sm3004

    PrestaShop Apprentice

  • Members
  • PipPip
  • 107 posts
That's very weird, no one ever thought of this?

#6
sm3004

    PrestaShop Apprentice

  • Members
  • PipPip
  • 107 posts
I hear crickets

#7
Peha

    PrestaShop Addict

  • Freelance agréé
  • 615 posts
i have the same problem.
have you made a feature request ?
Graphiste Web-designer. Freelance agréé par Prestashop
Posted Image

#8
Peha

    PrestaShop Addict

  • Freelance agréé
  • 615 posts
in classes/Cart.php

l:816

            
foreach ($discounts as $discount)
if (!$discount['cumulable']){
return Tools::displayError('previous voucher added isn\'t cumulative with other discounts');
} else {
if($discountObj->name == $discount['name']){
return Tools::displayError('you cannot use this voucher anymore (usage limit attained)');
}
}


it compare voucher's name with vouchers already registred and if it's the same it return an error.
Graphiste Web-designer. Freelance agréé par Prestashop
Posted Image

#9
moony1234

    PrestaShop Apprentice

  • Members
  • PipPip
  • 36 posts
hi the above code no longer works can anyone help?