Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Saskatchewan, CDN
    Posts
    68
    Plugin Contributions
    0

    Default Setting Shipping Method to Default to ON

    Hi Everyone,

    I've got 2 shipping methods. Pick up and delivery. As of right now, both radio buttons are empty when the customer gets to the shipping screen. I'd like the "delivery" option to default to on. How would I go about doing this?

    Thanks!

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Setting Shipping Method to Default to ON

    There is a good reason to have shipping options "un-defaulted"... It forces the customer to make an appropriate choice.

    Remember, while customers are nice people, they tend to be rather stupid... They have to be reminded to make the RIGHT choice sometimes!
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2009
    Location
    Saskatchewan, CDN
    Posts
    68
    Plugin Contributions
    0

    Default Re: Setting Shipping Method to Default to ON

    The reason that I don't want no radio buttons to be filled in is that if the customer forgets to select an option and hits "next", the same page will reload and no error message will be displayed. Ideally, an error message saying "you forgot to select a shipping method" would pop up. Because this error message doesn't pop up, it may cause the customer to think that the site is bugged and abandon the purchase.

    I figured out how to make the most expensive shipping method default to on.


    Within shipping.php....


    $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;

    change the less than sign that I've colored in red to a greater than sign.

    That simple

 

 

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. Default Shipping Method Problem
    By toeyt in forum Bug Reports
    Replies: 9
    Last Post: 19 Dec 2007, 03:49 AM
  3. use credit card as default setting as payment method?
    By nanosafeguard in forum Addon Payment Modules
    Replies: 11
    Last Post: 27 Sep 2007, 11:06 PM
  4. default shipping method
    By 100asa in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 7 Aug 2007, 04:37 PM

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