Page 1 of 2

Coupon related to a product?

Posted: 12 Mar 2018, 11:42
by Stefan80
Hello,

I want to use the coupons-option , but where can I link a product to coupon-code?

And: every coupon-code should be only used once by a Account/email - which code I use?

Thank you

Re: Coupon related to a product?

Posted: 13 Mar 2018, 13:01
by aimeos
There are two decorators you can apply to a coupon provider in the admin panel ("+" symbol in detail view):

Require a specific product:
https://github.com/aimeos/aimeos-core/b ... quired.php

Allow coupon once per customer e-mail:
https://github.com/aimeos/aimeos-core/b ... r/Once.php

Re: Coupon related to a product?

Posted: 14 Mar 2018, 10:29
by Stefan80
Thanks,

but is there no interface-option in the Aimeos-backend to link a product to a coupon-key?

Re: Coupon related to a product?

Posted: 14 Mar 2018, 10:52
by aimeos
The "Required" decorator allows you to specify a product that must be in the basket of the customer so the coupon is valid: https://aimeos.org/docs/User_Manual/Adm ... s#Required

The other way round (configure in the product panel that this product belongs to a coupon) isn't possible.

Does this answer your question or is there a misunderstanding? What do you want to achieve?

Re: Coupon related to a product?

Posted: 14 Mar 2018, 10:58
by Stefan80
Yes, i can use required.productcode, but I have so much products to insert manually ... there is no code for alle products?

for example: required.productcode = all ?

Re: Coupon related to a product?

Posted: 14 Mar 2018, 11:19
by aimeos
It's not necessary to configure that at least one product is necessary. This is the default.
You can configure a minium basket value if you want: https://aimeos.org/docs/User_Manual/Adm ... sketValues

Re: Coupon related to a product?

Posted: 14 Mar 2018, 12:16
by Stefan80
When I use for example the demo Coupon ( "demo-rebate" ,see image 2) I get the error "No product with code "demo-rebate" found" (see image 1).

Re: Coupon related to a product?

Posted: 14 Mar 2018, 19:39
by aimeos
The FixedRebate and PercentRebate coupon providers need a product that will be added to the basket when the coupon is applied. This product will then show up in the basket and a negative price is added to that product in the basket by the providers.

You've deleted the demo rebate product (code: "demo-rebate") so you get the error from your screenshot. Add a new rebate product (normal article not associated to a category) and use its code in the coupon configuration. Then, it will work again.

Re: Coupon related to a product?

Posted: 15 Mar 2018, 09:38
by Stefan80
Now I understand.

Thank you !

Re: Coupon related to a product?

Posted: 20 Sep 2019, 07:45
by Stefan80
Hello,

is it possible to show the used coupon-code in the customer Email?