Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Pre-select highest shipping cost instead of lowest

Pre-select highest shipping cost instead of lowest

Views: 886

Results 1 to 3 of 3
26 Apr 2013, 8:43 PM
#1
mugshots avatar

mugshots

New Zenner

Join Date:
Jan 2013
Posts:
4
Plugin Contributions:
0

Pre-select highest shipping cost instead of lowest

Hi Everyone,

Can anyone explain how I can change the pre-selected lowest shipping rate to be the highest please?
I'm using different shipping modules in various combinations for different products:-

Freeshipper
Perweightunit
Tables (Cloned)

I'm not using the shipping modules for actual shipping purposes but for monthly fees and I want to encourage customers to choose the highest rate.

Ive seen the thread to stop any shipping methods being pre-selected here http://www.zen-cart.com/showthread.php?90218-Eliminate-pre-selecting-shipping-method but thats not what I need.

I hope someone can explain the maths needed for this to work.

Thanks

26 Apr 2013, 8:46 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Pre-select highest shipping cost instead of lowest

I haven't tested it, but you could try the following...

Edit /includes/classes/shipping.php
Around line 176 you'll see the following. Try changing the < to > instead:

          if ($rates[$i]['cost'] [B]<[/B] $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') {
27 Apr 2013, 9:41 AM
#3
mugshots avatar

mugshots

New Zenner

Join Date:
Jan 2013
Posts:
4
Plugin Contributions:
0

Re: Pre-select highest shipping cost instead of lowest

DrByte:

I haven't tested it, but you could try the following...

Edit /includes/classes/shipping.php
Around line 176 you'll see the following. Try changing the < to > instead:

      if ($rates[$i]['cost'] [B]<[/B] $cheapest['cost'] and $rates[$i]['module'] != 'storepickup') {

Thanks DrByte for this help and all the other posts you have made over some time.

That did the trick :smile: