Europe and Rest of World,
there is now: Europe, WorldZone1 and WorldZone2:
see here: http://www.royalmail.com/sites/default/ ... il2012.pdf
WorldZone1 is defined as being all the countries not in europe and not in worldzone2, worldzone2 are a name list of 15 or so countries / islands, that notably include Australia and New Zealand.
This messes up standard OpenCart Royal Mail Extension because it only has two places to set the prices per weights, once for europe and once for the rest of the world.
Not sure how anyone else is handling this ? or whether I've missed an extension update somewhere, but since the prices change at the end of month, and we ship alot to Australia, I've found myself adding a hack into the /catalog/model/shipping/royal_mail.php file.
The hack defines the worldzone2 countries, and add a check to see if ship to country is one of those, if so then opencart doesn't use the configured rates in the admin instead it uses a set of hardcoded rates for the worldzone2 countries. Short term but I guess it won't change till next April ?
I have changed the following lines
Code: Select all
// Airmail
if ($this->config->get('royal_mail_airmail_status')&& $address['iso_code_2'] != 'GB') {
$cost = 0;
$countries = explode(',', 'AL,AD,AM,AT,AZ,BY,BE,BA,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GI,GR,GL,HU,IS,IE,IT,KZ,KG,LV,LI,LT,LU,MK,MT,MD,MC,NL,NO,PL,PT,RO,RU,SM,SK,SI,ES,SE,CH,TJ,TR,TM,UA,UZ,VA');
if (in_array($address['iso_code_2'], $countries)) {
$rates = explode(',', $this->config->get('royal_mail_airmail_rate_1'));
} else {
$rates = explode(',', $this->config->get('royal_mail_airmail_rate_2'));
Code: Select all
// Airmail
if ($this->config->get('royal_mail_airmail_status')&& $address['iso_code_2'] != 'GB') {
$cost = 0;
$countries = explode(',', 'AL,AD,AM,AT,AZ,BY,BE,BA,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GI,GR,GL,HU,IS,IE,IT,KZ,KG,LV,LI,LT,LU,MK,MT,MD,MC,NL,NO,PL,PT,RO,RU,SM,SK,SI,ES,SE,CH,TJ,TR,TM,UA,UZ,VA');
$worldzone2 = explode(',','AU,CX,FJ,KI,NZ,AQ,SG,TO,CC,PF,MO,PG,SB,TV,IO,CK,NR,NU,LA,AS,NC,NF,PN,TK,WS');
if (in_array($address['iso_code_2'], $countries)) {
$rates = explode(',', $this->config->get('royal_mail_airmail_rate_1'));
} else {
if (in_array($address['iso_code_2'], $worldzone2)) {
$rates = explode(',', '100:3.30,150:3.90,200:4.50,250:5.10,300:5.70,400:6.98,500:8.26,600:9.54,700:10.82,800:12.10,900:13.38,1000:14.66,1100:15.94,1200:17.22,1300:18.50,1400:19.78,1500:21.06,1600:22.34,1700:23.62,1800:24.90,1900:26.18,2000:27.46');
} else {
$rates = explode(',', $this->config->get('royal_mail_airmail_rate_2'));
}
}
I don't know if that's of help to anyone, or if someone can point me in direction of a better way, presuming need a way of creating a $this->config->get('royal_mail_airmail_rate_3') that becomes editable in the admin.