If this is your first visit, check our documentation. To post, register or login.
Forums / Built-in Shipping and Payment Modules / UPS - Display rates in ascending order

UPS - Display rates in ascending order

Started by divavocals on 1 May 2013, 6:10 AM · Views: 894

Results 1 to 3 of 3
1 May 2013, 6:10 AM
#1
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

UPS - Display rates in ascending order

Been through this forum and it seems no one has asked this.. I can't seem to find where one can change the order of the rates to display from lowest to highest.. Can anyone give a girl a hint??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

1 May 2013, 6:21 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: UPS - Display rates in ascending order

Insert this block of code:foreach($methods as $c=>$key) { $sort_cost[] = $key['cost']; $sort_id[] = $key['id']; } array_multisort($sort_cost, SORT_ASC, $sort_id, SORT_ASC, $methods);just before this line:```
$this->quotes['methods'] = $methods;

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 May 2013, 6:24 AM
#3
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: UPS - Display rates in ascending order

DrByte:

Insert this block of code:foreach($methods as $c=>$key) { $sort_cost[] = $key['cost']; $sort_id[] = $key['id']; } array_multisort($sort_cost, SORT_ASC, $sort_id, SORT_ASC, $methods);just before this line:```
$this->quotes['methods'] = $methods;


You're a peach.. :hug:that did the trick!

Thanks Dr..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.