Zen Cart Logo
Forums / Addon Shipping Modules / Default Shipping Radio Selection

Default Shipping Radio Selection

Locked

Views: 1,396

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
7 Jun 2010, 5:11 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

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:

7 Jun 2010, 5:18 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

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/showpost.php?p=240160&postcount=3

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

7 Jun 2010, 5:41 PM
#3
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

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?

7 Jun 2010, 5:46 PM
#4
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Default Shipping Radio Selection

DrByte:

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
if ( !$_SESSION['shipping'] || ( $_SESSION['shipping'] && ($_SESSION['shipping'] == false) && (zen_count_shipping_modules() > 1) ) ) $_SESSION['shipping'] = $shipping_modules->cheapest();

> 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?
7 Jun 2010, 11:26 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Default Shipping Radio 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.