Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    455
    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
    64,715
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    455
    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. How to enable only one shipping method to some products?
    By hankliu in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 3 Sep 2009, 06:05 PM
  2. Default Shipping Selection
    By seanscully in forum Addon Shipping Modules
    Replies: 6
    Last Post: 11 Jul 2007, 05:30 AM
  3. 1101 BLOB/TEXT column can't have a default value
    By tkroh in forum Installing on a Windows Server
    Replies: 3
    Last Post: 27 Dec 2006, 10:28 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
  •