Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Shadi Manna

    (@shadim)

    Could you check the log file to confirm what is being passed to the DHL API – https://www.dropbox.com/s/p1fdizmjloe0ems/Screenshot%202021-03-05%20at%2010.05.37.png?dl=0 ?

    Thread Starter cybsys

    (@cybsys)

    "insuranceValue":70,"totalValue":150.00,

    It seems as if it is using the totalValue variable. This is a bug and needs to be fixed. Can you tell me which file I need to edit the PHP code on to fix it?

    Thread Starter cybsys

    (@cybsys)

    Okay, the file to edit is includes\REST_API\DHL_eCS_Asia\Client.php.
    The function to edit is item_info_to_request_data.

    You then want to edit the shipment_item array that is parsed:

    'insuranceValue' 	=> $item_info->shipment['insuranceValue'], //items_value
    'totalValue'		=> $item_info->shipment['insuranceValue'],

    In this case, I made them both use the specified insuranceValue variable.

    You then need to also edit the shipment_content array below in the same function. 'itemValue' => $item_info->shipment['insuranceValue'], //$content['value'],

    • This reply was modified 3 years, 8 months ago by cybsys.
    Plugin Author Shadi Manna

    (@shadim)

    Are you sure that what is printed on the label is not actually the “total value”? It seems that the insurance value is being passed correctly to the DHL API, is it not?

    Thread Starter cybsys

    (@cybsys)

    The insurance value defaults to the total value (which is fine), but if I change it then it prints the total value. That doesn’t make any sense, so I forced it in the code to use the insurance value at all times because if the insurance value is less than the total value, we’d want to use that instead otherwise it defeats the purpose (you can’t declare a lower insurance value than the product total otherwise DHL won’t like that).

    Plugin Author Shadi Manna

    (@shadim)

    Do you have shipping fee associated with the order?

    Thread Starter cybsys

    (@cybsys)

    Yes.

    Plugin Author Shadi Manna

    (@shadim)

    But shipping should not be included in the insurance of the products, correct? I believe this is the discrepancy.

    Thread Starter cybsys

    (@cybsys)

    The shipping fee isn’t the problem. Read above what the problem is. I even shared the code so you know exactly what I did.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Insurance Value Not Matching Label’ is closed to new replies.