Magento DHL Domestic Shipping Not Working

401 views Asked by At

I have integrated DHL method into magento 1.9.2.4 and having one problem in it. my origin country is AE and when I try to order something in same country that is AE then DHL method is not working for all other countries its working. I have contacted DHL and they said the tag must be N in magento log file. currently getting Y

Can any one tell me what original problem is and how can i edit tag to N ?

Thanks Ahead.

1

There are 1 answers

0
Danish Jamshed On

ok here is complete answer to this problem that i have solved successfully.

replace DHL function here. app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php. make sure you make a copy in local and then change.

in this file change this function to given below.

protected function _checkDomesticStatus($origCountryCode, $destCountryCode){ $this->_isDomestic = false;

$origCountry = (string)$this->getCountryParams($origCountryCode)->name;
$destCountry = (string)$this->getCountryParams($destCountryCode)->name;
$isDomesticOrig = (string)$this->getCountryParams($origCountryCode)->domestic;
$isDomesticDest = (string)$this->getCountryParams($destCountryCode)->domestic;

if (($origCountry == $destCountry) || ($isDomesticOrig && $isDomesticDest)) {
    $this->_isDomestic = true;
}

return $this->_isDomestic;

}