How to limit payment service cash to delivery pickup

How to configure and adapt Aimeos based shops as developer
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!
hasmb
Posts: 12
Joined: 12 Jul 2016, 12:05

How to limit payment service cash to delivery pickup

Post by hasmb » 19 Feb 2018, 15:16

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

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

Re: How to limit payment service cash to delivery pickup

Post by aimeos » 19 Feb 2018, 22:37

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.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply