shoppingflux / shoppingfluxexport

7 stars 7 forks source link

id_point missing in SoFlexibilite (socolissimo_delivery_info) #415

Open ghost opened 6 years ago

ghost commented 6 years ago

Expected behaviour

When soflexibilite is active, we should be able to set the id_point (relay ID) so the relay info will be linked to the order.

Actual behaviour

The id_point is always set to null

Steps to reproduce the behaviour

Receiving an order having a carrier set up for colissimo relay and the module soflexibilite active

ghost commented 6 years ago

Example of code:

if ($id_reference == $conf['SOFLEXIBILITE_BPR_ID'] ||
    $carrier_obj->id == $conf['SOFLEXIBILITE_BPR_ID']
) {
    $so_delivery->type = 'BPR';
    $so_delivery->id_point = !empty($order->Other) ? $order->Other : null;
}

if ($id_reference == $conf['SOFLEXIBILITE_A2P_ID'] ||
    $carrier_obj->id == $conf['SOFLEXIBILITE_A2P_ID']
) {
    $so_delivery->type = 'A2P';
    $so_delivery->id_point = !empty($order->Other) ? $order->Other : null;
}