Jump to content

zipcode shipping module

Recommended Posts


i found this one: https://apps.oscommerce.com/rR9ja&zipcode-shipping-delivery

no support link mentioned and i was prob blind enough that i could not find the module mentioned

problem with the module is that it has a flaw in that if no zip code is defined it will allow the customer to get free shipping


anyone know of a quick hack that can disable the module if it cant calculate a price?

Quo plus habent, eo plus cupiunt

Share this post

Link to post
Share on other sites

Hi - OK had that rethink - this one can be  tricky to setup and you can often end up with the situation you are seeing if there's a glitch in the admin.

When it cannot correctly calculate a value it should display:

Postcode Shipping 

No delivery/shipping available to the selected Postcode.

But if you have not set the weights correctly then you can get:

Postcode Shipping 
The delivery/shipping fee cannot be determined at this time $0.00

The trick is to set a big final weight in each zone - something like 10000:10000 - e.g. 4:7,10:10,99:13.50, 10000:10000

If that still does not fix it then here's a code hack that will disable the module if it sees a zero value returned

// class constructor
    function zipship() {
	  global $order;

      $this->code = 'zipship';
      $this->sort_order = MODULE_SHIPPING_ZIPSHIP_SORT_ORDER;
      $this->icon = '';
      $this->tax_class = MODULE_SHIPPING_ZIPSHIP_TAX_CLASS;
      $this->enabled = ((MODULE_SHIPPING_ZIPSHIP_STATUS == 'True') ? true : false);
      $this->num_zones = 6;
	  if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_ZIPSHIP_ZONE > 0) ) {
        $check_flag = false;
        $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_ZIPSHIP_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
        while ($check = tep_db_fetch_array($check_query)) {
          if ($check['zone_id'] < 1) {
            $check_flag = true;
          } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
            $check_flag = true;
        if ($check_flag == false) {
          $this->enabled = false;
		// check for a zero shipping price
		if ($this->quote()['methods'][0]['cost'] <= 0){
			  $this->enabled = false;
// class methods


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now