Fixed: After reallocation getting issue on cart page on realloation for second time
This commit is contained in:
@@ -397,12 +397,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$cart_detail_data = array();
|
||||
$cart_detail_data_obj = new HotelCartBookingData();
|
||||
$objServiceProductCartDetail = new ServiceProductCartDetail();
|
||||
if ($cart_detail_data = $cart_detail_data_obj->getCartFormatedBookinInfoByIdCart(
|
||||
(int) $id_cart,
|
||||
[],
|
||||
null,
|
||||
0
|
||||
)) {
|
||||
if ($cart_detail_data = $cart_detail_data_obj->getCartFormatedBookinInfoByIdCart((int) $id_cart)) {
|
||||
$objRoomType = new HotelRoomType();
|
||||
foreach ($cart_detail_data as $key => $cart_data) {
|
||||
$cart_detail_data[$key]['room_type_info'] = $objRoomType->getRoomTypeInfoByIdProduct($cart_data['id_product']);
|
||||
|
||||
@@ -2293,7 +2293,7 @@ class HotelBookingDetail extends ObjectModel
|
||||
if ($idNewCartBookingData) {
|
||||
$objServiceProductCartDetail = new ServiceProductCartDetail();
|
||||
if ($oldCartAdditonalServices = $objServiceProductCartDetail->getServiceProductsInCart(
|
||||
$objCartBookingData->id_cart,
|
||||
0, // if reallocated twice the id cart will not be used as it was not changed in first reallocation.
|
||||
[],
|
||||
null,
|
||||
$objCartBookingData->id
|
||||
|
||||
@@ -140,7 +140,7 @@ class ServiceProductCartDetail extends ObjectModel
|
||||
*/
|
||||
// public function getProducts(
|
||||
public function getServiceProductsInCart(
|
||||
$idCart,
|
||||
$idCart = 0,
|
||||
$sellingPreferenceTypes = [],
|
||||
$idHotel = null,
|
||||
$idHotelCartBooking = null,
|
||||
@@ -179,7 +179,10 @@ class ServiceProductCartDetail extends ObjectModel
|
||||
$sql .= ' LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbil ON (hbil.`id` = spc.`id_hotel` AND hbil.`id_lang` = '. $language->id.')';
|
||||
}
|
||||
|
||||
$sql .= ' WHERE spc.`id_product`!=0 AND spc.`id_cart`='.(int) $idCart;
|
||||
$sql .= ' WHERE spc.`id_product`!=0 ';
|
||||
if ($idCart) {
|
||||
$sql .= ' AND spc.`id_cart`='.(int) $idCart;
|
||||
}
|
||||
|
||||
if (!is_null($idProductRoomType)) {
|
||||
$sql .= ' AND hcbd.`id_product`='.(int) $idProductRoomType;
|
||||
|
||||
Reference in New Issue
Block a user