Coupon Customize Decorator
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 8
- Joined: 25 Aug 2021, 02:56
Coupon Customize Decorator
Hi,
Good day!,
Is there any way I can create a customize decorator?
example:
basket has total value of 500 USD with a voucher discount of 10% the discount will be 50 USD.
but I want a decorator that will limit the given rebate to 30 USD maximum only
can u give me an idea?
or better if you have a documentation and sample on how to add new voucher decorator?
thanks .
Good day!,
Is there any way I can create a customize decorator?
- I need a voucher for specific customer only
- I need a decorator for basket minimum total value to use the voucher
- I also need a decorator that has maximum discount value
example:
basket has total value of 500 USD with a voucher discount of 10% the discount will be 50 USD.
but I want a decorator that will limit the given rebate to 30 USD maximum only
can u give me an idea?
or better if you have a documentation and sample on how to add new voucher decorator?
thanks .
Re: Coupon Customize Decorator
Unfortunately, there's no documentation for that part yet but you can use the existing decorators as examples. The one that fits best is the Category decorator because you have to implement the "calcPrice()" method and limit the returned price by the value from your configuration:
https://github.com/aimeos/aimeos-core/b ... tegory.php
If you create a pull request in the aimeos/aimeos-core repository, we are happy to merge your code!
https://github.com/aimeos/aimeos-core/b ... tegory.php
If you create a pull request in the aimeos/aimeos-core repository, we are happy to merge your code!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 8
- Joined: 25 Aug 2021, 02:56
Re: Coupon Customize Decorator
seems like i need to add in aimeos core,
Is there a way to add it on aimeos extension?
Is there a way to add it on aimeos extension?
Re: Coupon Customize Decorator
Yes, you can put it in ./lib/custom/src/MShop/Coupon/Provider/Decorator/ of your own extension.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star