File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,14 @@ abstract class AbstractCarrierOnline extends AbstractCarrier
28
28
29
29
const GUAM_REGION_CODE = 'GU ' ;
30
30
31
+ const SPAIN_COUNTRY_ID = 'ES ' ;
32
+
33
+ const CANARY_ISLANDS_COUNTRY_ID = 'IC ' ;
34
+
35
+ const SANTA_CRUZ_DE_TENERIFE_REGION_ID = 'Santa Cruz de Tenerife ' ;
36
+
37
+ const LAS_PALMAS_REGION_ID = 'Las Palmas ' ;
38
+
31
39
/**
32
40
* Array of quotes
33
41
*
Original file line number Diff line number Diff line change @@ -334,6 +334,14 @@ public function setRequest(RateRequest $request)
334
334
$ destCountry = self ::GUAM_COUNTRY_ID ;
335
335
}
336
336
337
+ // For UPS, Las Palmas and Santa Cruz de Tenerife will be represented by Canary Islands country
338
+ if (
339
+ $ destCountry == self ::SPAIN_COUNTRY_ID &&
340
+ ($ request ->getDestRegionCode () == self ::LAS_PALMAS_REGION_ID || $ request ->getDestRegionCode () == self ::SANTA_CRUZ_DE_TENERIFE_REGION_ID )
341
+ ) {
342
+ $ destCountry = self ::CANARY_ISLANDS_COUNTRY_ID ;
343
+ }
344
+
337
345
$ country = $ this ->_countryFactory ->create ()->load ($ destCountry );
338
346
$ rowRequest ->setDestCountry ($ country ->getData ('iso2_code ' ) ?: $ destCountry );
339
347
You can’t perform that action at this time.
0 commit comments