Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tax zone "Rest of the World"


little.pm

Recommended Posts

Hi all,

 

I dunno if that was suggested before as I am not familar with the search feature (ok, may be its just that I am lazy :-).

 

Here we go:

I did some shops with oscommerce and try to help out others with their stores (for fun and sometimes for profit) but I realized a rather complicated thing.

 

It often happens that some payment options apply to the whole world wich is realized in teh Database if in TABLE 'zones_to_geozones' the value in the field 'zone_country_id' is set to zero ('0').

 

Now it happens as much as often that foreigners get a special treatment in ones shop, so I was thinking of creating a tax_zone for all countries in the world (or all those listed in TABLE 'countries') but not containing the STORE_COUNTRY.

 

I think the easiest way to signal that would be to set above named field 'zone_country_id' to minus 1 ('-1'), but apparently all modules cannot interprete that value yet. I think its even quite logically to choose -1 as it could be read as "every country whats here minus the ONE we are in".

 

Are there any other ideas of implementing a tax_zone "Rest of the World" or alike or have there been other attempts to get the same functionality without really entering all other countries into the TABLE 'zones_to_geozones' which I would not prefer regarding simply speed concerns?

 

I am looking forward to your thoughts.

 

regards

ralf

sometimes I change code before reading the comments, sometimes code doesn't even have comments, sometimes I rechange code after I read the code others wrote :-)

Link to comment
Share on other sites

ok, to be more precisely,

 

my attempt would look alike this for example (to be modified in all modules though):

 

// class methods
   function update_status() {
     global $order;

     if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_CC__ZONE > 0) ) {
.
.
.
     } elseif (($this->enabled == true) && ((int)MODULE_PAYMENT_CC_ZONE === -1) &&  ($order->billing['zone_id'] === STORE_COUNTRY) ) {
       $this->enabled = false;
     }
     
   }

 

companioned by an expansion of the dropdown list in /admin/geo_zones.php with an entry "Rest of the World" and the value '-1'.

 

regards

ralf

sometimes I change code before reading the comments, sometimes code doesn't even have comments, sometimes I rechange code after I read the code others wrote :-)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...