Coupon available for all products

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
t_csaba
Posts: 25
Joined: 12 Oct 2017, 13:28

Coupon available for all products

Post by t_csaba » 12 Jan 2018, 09:00

Hello again,
I am having trouble implementing a global discount coupon. I have read some similar posts, but the solution wasn't clear. I have tried creating a custom coupon provider, but as i can see it, all the existing coupon providers work in a way, that they add an existing product with a modified price to the basket.

If i have a basket with multiple product types and multiple quantities, how should i add a discount? I have tried to create a new product "$this->createProduct(...)" , but it seems that i need the code of an existing product; I get this message: "No product with code "" found".
Could you give some detailed description? I know it's not a hard thing to do, but I'm stuck.
Thank you.


typo3 8.7.7
php 7.0.16
Linux 2.6

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

Re: Coupon available for all products

Post by aimeos » 12 Jan 2018, 10:38

You have to create a coupon product like a regular product in the admin interface but don't assign it to any category. Thus, customers won't be able to add it to the basket. Then, use this product code to create a new discount and add it to the basket. You can use the code from the existing coupon providers for this.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

t_csaba
Posts: 25
Joined: 12 Oct 2017, 13:28

Re: Coupon available for all products

Post by t_csaba » 12 Jan 2018, 11:00

Easy solution, thank you.

Post Reply