Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Duplicating zones.php


Guest

Recommended Posts

Posted

Hey,

 

I don?t want to know how to add more zones (answered many times over in the forum). I just want to know how to duplicate the zones.php file.

 

If possible in an easy way. Just copying and renaming wont work.

 

I need to do this to be able to offer multiple shipping solutions for multiple countries.

 

Thankful for any help.

  • 4 months later...
Posted

I was having the same problem.

 

When you just copy the zones.php to another name (like zones-test.php) (in both the shop/includes/modules/shipping and shop/includes/languages/english/modules/shipping directories) then you get:

 

Fatal error: Cannot redeclare class zones in /srv/www/htdocs/robo-store.de/shop/includes/modules/shipping/zones.php on line 97

 

What I just succeeded in doing:

 

a) copy shop/includes/modules/shipping/zones.php to second_zones.php

b) copy shop/includes/languages/english/modules/shipping/zones.php to second_zones.php

c) search and replace (with vi: %s/_SHIPPING_ZONES_/_SHIPPING_SECOND_ZONES_/g) all occurrences of _SHIPPING_ZONES_ with _SHIPPING_SECOND_ZONES_ in both second_zones.php files

d) in the first file (see step a):

d1) replace "class zones {" with "class second_zones {"

d2) replace "function zones() {" with "function second_zones() {"

d3) replace "$this->code = 'zones';" with "$this->code = 'second_zones';"

d4) replace "$num_zones;" with "$num_second_zones;"

 

e) If I remember correctly, that's it! If not, please ask, and I will try to remember what i forgot ;-)

 

Ethan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...