how to get sort order Payment Modules

Open to all! Ask other shopowners for help.
Post Reply
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

how to get sort order Payment Modules

Post by loop »

Hi All
i'm working on a Module on a ship2pay module and my problem is, that it don't use the sort_order i have specified in the payment methods

So my specific Question, how can i get the sort_orders from the payment methods so i can order the array i have according to the sort_order (a array with the sort oder would be enough, so i can sort the ship2pay array according to that)

thanks for the tip...


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: how to get sort order Payment Modules

Post by ecartz »

The sorting code is at https://github.com/CE-PhoenixCart/Phoen ... L108..L133

Replace $generator() with something like explode(';', MODULES_PAYMENT_INSTALLED). You can probably remove the parts that deal with $new_modules as well (lines 123-9) and $vars.

Note that MODULES_PAYMENT_INSTALLED should already be in the correct order. So just using that rather than whatever you are doing now should work.

It would probably be easier to fix what you are doing now than to explain how to do what you want to do.
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Re: how to get sort order Payment Modules

Post by loop »

thank you ecartz! i was able to fix it....


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply