Get All Coupons

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

Get All Coupons

Post by traiyani75 » 15 Jul 2020, 08:05

Hello,

Is there any rest API call for getting all coupons whichever added on admin side ?

User avatar
aimeos
Administrator
Posts: 7871
Joined: 01 Jan 1970, 00:00

Re: Get All Coupons

Post by aimeos » 15 Jul 2020, 12:32

No, not for the frontend because then everyone could fetch the list and use the codes for their next order.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

Re: Get All Coupons

Post by traiyani75 » 16 Jul 2020, 05:32

Ok thanks. Now Can we set maximum amount of the discount for the PercentRebate coupon type.
Like 5% rebate with maximum discount as 10$.
So, discount will not be raised more than 10$. How do I achieve this ?

Thanks

User avatar
aimeos
Administrator
Posts: 7871
Joined: 01 Jan 1970, 00:00

Re: Get All Coupons

Post by aimeos » 16 Jul 2020, 21:39

You have to create your own coupon provider and implement the limit. You can use the PercentRebate provider as base.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

Re: Get All Coupons

Post by traiyani75 » 20 Jul 2020, 13:06

Hello
We have coupon functionality using REST Api. Now, we have attached one voucher product along with coupon.
When we add coupon into basket and try to place order, that time we received product out of stock error.

How do we handle it ? Do we need to set stock for voucher product too? I thought that is for article product only. How do I setup this flow?

I have tried with defining stock count too, but that time stock is decreased by one when we apply coupon into basket. Do we need to setup like that?

User avatar
aimeos
Administrator
Posts: 7871
Joined: 01 Jan 1970, 00:00

Re: Get All Coupons

Post by aimeos » 21 Jul 2020, 08:51

You can use a stock level of X if the coupon should be only used X times or you can leave the stocklevel field empty for unlimited usage.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply