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...
how to get sort order Payment Modules
-
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
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.
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.