Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default default shipping method

    I've 3 shipping method; I want setup express courier as default shipping method, so when customer go to checkout_shipping page, the radio button is already cecked on express courier.
    At this time is the store pickup shipping method already cecked.
    Thank you

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: default shipping method

    The default is the lowest price ...

    Store Pickup would only be the default if that is cached as Store Pickup is coded to not default ...

    To customize this you would need to change the shipping.php class and customize the code for:
    PHP Code:
          $cheapest false;
          
    $size sizeof($rates);
          for (
    $i=0$i<$size$i++) {
            if (
    is_array($cheapest)) {
              
    // never quote storepickup as lowest - needs to be configured in shipping module
              
    if ($rates[$i]['cost'] < $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') {
                
    $cheapest $rates[$i];
              }
            } else {
              if (
    $rates[$i]['module'] != 'storepickup') {
                
    $cheapest $rates[$i];
              }
            }
          }

          return 
    $cheapest
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: default shipping method

    Thank's a lot!
    I've done:
    PHP Code:
      $cheapest false;
          
    $size sizeof($rates);
          for (
    $i=0$i<$size$i++) {
            if (
    is_array($cheapest)) {
              
    // never quote storepickup as lowest - needs to be configured in shipping module
              
    if ($rates[$i]['cost'] < $cheapest['cost'] and ($rates[$i]['module'] != 'storepickup') and ($rates[$i]['module'] != 'assegnato')) {
                
    $cheapest $rates[$i];
              }
            } else {
              if (
    $rates[$i]['module'] != 'storepickup') {
                
    $cheapest $rates[$i];
              }
            }
          } 

 

 

Similar Threads

  1. Shipping method default selection
    By kanine in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 3 Sep 2010, 03:06 AM
  2. Setting Shipping Method to Default to ON
    By jasonhoward64 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 11 Apr 2010, 10:08 PM
  3. Set shipping method to Default?
    By Chariotz in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 5 Dec 2009, 03:25 AM
  4. Default Shipping Method Problem
    By toeyt in forum Bug Reports
    Replies: 9
    Last Post: 19 Dec 2007, 03:49 AM

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