mystere Posted June 1, 2003 Posted June 1, 2003 Hi all! strange... I don't know why, but OSC doesn't want to ship to the UK... a client told me that "no shipping available"... I checked and I really had forgotten to add the UK... I added it to the 5th zone, but OSC keeps telling, that no shiping is available... any idea why? here my settings for zone.php thanks for your time Moritz Demetz ------------------------------------------- Handling Fee 0 Zone 1 Countries IT,VA,SM Zone 1 Shipping Table 30:7.00,999:1000.00 Zone 2 Countries DE,AT Zone 2 Shipping Table 2:10.20,5:16.20,10:18.60,15:22.20,20:24.60,25:28.20,30:34.20,999:1000.00 Zone 3 Countries AL,DZ,BE,BA,BG,HR,EG,EE,FI,FR,GR,HU,IS,IE,IL,JO,LB,LY,LT,LU,MC,MA,NL,NO,PL,PT,RO ,RU,SK,SI,ES,SE,CH,SY,TN,TR,UA Zone 3 Shipping Table 0.5:4.00,1:6.00,2:8.50,999:1000 Zone 4 Countries AF,AO,AR,BS,BD,BJ,BM,BO,BR,BN,BF,BI,CM,CA,CV,CF,TD,CL,CN,CO,CG,CI,CU,DK,DO,EC,SV ,ET,GA,GE,GT,GW,HN,HK,IN,ID,IQ,JM,JP,KE,KW,LR,MG,MY,ML,MR,MX,MZ,NP,NI,NE,NG,OM,PK ,PA,PY,PE,SN,SC,SL,SG,SO,SD,TJ,TZ,TH,TG,UG,US,VE,VN,ZM,ZW Zone 4 Shipping Table 0.5:4.50,1:6.50,2:9.00,999:1000 Zone 5 Countries AU,FJ,GN,NC,NZ,UK Zone 5 Shipping Table 0.5:5.00,1:6.50,2:9.50,999:1000
Guest Posted June 2, 2003 Posted June 2, 2003 The ISO code for the UK is GB not UK. thats your problem
mystere Posted June 3, 2003 Author Posted June 3, 2003 I feared it was something stupid like that and was almost afraid to ask! :D Thank you! Moritz
judgej Posted June 5, 2003 Posted June 5, 2003 Slightly OT, but I just did this hack to simplify UK shipping: instead of entering a big list of country codes, I just enter the name of a tax zone, and allow the zones shipping module to pick up the list of countries at run-time. It means the country lists are always going to be complete, provided the tax zones are kept up-to-date. This is the code that does the lookup, in zones.php: ... function quote($method = '') { global $order, $shipping_weight; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($i=1; $i<=$this->num_zones; $i++) { $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i); // If the countries table is the name of a geo zone, then grab the list of countries from the database. $sql = "select distinct geo_zone_name from osc_geo_zones where geo_zone_name = '".addslashes($countries_table)."'"; $zone_query = tep_db_query($sql); $zone_check = tep_db_num_rows($zone_query); if ($zone_check > 0) { $sql = "select distinct countries_iso_code_2 from osc_countries, osc_zones_to_geo_zones, osc_geo_zones where zone_country_id = countries_id and countries_iso_code_2 is not null and countries_iso_code_2 <> '' and osc_zones_to_geo_zones.geo_zone_id = osc_geo_zones.geo_zone_id and geo_zone_name = '".addslashes($countries_table)."' and countries_iso_code_2 = '".$dest_country."'"; $country_query = tep_db_query($sql); $country_check = tep_db_num_rows($country_query); if ($country_check > 0) { $dest_zone = $i; break; } } else { $country_zones = split("[,]", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; } } } if ($dest_zone == 0) { $error = true; } else { $shipping = -1; ...etc Make of it as you will. This mod will allow you to use the country codes or the tax zone names, or a mixture of the two in different shipping zones. Hope someone finds it useful...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.