Adapt payment options dependent on products
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!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Adapt payment options dependent on products
Hi,
in my project the payment options (PayPal, invoice, Cash on delivery, Prepayment, ...) should be different dependent on the products the costumer has chosen to buy. More precisely, a customer can buy special codes (in addition to normal products) and for these codes only Prepayment should be possible as payment option, for example.
In aimeos I have only found so far the possibilty to specify the payment options globally for all products and there is no differentiation between the products.
Now my question: What is the best way to achieve this feature in aimeos? Where in the code do I have to work on?
Many thanks in advance!
TYPO3 7.6.13, Aimeos web shop 16.10.1, PHP version 5.6.24-0+deb8u1, Linux
in my project the payment options (PayPal, invoice, Cash on delivery, Prepayment, ...) should be different dependent on the products the costumer has chosen to buy. More precisely, a customer can buy special codes (in addition to normal products) and for these codes only Prepayment should be possible as payment option, for example.
In aimeos I have only found so far the possibilty to specify the payment options globally for all products and there is no differentiation between the products.
Now my question: What is the best way to achieve this feature in aimeos? Where in the code do I have to work on?
Many thanks in advance!
TYPO3 7.6.13, Aimeos web shop 16.10.1, PHP version 5.6.24-0+deb8u1, Linux
Re: Adapt payment options dependent on products
You can write your own service decorator that checks the products in the basket. Configure it for all payment options besides prepayment and then, it must return false in the isAvailable() method if one of those products is found.
Documentation about service decorators is available here:
https://aimeos.org/docs/Developers/Libr ... _decorator
Documentation about service decorators is available here:
https://aimeos.org/docs/Developers/Libr ... _decorator
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