Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Default Shipping Radio Selection

    Am I missing something in admin?

    I've got three or four shipping modules installed, but for some reason the one that's always selected by default is the Royal Mail 2nd Class module. How do I make the default shipping module 1st class, so that the 1st class option is selected by default when the checkout page loads?

    This is what I get at the moment:



    This is what I want:

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Default Shipping Radio Selection

    Not sure about how to choose First Class, but Zencart selects the cheapest option by default. You can force the customer to choose one by doing this:

    http://www.zen-cart.com/forum/showpo...60&postcount=3

    I'm not sure why you wouldn't want the cheapest option for your customer to be selected by default, though.

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Default Shipping Radio Selection

    You get what you pay for. 2nd class takes longer and it's only about 20p or 30p cheaper than 1st class.

    I think that most people don't even look at the options and just confirm checkout and that's why we get so many who seem to use 2nd class (default) shipping. For the sake of a few pence it seems silly not to have 1st class (the faster) option selected.

    So, thanks for the link. I'll explore that. But doesn't that turn of auto selection completely and leave the radio buttons blank?

  4. #4
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Shipping Selection

    Quote Originally Posted by DrByte View Post
    It is auto-selecting the least-expensive shipping method.

    You can turn that off by editing your /includes/modules/pages/checkout_shipping/header_php.php
    around line 167 you have this:
    PHP Code:
      if ( !$_SESSION['shipping'] || ( $_SESSION['shipping'] && ($_SESSION['shipping'] == false) && (zen_count_shipping_modules() > 1) ) ) $_SESSION['shipping'] = $shipping_modules->cheapest(); 
    Just put two slashes // in front of that line and re-upload it to your server.
    Now it won't calculate the cheapest option anymore, and will require that the customer actually makes a choice.
    Is there a way to edit this code (rather than commenting it out) so that the default chipping method is not the "cheapest" but the "fastest" or the "best value for money"?

    I use three domestic shipping modules:

    Royal Mail Special Deivery (fastest)
    Royal Mail First Class Recorded (best value for money)
    Royal Mail Second Class Recorded (cheapest and slowest)

    Is there a way to have the 1st class selected by default?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Default Shipping Selection

    Sure. You're welcome to write your own custom code to magically figure out whichever is the "fastest" or "best value for money" option and present that to the customer. It'll mean replacing the call to the cheapest-selector with whatever new custom functionality you wish to build for your site.
    .

    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.

 

 

Similar Threads

  1. How to globally set default radio button selection?
    By tony manero in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Mar 2010, 04:32 PM
  2. how the radio button for credit card payment should be default selection???
    By lastpirate007 in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 7 Nov 2007, 12:31 PM
  3. Default selection for Radio Button
    By absoluteblock in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Nov 2006, 11:46 AM
  4. Default selection for attribute radio buttons
    By Das123 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 3 Oct 2006, 02:32 AM
  5. MZMT default radio button selection
    By chillout_buddha in forum Addon Shipping Modules
    Replies: 1
    Last Post: 3 Jun 2006, 07:42 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