Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default 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.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: UPS - Display rates in ascending order

    Insert this block of code:
    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:
    Code:
          $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.

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: UPS - Display rates in ascending order

    Quote Originally Posted by DrByte View Post
    Insert this block of code:
    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:
    Code:
          $this->quotes['methods'] = $methods;
    You're a peach.. 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.

 

 

Similar Threads

  1. UPS discounted rates not showing in UPS XML
    By cspan27 in forum Addon Shipping Modules
    Replies: 51
    Last Post: 27 Jun 2016, 03:52 PM
  2. UPS UPS Pickup Method vs Rates
    By Phil S in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 5 May 2014, 08:16 PM
  3. Zen Cart UPS Rate not Matching Real UPS Rates
    By mrtechnique in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 27 Jun 2008, 02:54 PM
  4. Need to display UPS discounted rates
    By tat2nu in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 22 Feb 2008, 08:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR