Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is an option "Number of uses per coupon" at coupon generation form.
If I select "Unlimited" it always generated coupons with the limit for 1 usage.
How to reproduce:
- Open the generation form
- Select the unlimited option
- Click the generate button
- Check the results
There is the hack right now, how to generate unlimited coupons:
- Open the generation form
- Enter the "0" into textfield for limit number
- Select the unlimited option
- Click the generate button
- Check the results ;)
Comment | File | Size | Author |
---|---|---|---|
#4 | commerce-2981460-unlimited_generation-3.patch | 2.16 KB | czigor |
| |||
#4 | commerce-2981460-unlimited_generation-3_ONLY_TEST.patch | 1.49 KB | czigor |
#2 | unlimited_generation-2981460-2.patch | 676 bytes | kala4ek |
|
Comments
Comment #2
kala4ekHere is a simple patch, that fixes that.
Comment #3
mglamanWe definitely need tests, then
Comment #4
czigor CreditAttribution: czigor at Centarro commentedComment #6
bojanz CreditAttribution: bojanz at Centarro commentedPreviously the test confirmed that it was possible to limit usage.
Now the test confirms only that it is possible to not limit usage.
We need both.
Comment #8
bojanz CreditAttribution: bojanz at Centarro commentedRewrote the test and committed. Thanks, everyone.