Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shipping metod not defaulting to lowest cost


Guest

Recommended Posts

I have a couple of shipping modules I am testing based on copies of the zones module. During checkout, the shipping method does not default to the lowest cost method.

 

I removed these modules and tested with some standard modules. Again the highest cost method is selected by default.

 

The sort order of the modules specifies in admin makes no difference to the default method selected

 

I am not sure where to look to correct this. Can anyone shed some light on what to check.

 

I have made no changes to class/shipping.php.

Link to comment
Share on other sites

  • 2 weeks later...

Hi, Its not designed to automatically select the lowest cost option.

Its ment to select the highest item listed in the "sort order" in admin/modules/shipping.

Putting the most common option first (sort order "0") and the least used last (sort order "9 or whatever)

 

I have a couple of shipping modules I am testing based on copies of the zones module. During checkout, the shipping method does not default to the lowest cost method.

 

I removed these modules and tested with some standard modules. Again the highest cost method is selected by default.

 

The sort order of the modules specifies in admin makes no difference to the default method selected

 

I am not sure where to look to correct this. Can anyone shed some light on what to check.

 

I have made no changes to class/shipping.php.

Link to comment
Share on other sites

Hi, Its not designed to automatically select the lowest cost option.

Its ment to select the highest item listed in the "sort order" in admin/modules/shipping.

Putting the most common option first (sort order "0") and the least used last (sort order "9 or whatever)

 

There is specific code to select the cheapest shipping option.

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
 if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

 

Have you checked the catalog\checkout_shipping.php??

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...