Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Payment Module List Order


Guest

Recommended Posts

Posted

Well, after installing a new paymetn module for osCommerce, my boss wanted it at the top of the list when the client was checking-out... well, i tried naming the file with an a or 1, i tried playing with modified dates, and even looked in the DB, but i couldnt get it to display in the right order, so instead of trying to get the problem from the server/config side, i figure id try the display/client side, well this isnt a perfect solution, but on line 80 of /catalog/checkout_payment.php is where the array of payment modules is made, it would be $payment_modules->modules ... so (lucky for me) since my desired module was at the bottom of the list, i had no problem simply reversing the list, if you need some particular sort order, well I hope your good with arrays, or you know a better solution, but this took me an hour to get a solution, and my boss is gonna pay for that!

so my page (checkout_payment.php) is now;

 

Line 80: $payment_modules = new payment;

Line 81: $payment_modules->modules = array_reverse($payment_modules->modules);

 

just thought you all might like to know .. didnt really know if the collaborative documentation effort was a user-note type thing like php.net, but this is a note, hope you can put it somewhere useful, cause i found nothing in the forums.

 

thanks, Al

Posted

I hate to be the one to tell you this, but there is a much easier solution.

 

With all payment modules, when you activate them and make them live, click the edit button and you have a box called "Sort order of display"

 

Use this to display what order you want the payment options to show on during the checkout.

0 is top, 1 is second, 2 is third place etc

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...