Page 1 of 1

how to get sort order Payment Modules

Posted: Wed Oct 26, 2022 1:12 pm
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...

Re: how to get sort order Payment Modules

Posted: Wed Oct 26, 2022 1:46 pm
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.

Re: how to get sort order Payment Modules

Posted: Wed Oct 26, 2022 3:00 pm
by loop
thank you ecartz! i was able to fix it....