Forums / Addon Shipping Modules / Cloning the Zone Based Rates Shipping Module?

Cloning the Zone Based Rates Shipping Module?

Locked

Started by pe7er on 11 Jan 2008, 12:57 AM · Views: 8,287

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
11 Jan 2008, 12:57 AM
#1
pe7er avatar

pe7er

New Zenner

Join Date:
Apr 2007
Location:
Nijmegen, Netherlands
Posts:
44
Plugin Contributions:
0

Cloning the Zone Based Rates Shipping Module?

I tried to clone the Zone Based Rates Shipping Module but it does not work properly in the front-end.

The shipping module can be installed, it shows up at the back-end, and I was able to configure it.
But on the front-end, the Checkout Shipping does not continue to step 2 (it remains in Step 1 of 3 - Delivery Information).

I followed the steps Ajeh described in http://www.zen-cart.com/forum/showthread.php?t=26216
and copied the \includes\modules\shipping\zones.php to zones_es.php
and changed

class zones {
```to

class zones_es {

function zones() {
$this->code = 'zones';

function zones_es() {
$this->code = 'zones_es';

MODULE_SHIPPING_ZONES_*

MODULE_SHIPPING_ZONES_ES_*


Furthermore I also cloned & changed the language file, and those labels are shown correctly at the front-end.

What did I do wrong? What did I forget during the cloning?

Kind Regards,
Peter Martin, Joomla specialist
www.db8.nl

11 Jan 2008, 1:33 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Cloning the Zone Based Rates Shipping Module?

Try using zones is zoneses and ZONES is ZONESES the underscore is separating the word ZONE_ES and zones_es to conflict with zones and ZONES ...

Also be aware not all ZONES get touched ... some reference the "Zone" data itself ...

NOTE: if you are cloning for more Zones ... then stop ... read the information in the file:
/includes/modules/shipping/zones.php

on how to add more zones by changing a setting in the zones module itself and just REMOVE and INSTALL to build them ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Jan 2008, 8:37 AM
#3
pe7er avatar

pe7er

New Zenner

Join Date:
Apr 2007
Location:
Nijmegen, Netherlands
Posts:
44
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

Thanks for your fast reply!

Ajeh:

Try using zones is zoneses and ZONES is ZONESES the underscore is separating the word ZONE_ES and zones_es to conflict with zones and ZONES ...
Aha, that could indeed be the problem! I will test it and post a followup with my findings...

NOTE: if you are cloning for more Zones ... then stop ... read the information in the file:
/includes/modules/shipping/zones.php

on how to add more zones by changing a setting in the zones module itself and just REMOVE and INSTALL to build them ...I already successfully changed the zones to more zones. The reason I would like to clone the Zone Based Rates Shipping Module is that I have 2 different shipping methods / rates based on those zones.

Thanks again!

Kind Regards,
Peter Martin, Joomla specialist
www.db8.nl

12 Jan 2008, 11:22 PM
#4
pe7er avatar

pe7er

New Zenner

Join Date:
Apr 2007
Location:
Nijmegen, Netherlands
Posts:
44
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

The problem was indeed caused by the underscore.

Changing all labels from ZONES_ES to ZONESES and the class & function name + "$this->code" contents from zones_es to zoneses solved the problem.

Thanks again for your help!

Kind Regards,
Peter Martin, Joomla specialist
www.db8.nl

13 Jan 2008, 2:21 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Cloning the Zone Based Rates Shipping Module?

Thanks for posting back that this was, in fact, the problem with your cloning of the Zone Rate zones Shipping Module ... always a great help to others ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

23 Feb 2008, 4:01 PM
#6
rohan avatar

rohan

New Zenner

Join Date:
Apr 2007
Posts:
6
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

:clap: Wow great post. :clap:

It works for me. http://hosting.cityemails.com
http://www.bharatanatyamworld.com/ecart/

Also by using this system you can even create new methods for
diffirent online & offline business.

I would like to say all.

Thank You.:smile:

30 May 2008, 6:33 AM
#7
deansta avatar

deansta

New Zenner

Join Date:
Jul 2006
Posts:
5
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

Please can someone help me.

I tried to do the above suggestions, but there are so many
MODULE_SHIPPING_ZONES_* to change, that I changed them all, and then realise that some need to be changed and others don't.

I can't get it to work.
When I looked at the shipping modules for download, there is no option (the one is a RAR file that I can't open, and the other does not contact countries, so it not a true zone based clone).
Is there nowhere else to download this module.

If not could anyone please advise which MODULE_SHIPPING_ZONES_* I need to change and which ones I don't.

I'm desperate to do this as I have two courier options at two different transit times and rates.
Thanks so much in advance if anyone can help.
Dean

23 Jul 2008, 3:13 PM
#8
shooter_ca avatar

shooter_ca

New Zenner

Join Date:
Nov 2006
Posts:
14
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

Deansta:

Please can someone help me.

I tried to do the above suggestions, but there are so many
MODULE_SHIPPING_ZONES_* to change, that I changed them all, and then realise that some need to be changed and others don't.

I can't get it to work.
When I looked at the shipping modules for download, there is no option (the one is a RAR file that I can't open, and the other does not contact countries, so it not a true zone based clone).
Is there nowhere else to download this module.

If not could anyone please advise which MODULE_SHIPPING_ZONES_* I need to change and which ones I don't.

I'm desperate to do this as I have two courier options at two different transit times and rates.
Thanks so much in advance if anyone can help.
Dean

Any update? I am looking for a way to duplicate the zone rate shipping module too. :dontgetit

2 Jul 2009, 9:49 PM
#9
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Cloning the Zone Based Rates Shipping Module?

Can anyone send me the 2 files they edited successfully and I will add it to the contributions

2 Jul 2009, 9:57 PM
#10
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Cloning the Zone Based Rates Shipping Module?

Am I suppose to change

 
// class constructor
    function zones() {
      $this->code = 'zones';

to

// class constructor
    function zones2() {
      $this->code = 'zones2';

along with the rest of the other definitions; I dont think so.. any way I will keep on trying

For all the people that have got it to work it (many posts on this subject) would have been nice to see some one post the file in their replyy or add it to the contributions

26 Jan 2010, 1:09 PM
#12
studioxanimo avatar

studioxanimo

New Zenner

Join Date:
Dec 2009
Posts:
1
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

vandiermen:

attached is a copy of a working zone rates clone

you are a godsend, vandiermen!:clap::clap::clap:

12 Feb 2010, 10:58 PM
#13
jaroline avatar

jaroline

New Zenner

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

Re: Cloning the Zone Based Rates Shipping Module?

vandiermen:

attached is a copy of a working zone rates clone

:clap::clap::clap: Thanks from me too! Helped a lot!

13 Feb 2010, 1:27 AM
#14
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Cloning the Zone Based Rates Shipping Module?

Ajeh did most of the work. This person and awesome zen-cart support deserves the credit. Ajeh is a godsend.

11 Mar 2010, 11:08 AM
#15
kenik avatar

kenik

New Zenner

Join Date:
Jan 2010
Posts:
16
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

For me do not work :(

IF I install zones i canot continue to checkout_payment
if I click to continue_checkout browser show blank site
index.php?main_page=checkout_shipping

It is samo if I chose shiping flat, zone zone etc in checkout_shipping page :(

Please help me

11 Mar 2010, 12:23 PM
#16
kenik avatar

kenik

New Zenner

Join Date:
Jan 2010
Posts:
16
Plugin Contributions:
0

Re: Cloning the Zone Based Rates Shipping Module?

KEnik:

For me do not work :(

IF I install zones i canot continue to checkout_payment
if I click to continue_checkout browser show blank site
index.php?main_page=checkout_shipping

It is samo if I chose shiping flat, zone zone etc in checkout_shipping page :(

Please help me

One more blank line on bottom in language file :oops:

After deleting this line - work fine