Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Stop 0.00 shipping rate when cannot be determined!!


1 reply to this topic

#1 Guyver

  • Community Member
  • 162 posts
  • Real Name:John
  • Location:UK

Posted 07 May 2003, 14:54

This may or may not be useful to everyone.

We offer UK recorded/special and courier shipping, quite often an item will weigh more than the set level for recorded/special , ie over 4/10 kg respectively. But courier quote comes through fine

What you get is all 3 quotes, the recorded/special @ 0.00 saying it cannot determine the rate, and then the courier rate @ whatever it works out to be.

We get a few customers select the 0.00 as its still a 'selectable' method. This can be very frustrating explaining to customers why they can't have 0.00 (free) shipping.

Having looked at the 'zone' shipping modules in ../includes/modules/shipping/... I managed to suss a quick hack to remove that shipping methods 'checkbox' if it cannot work it out.

At around line 136 just after:

if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_UKSD_INVALID_ZONE;

Put this line:

if ($shipping_method == MODULE_SHIPPING_UKRD_UNDEFINED_RATE ) $this->quotes['error'] = $shipping_method;

The above is a working example for the new UK Recorded delivrey contrib, but this will work on ANY zone shipping method, just change the 'MODULE_SHIPPING_UKRD_UNDEFINED_RATE' to whatever module you're using..

Hope this helps.

Thanks

John

#2 CC

  • Community Member
  • 1,289 posts
  • Real Name:....
  • Gender:Male
  • Location:Here \o/

Posted 16 May 2003, 18:39

Good skills John, this is a quality little addition.

You should have released it as contribution.

CC.