Fixed: Trying to access array offset on false in admin order details when trying to update service products in existing order.
This commit is contained in:
@@ -7486,7 +7486,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Invalid quantity provided for service').': '.$objServiceProductOrderDetail->name;
|
||||
}
|
||||
} elseif ($serviceQuantities[$idRoomTypeServiceProductOrderDetail] > 1) {
|
||||
} elseif (is_array($serviceQuantities) && isset($serviceQuantities[$idRoomTypeServiceProductOrderDetail]) && $serviceQuantities[$idRoomTypeServiceProductOrderDetail] > 1) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Can not order multiple quanitity for service').': '.$objServiceProductOrderDetail->name;
|
||||
}
|
||||
@@ -7507,7 +7507,11 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$result = true;
|
||||
foreach ($selectedServicesOrderDetails as $idRoomTypeServiceProductOrderDetail) {
|
||||
$objServiceProductOrderDetail = new ServiceProductOrderDetail($idRoomTypeServiceProductOrderDetail);
|
||||
$quantity = $serviceQuantities[$idRoomTypeServiceProductOrderDetail];
|
||||
if(is_array($serviceQuantities) && isset($serviceQuantities[$idRoomTypeServiceProductOrderDetail])) {
|
||||
$quantity = (int)$serviceQuantities[$idRoomTypeServiceProductOrderDetail];
|
||||
} else {
|
||||
$quantity = 1;
|
||||
}
|
||||
$unitPrice = $serviceUnitPrices[$idRoomTypeServiceProductOrderDetail];
|
||||
|
||||
$objHotelBookingDetail = new HotelBookingDetail($objServiceProductOrderDetail->id_htl_booking_detail);
|
||||
|
||||
Reference in New Issue
Block a user