Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#5385 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
#5388 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.