Page 1 of 1

How to limit payment service cash to delivery pickup

Posted: 19 Feb 2018, 15:16
by hasmb
Hello,
how can I make my payment service cash only selectable when the delivery service is pickup (has certain id/key)?

The delivery service pickup is of type PostPay.

Or should the payment service cash somehow set a certain delivery service automatically?

Thanks,
Hartmut

Re: How to limit payment service cash to delivery pickup

Posted: 19 Feb 2018, 22:37
by aimeos
Create a new service provider decorator that implements the isAvailable() method and which returns true if the delivery option in the basket is equal to the configured one using the service code. You can find the documentation for service providers and decorators here:

https://aimeos.org/docs/Developers/Library/Service
https://aimeos.org/docs/Developers/Libr ... _decorator

Configure the PostPay payment option and add you new decorator. Then, it will be only available if the configured delivery option is part of the customers' basket.