How to Re-Order USPS Shipping Options by Cost?
Posted 24 January 2012 - 11:29 PM
During checkout, our customers are shown these 3 options in order of price, highest to lowest. We would like to reverse the order so that the most economical method is shown first.
I have searched and searched with the USPS shipping module, but can't figure out how to change to order to show the shipping methods from lowest to highest cost.
Can anyone help?
Posted 27 January 2012 - 03:37 PM
I am using Version 6.0 and don't see an option to change the USPS sort order (mine is shown from most to least expensive).
Any help is greatly appreciated!
Posted 16 February 2012 - 06:47 AM
Put this piece of code in the file that displays the shipping options (we use a custom checkout_payment.php page and it displays the shipping rates) to see the array delivered from the USPS: " <?php print_r($quotes) ?> "
Then use a little bit of php code to resort the array based on prices before they're printed on the screen (look for a for look in the code).
Check this page out: http://php.net/manual/en/array.sorting.php
Maybe in a couple of days or so, I'll get around to it. I had the same thought today, oddly enough. SWED.
Posted 16 February 2012 - 07:10 AM
Posted 16 February 2012 - 01:15 PM
Posted 17 February 2012 - 02:32 AM
Posted 17 February 2012 - 03:55 PM
Posted 26 April 2012 - 05:28 PM
Posted 02 May 2012 - 05:52 PM
I would suggest switching over to this USPS contribution:
osCommerce v2.2 - http://addons.oscommerce.com/info/8403
osCommerce v2.3.1 - http://addons.oscommerce.com/info/8327
Otherwise, I think the opposite of the arsort function is asort, not rsort.
Posted 03 May 2012 - 06:20 PM
Now off to figure out how to make Priority Mail the default, even if it is not the cheapest : )