Page 1 of 1

Coupon type as Voucher

Posted: 20 May 2022, 10:01
by traiyani75
Hello, we are using voucher as coupon type .
We created voucher product and define price for that. Later we have added that voucher product sku code into coupon's voucher.productcode. Screenshot attached.

Now, we need to use that coupon in api level, When we try that coupon while checkout, it is giving us error like "No bought voucher for code "#coupon" available". Will you pls help me to sort this out?

thanks

Re: Coupon type as Voucher

Posted: 21 May 2022, 20:46
by aimeos
The "Voucher" product type is only for selling gift cards which can be redeemed afterwards. It also checks for the ordered voucher and that is the reason why you get this error message.

If you do not want to sell gift cards, use the FixedRebate (or PercentRebate) coupon provider instead.

Re: Coupon type as Voucher

Posted: 24 May 2022, 05:49
by traiyani75
I want to create voucher of 500QR. And it will be with reduction technique.
Like user can use voucher for 100QR purchase, and rest 400QR will still available with voucher. which user can redeem on next purchase.

How do I prepare it? As per documentation, voucher type coupon is providing such functionality

Re: Coupon type as Voucher

Posted: 25 May 2022, 15:22
by aimeos
Like said, this is only possible for vouchers the customer has bought, not for a coupon code you just send to your customer.

To get what you want, you need to create a new coupon provider (you can copy and adapt the "Voucher" coupon provider) which doesn't check the for the ordered voucher:
https://github.com/aimeos/aimeos-core/b ... hp#L80-L85