if ($deliveryTime === null
) { continue;
} // create the estimated delivery date by detected delivery time
$deliveryDate = DeliveryDate::
createFromDeliveryTime($deliveryTime);
// create a restock date based on the detected delivery time
$restockDate = DeliveryDate::
createFromDeliveryTime($deliveryTime);
$restockTime =
$item->
getDeliveryInformation()->
getRestockTime();
// if the line item has a restock time, add this days to the restock date
if ($restockTime) { $restockDate =
$restockDate->
add(new \
DateInterval('P' .
$restockTime . 'D'
));
} if ($item->
getPrice() === null
) { continue;
} // if the item is completely in stock, use the delivery date