DPDBeNeLux / magento-DPD_Shipping

Let op: er zijn nieuwe DPD plugins (BETA versie) beschikbaar met belangrijke nieuwe functionaliteiten. De oude plugins zullen na Brexit niet meer goed functioneren, download daarom de nieuwe versie op Github/DPDconnect.
11 stars 10 forks source link

limit parcelshop result to country #39

Closed mvgucht closed 9 years ago

mvgucht commented 9 years ago

Try this: https://github.com/DPDBeNeLux/magento-DPD_Shipping/blob/master/app/code/community/DPD/Shipping/Model/Webservice.php#L347

347     public function getParcelShops($longitude, $latitude) 
348     { 
349         $webserviceUrl = $this->_getWebserviceUrl(self::XML_PATH_DPD_URL) . self::WEBSERVICE_PARCELSHOP; 
350         $limit = Mage::getStoreConfig(self::XML_PATH_PARCELSHOP_MAXPOINTERS);
350         $address = Mage::getModel('checkout/cart')->getQuote()->getShippingAddress();
350         $country = strtoupper($address->getCountry());
351         $parameters = array( 
352             'longitude' => $longitude, 
353             'latitude' => $latitude, 
353             'countryISO' => $country,
354             'limit' => $limit, 
355             'consigneePickupAllowed' => 'true' 
356         ); 
357  
358         $result = $this->_webserviceCall($webserviceUrl, 'findParcelShopsByGeoData', $parameters); 
359         return $result; 
360  
361     }