Fontis_Australia-3.0.0 shipping method calculation issue

In the latest Australian post module of the font is (Fontis_Australia-3.0.0) did not display the shipping method details, when the weight of the product is below “1kg” and the zip code star with “0” digit.

For solving this issue,
Correct the integer type value in the collectRates()
app\code\community\Fontis\Australia\Model\Shipping\Carrier\Australoianpost.php

$fromPostcode = (int)Mage::getStoreConfig('shipping/origin/postcode', $this->getStore());
$toPostcode = (int)$request->getDestPostcode();
$sheight = (int)$helper->getAttribute($request, 'height');
$slength = (int)$helper->getAttribute($request, 'length');
$swidth = (int)$helper->getAttribute($request, 'width');

To

$fromPostcode = (string)Mage::getStoreConfig('shipping/origin/postcode', $this->getStore());
$toPostcode = (string)$request->getDestPostcode();
$sheight = (string)$helper->getAttribute($request, 'height');
$slength = (string)$helper->getAttribute($request, 'length');
$swidth = (string)$helper->getAttribute($request, 'width');

Also change the “type” integer to string in the below section:
app\code\community\Fontis\Australia\lib\vendor\fontis\auspost-api-php\src\Auspost\Postage\service.json
In “ListDomesticParcelServices” and in “CalculateDomesticParcelPostage” change the “type” to “string” in from_postcode, to_postcode, weight
And in “CalculateInternationalParcelPostage” change the “type” to “string” in weight

This entry was posted in Drupal Developer Notes. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *