i had it working fine with a code fix before upgrade can anyone please help
this is the old one i had working
Code: Select all
if ($this->config->get('royal_mail_airmail') && $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(',', '.1:1.49,.2:2.19,.3:2.61,.4:3.16,.5:3.71,.6:4.26,.7:4.81,.8:5.36,.9:5.91,1:6.46,1.1:7.01,1.2:7.56,1.3:8.11,1.4:8.66,1.5:9.21,1.6:9.76,1.7:10.31,1.8:10.86,1.9:11.41,2:11.96');
} else {
$rates = explode(',', '.1:2.07,.2:3.50,.3:4.26,.4:5.37,.5:6.48,.6:7.59,.7:8.70,.8:9.81,.9:10.92,1:12.03,1.1:13.14,1.2:14.25,1.3:15.36,1.4:16.47,1.5:17.58,1.6:18.69,1.7:19.80,1.8:20.91,1.9:22.02,2:23.13');
}
this is the new one
Code: Select all
// Airmail
if ($this->config->get('royal_mail_airmail_status')) {
$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'));
}
foreach ($rates as $rate) {
$data = explode(':', $rate);
if ($data[0] >= $weight) {
if (isset($data[1])) {
$cost = $data[1];
}
break;