This commit is contained in:
Christophe LATOUR 2017-11-17 18:34:51 +01:00
parent cdaa4f6fef
commit 74ca447bbf

View File

@ -313,19 +313,23 @@ class Cart extends BaseCart
}
$available_carriers = array();
foreach ($carriers_ah as $carrier_ah) {
if (isset($carrier_ah['id_carrier'])) {
$carrier = (new ApiCarrier())->populate($carrier_ah, $carrier_ah['id_carrier']);
$carrier->is_relay = false;
$available_carriers[] = $carrier;
if (isset($carriers_ah)) {
foreach ($carriers_ah as $carrier_ah) {
if (isset($carrier_ah['id_carrier'])) {
$carrier = (new ApiCarrier())->populate($carrier_ah, $carrier_ah['id_carrier']);
$carrier->is_relay = false;
$available_carriers[] = $carrier;
}
}
}
foreach ($carriers_ooh as $carrier_ooh) {
if (isset($carrier_ooh['id_carrier'])) {
$carrier = (new ApiCarrier())->populate($carrier_ooh, $carrier_ooh['id_carrier']);
$carrier->is_relay = true;
$available_carriers[] = $carrier;
if (isset($carriers_ooh)) {
foreach ($carriers_ooh as $carrier_ooh) {
if (isset($carrier_ooh['id_carrier'])) {
$carrier = (new ApiCarrier())->populate($carrier_ooh, $carrier_ooh['id_carrier']);
$carrier->is_relay = true;
$available_carriers[] = $carrier;
}
}
}
return new Collection($available_carriers);