Multiple payment service position

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!
sixbynine
Posts: 93
Joined: 10 Jan 2018, 11:22

Multiple payment service position

Post by sixbynine » 26 Aug 2018, 07:58

Hello,

I'm using 2 payments services at the same time with aimeos and it works very well except for one point :

- When I add two services to my basket, at the end of the checking process, when I finally click on the "process" button, it is not the service with position 1 that is processed but the service with position 2. I'm not sure how Aimeos decides which service has to be linked in first place to this process button (on the summary view).

I would like it to use by default the service that has the lowest position (position : 1).
How can I change that?

Thank you very much !

sbn

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

Re: Multiple payment service position

Post by aimeos » 26 Aug 2018, 17:26

By default the first (payment) service in the array is used, whichever this is:
https://github.com/aimeos/ai-client-htm ... d.php#L344

Don't know if it makes sense to push the services in the right order into the basket because they can be removed and added again by the basket plugins. The best way might be to add a "position" property to the order base service item and to enforce the order in the getService()/getServices() method of the basket.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

sixbynine
Posts: 93
Joined: 10 Jan 2018, 11:22

Re: Multiple payment service position

Post by sixbynine » 27 Aug 2018, 09:29

Thank you very much :)

Post Reply