Zen Cart Logo
Forums / Addon Shipping Modules / Making use of TITLE_NO_SHIPPING_AVAILABE

Making use of TITLE_NO_SHIPPING_AVAILABE

Locked

Views: 1,619

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
4 Jan 2007, 8:48 AM
#1
gruntre69 avatar

gruntre69

Zen Follower

Join Date:
Aug 2005
Location:
Australia
Posts:
103
Plugin Contributions:
0

Making use of TITLE_NO_SHIPPING_AVAILABE

I am trying to get my store to simply direct customers to a dealer link when I disable shipping to there particular country or zone.

I was hoping to use the define TITLE_NO_SHIPPING_AVAILABLE in the language file for checkout_shipping.php to show a explanation and link to a dealer page.

I.E. The part that says sorry we are not shipping to your region, but adding please see this link>> for our dealer locator.

The trouble is that the zone shipping module is one of the shipping modules I use and even when there is no country listed and the catch all switch is off, the TITLE_NO_SHIPPING_AVAILABLE define is not called because the module has it's own define MODULE_SHIPPING_FEDEX_INVALID_ZONE.
(Note: I have cloned this module for use with different courier options i.e fedex)

This seems to defeat the purpose of the TITLE_NO_SHIPPING_AVAILABLE define.

Is there an easy way to modify zones.php so that it is seen by the checkout_shipping.php as disabled if no zones are found. This way if no shipping zones are found The dealer explanation and link can be displayed and customers can easily be forwarded to my dealers.

I have tried some trial and error, but I am no coder and would appreciate any guidance on this subject.

5 Jan 2007, 7:47 AM
#2
gruntre69 avatar

gruntre69

Zen Follower

Join Date:
Aug 2005
Location:
Australia
Posts:
103
Plugin Contributions:
0

Re: Making use of TITLE_NO_SHIPPING_AVAILABE

Here is the answer that I finally figured out for my self for anybody in future looking for it.
Look around line 224 in the shipping module zones.php

// edit by GB
/*      if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_FEDEX_INVALID_ZONE;

      return $this->quotes;
    }
// changed to intergrate with TITLE_NO_SHIPPING_AVAILABLE define for dealer message*/
      if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);

if ($error == false) return $this->quotes;
      if ($error == true) $this->enabled = false;    
    }
// EOF change
29 Jan 2007, 10:29 PM
#3
snowblind avatar

snowblind

New Zenner

Join Date:
Nov 2006
Location:
Dallas, Texas
Posts:
11
Plugin Contributions:
0

Re: Making use of TITLE_NO_SHIPPING_AVAILABE

Thanks for that, I'm new to php and all this code stuff, so finding the right place to edit something can be a tad confusing sometimes.:thumbsup:

1 Apr 2007, 9:32 PM
#4
graemec avatar

graemec

New Zenner

Join Date:
Feb 2007
Posts:
7
Plugin Contributions:
0

Re: Making use of TITLE_NO_SHIPPING_AVAILABE

If anyone else is looking at this I think a } got left off in the example above. It worked for me like this:

if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
}
if ($error == false) return $this->quotes;
if ($error == true) $this->enabled = false;
}