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!
joemons
Posts: 4
Joined: 27 Apr 2019, 09:34

MULTIPLE PAYMENT SERVICE POSITION!!

Post by joemons » 28 Apr 2019, 13:48

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

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

Re: MULTIPLE PAYMENT SERVICE POSITION!!

Post by aimeos » 29 Apr 2019, 09:19

The problem might be at one of these locations:
- https://github.com/aimeos/ai-client-htm ... d.php#L246
- https://github.com/aimeos/ai-client-htm ... d.php#L340

The first is when adding the payment services to the basket where the IDs might be given in wrong order. The second is when using the payment service, the associative array might be

Code: Select all

array( 1 => [second service], 0 => [first service] )
In the second case, adding a ksort() before can fix the issue.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply