LaPoste-Colissimo/magento2-module-colissimo

few fixes (wrong cart price when doing shipping calculation, unable to generate labels to international, empty product weight issue

Opened this issue · 0 comments

Hello,

We discovered few glitches and we applied these patches :

  • cart price doesn't include discount
    vendor/laposte/magento2-colissimo-module/Model/Carrier/Colissimo.php

replace : $cartPrice = $request->getPackageValue();
by : $cartPrice = $request->getPackageValueWithDiscount();

  • unable to send parcel to international territories
    vendor/laposte/magento2-colissimo-module/Model/Carrier/GenerateLabelPayload.php

add in array $allowedProductCodes 'COLI'

vendor/laposte/magento2-colissimo-module/Helper/CountryOffer.php

replace : return $productInfo[$methodCode] ? 'DOS' : false;
by : return $productInfo[$methodCode] ? 'COLI' : false;

  • weight error fix
    vendor/laposte/magento2-colissimo-module/Model/Carrier/GenerateLabelPayload.php

update $piece['weight'] with the following : $piece['weight'] = (isset($piece['weight']) && $piece['weight'] > 0) ? $piece['weight'] : $orderItem->getProduct()->getWeight();

Do you think you could include these fixes in future releases ?

Thanks