diff --git a/admin/themes/default/template/controllers/products/configuration.tpl b/admin/themes/default/template/controllers/products/configuration.tpl index 0a32dcac0..61e5e168d 100644 --- a/admin/themes/default/template/controllers/products/configuration.tpl +++ b/admin/themes/default/template/controllers/products/configuration.tpl @@ -101,8 +101,10 @@ {if isset($room_info['id'])} - - + {if $room_info['booked_dates']} + + + {/if} {else} @@ -564,15 +566,19 @@ if (confirm(confirmText)) { var calendarEventId = parseInt($(this).parent().find('.fc-event-title').attr('data-id_calendar_event')); var calendarEvent = DisableDatesCalendar.getEventById(calendarEventId); - if (DisableDatesObj.deleteDisableDate(calendarEvent.extendedProps.id_disable_date)) { - $('#disable_dates_full_calendar .id_calendar_event_'+calendarEventId).find('.fc-event-main-frame').tooltip('destroy'); - calendarEvent.remove(); - var formEventId = parseInt($('#disable_dates_form .id_calendar_event').val()); - if (!isNaN(formEventId) && formEventId == eventId) { - DisableDatesForm.resetForm(); - DisableDatesForm.hideForm(); - } - } + $('#disable_dates_full_calendar .id_calendar_event_'+calendarEventId).find('.fc-event-main-frame').tooltip('hide'); + DisableDatesObj.deleteDisableDate(calendarEvent.extendedProps.id_disable_date) + .then(function(response) { + if (response) { + $('#disable_dates_full_calendar .id_calendar_event_'+calendarEventId).find('.fc-event-main-frame').tooltip('destroy'); + calendarEvent.remove(); + var formEventId = parseInt($('#disable_dates_form .id_calendar_event').val()); + if (!isNaN(formEventId) && formEventId == eventId) { + DisableDatesForm.resetForm(); + DisableDatesForm.hideForm(); + } + } + }); } }); @@ -1188,20 +1194,24 @@ }, // This is called to delete the disable date object using the idDisableDate. deleteDisableDate: function(idDisableDate) { - $.ajax({ - url: prod_link, - type: 'POST', - data: { - ajax: true, - action: 'deleteDisableDate', - id_disable_date : idDisableDate, - }, - dataType: 'JSON', - success: function(response) { - DisableDatesForm.showMessages(response.msg); - - return response.status; - } + return new Promise(function(resolve, reject) { + $.ajax({ + url: prod_link, + type: 'POST', + data: { + ajax: true, + action: 'deleteDisableDate', + id_disable_date : idDisableDate, + }, + dataType: 'JSON', + success: function(response) { + DisableDatesForm.showMessages(response.msg); + resolve(response.status) + }, + error: function(xhr, status, error) { + reject(error); + } + }) }); }, // This is called to get the all disable dates from the calander. diff --git a/classes/BoOrder.php b/classes/BoOrder.php index b6046c5c8..57802960c 100644 --- a/classes/BoOrder.php +++ b/classes/BoOrder.php @@ -27,5 +27,7 @@ class BoOrder extends PaymentModule { $this->displayName = $this->l('Back office order'); $this->validateOrderAmount = false; + // Default payment type for backoffice order should be PAY_AT_HOTEL + $this->payment_type = OrderPayment::PAYMENT_TYPE_PAY_AT_HOTEL; } } \ No newline at end of file diff --git a/classes/Cart.php b/classes/Cart.php index d6ccb072a..fc3fc8c7e 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -789,10 +789,8 @@ class CartCore extends ObjectModel $unitPriceByProductTaxExcl = $objHotelServiceProductCartDetail->getHotelProductUnitPrice($this->id, (int)$row['id_product'], 0, false); // Rounding as per configurations - $row['total'] += Tools::processPriceRounding($unitPriceByProductTaxExcl, $row['cart_quantity']); - $row['total_wt'] += Tools::processPriceRounding($unitPriceByProductTaxIncl, $row['cart_quantity']); - - $row['price_wt'] = $row['price_with_reduction']; + $row['total'] = Tools::processPriceRounding($unitPriceByProductTaxExcl, $row['cart_quantity']); + $row['total_wt'] = Tools::processPriceRounding($unitPriceByProductTaxIncl, $row['cart_quantity']); } /*END*/ @@ -3863,7 +3861,7 @@ class CartCore extends ObjectModel $product['advanced_stock_management'] && (bool)Context::getContext()->customer->isLogged() && ($delivery = $this->getDeliveryOption()) && !empty($delivery)) { $product['stock_quantity'] = StockManager::getStockByCarrier((int)$product['id_product'], (int)$product['id_product_attribute'], $delivery); } - if (!$product['active'] || !$product['available_for_order'] + if (!$product['active'] || (!$product['auto_add_to_cart'] && !$product['available_for_order']) || (!$product['allow_oosp'] && $product['stock_quantity'] < $product['cart_quantity'])) { return $return_product ? $product : false; } diff --git a/classes/FreeOrder.php b/classes/FreeOrder.php new file mode 100644 index 000000000..8ec063499 --- /dev/null +++ b/classes/FreeOrder.php @@ -0,0 +1,35 @@ +displayName = $this->l('Free order'); + $this->payment_type = OrderPayment::PAYMENT_TYPE_ONLINE; + } +} \ No newline at end of file diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index 0765c063e..7eb52b11e 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -983,9 +983,6 @@ abstract class PaymentModuleCore extends Module } } - // delete cart feature prices after booking creation success - HotelRoomTypeFeaturePricing::deleteByIdCart($id_cart); - if (self::DEBUG_MODE) { PrestaShopLogger::addLog('PaymentModule::validateOrder - Hook validateOrder is about to be called', 1, null, 'Cart', (int)$id_cart, true); } @@ -1013,7 +1010,11 @@ abstract class PaymentModuleCore extends Module $new_history = new OrderHistory(); $new_history->id_order = (int)$order->id; $new_history->changeIdOrderState((int)$id_order_state, $order, true); - if ($send_mails) { + + // Emails regarding awaiting payment should not be sent to customers if the payment amount in the order is 0. + $sendOrderStatusMail = (($id_order_state == Configuration::get('PS_OS_AWAITING_REMOTE_PAYMENT') || $id_order_state == Configuration::get('PS_OS_AWAITING_PAYMENT')) && $order->total_paid > 0) ? true : false; + + if ($send_mails && $sendOrderStatusMail) { $new_history->addWithemail(true, $extra_vars); } else { $new_history->add(true); @@ -1389,6 +1390,9 @@ abstract class PaymentModuleCore extends Module } } // End foreach $order_detail_list + // delete cart feature prices after booking creation success + HotelRoomTypeFeaturePricing::deleteByIdCart($id_cart); + if (count($cart_rules)) { foreach ($cart_rules as $idCartRule => $cartRule) { diff --git a/classes/module/Module.php b/classes/module/Module.php index eee3a4a67..1cb0469d7 100644 --- a/classes/module/Module.php +++ b/classes/module/Module.php @@ -3191,8 +3191,6 @@ abstract class ModuleCore // Make a reflection of the override class and the module override class $overrideClassFileArray = file($overrideClassFilePath); - $moduleClassFileArray = array_diff($moduleClassFileArray, array("\n")); // remove empty lines from array - eval( preg_replace( array( @@ -3209,6 +3207,7 @@ abstract class ModuleCore $reflectionClassOverride = new ReflectionClass($overrideClassName.'Original_remove'.$uniq); $moduleClassFileArray = file($this->getLocalPath().'override/'.$parentClassFilePath); + $moduleClassFileArray = array_diff($moduleClassFileArray, array("\n")); // remove empty lines from array eval( preg_replace( array( diff --git a/classes/order/Order.php b/classes/order/Order.php index 99fab549f..d479ac256 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -2737,7 +2737,10 @@ class OrderCore extends ObjectModel $objHotelBooking = new HotelBookingDetail(); $objCurrentOrderState = $this->getCurrentOrderState(); - if ($objCurrentOrderState->id == Configuration::get('PS_OS_REFUND')) { + // if new status is partial payment then do not allow if no entry is done for the payment in that order + if (($objNewOrderState->id == Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED')) && $this->total_paid_real <= 0) { + $result['errors'][] = Tools::displayError('The order status cannot be changed to Partial payment received until at least one partial payment has been made for this order.'); + } elseif ($objCurrentOrderState->id == Configuration::get('PS_OS_REFUND')) { $result['errors'][] = Tools::displayError('Order status can not be changed once order status is set to Refunded.'); } elseif ($objCurrentOrderState->id == Configuration::get('PS_OS_CANCELED')) { $result['errors'][] = Tools::displayError('Order status can not be changed once order status is set to Cancelled.'); diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php index 491ce2686..e8203131f 100644 --- a/classes/pdf/HTMLTemplateInvoice.php +++ b/classes/pdf/HTMLTemplateInvoice.php @@ -473,7 +473,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate $num_days = $obj_htl_bk_dtl->getNumberOfDays($data_v['date_from'], $data_v['date_to']); $cart_htl_data[$type_key]['date_diff'][$date_join]['num_rm'] = 1; - $fullDate = ($this->context->controller->show_full_date && (date('Y-m-d', strtotime($data_v['date_from'])) == date('Y-m-d', strtotime($data_v['date_to']))) ? true : false); + $fullDate = (isset($this->context->controller->show_full_date) && $this->context->controller->show_full_date && (date('Y-m-d', strtotime($data_v['date_from'])) == date('Y-m-d', strtotime($data_v['date_to'])))) ? true : false; $cart_htl_data[$type_key]['date_diff'][$date_join]['data_form'] = Tools::displayDate($data_v['date_from'], null, $fullDate); $cart_htl_data[$type_key]['date_diff'][$date_join]['data_to'] = Tools::displayDate($data_v['date_to'], null, $fullDate); $cart_htl_data[$type_key]['date_diff'][$date_join]['num_days'] = $num_days; diff --git a/classes/webservice/WebserviceSpecificManagementBookings.php b/classes/webservice/WebserviceSpecificManagementBookings.php index cc4f720da..e1c58944e 100644 --- a/classes/webservice/WebserviceSpecificManagementBookings.php +++ b/classes/webservice/WebserviceSpecificManagementBookings.php @@ -3499,7 +3499,8 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We $orderData['date_to'], $orderData['id_room'], 0, - $useTax + $useTax, + null )) { $roomInfo['services'] = array(); foreach ($additionalServices as $additionalService) { diff --git a/classes/webservice/WebserviceSpecificManagementImages.php b/classes/webservice/WebserviceSpecificManagementImages.php index f22592428..6f3139e3a 100644 --- a/classes/webservice/WebserviceSpecificManagementImages.php +++ b/classes/webservice/WebserviceSpecificManagementImages.php @@ -305,6 +305,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage case 'stores': case 'features': case 'hotels': + case 'extra_services': case 'room_types': switch ($this->wsObject->urlSegment[1]) { case 'categories': @@ -325,6 +326,9 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage case 'room_types': $directory = _PS_PROD_IMG_DIR_; break; + case 'extra_services': + $directory = _PS_PROD_IMG_DIR_; + break; case 'hotels': $directory = _PS_HOTEL_IMG_DIR_; break; @@ -622,7 +626,6 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage } } $available_image_ids = array_unique($available_image_ids, SORT_NUMERIC); - if ($this->wsObject->urlSegment[3] != '') { if ($this->wsObject->urlSegment[3] == 'bin') { $hotelCoverImage = HotelImage::getCover($object_id); @@ -873,6 +876,9 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage if ($this->imageType == 'products') { $image = new Image((int)$this->wsObject->urlSegment[3]); return $image->delete(); + } if ($this->imageType == 'hotels') { + $image = new HotelImage((int)$this->wsObject->urlSegment[3]); + return $image->deleteImage(); } elseif ($filename_exists) { if (in_array($this->imageType, array('categories', 'manufacturers', 'suppliers', 'stores'))) { /** @var ObjectModel $object */ @@ -888,7 +894,6 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage break; // Add the image case 'POST': - if ($filename_exists) { throw new WebserviceException('This image already exists. To modify it, please use the PUT method', array(65, 400)); } else { @@ -1123,7 +1128,6 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage throw new WebserviceException('Please set an "image" parameter with image data for value', array(76, 400)); } } elseif ($this->wsObject->method == 'POST') { - if (isset($_FILES['image']['tmp_name']) && $_FILES['image']['tmp_name']) { $file = $_FILES['image']; @@ -1134,7 +1138,6 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage if ($error = ImageManager::validateUpload($file)) { throw new WebserviceException('Image upload error : '.$error, array(76, 400)); } - if (isset($file['tmp_name']) && $file['tmp_name'] != null) { if ($this->imageType == 'products') { $product = new Product((int)$this->wsObject->urlSegment[2]); @@ -1191,6 +1194,23 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage $this->output = $this->objOutput->renderEntity($image, 1); $image_content = array('sqlId' => 'content', 'value' => base64_encode(file_get_contents($this->imgToDisplay)), 'encode' => 'base64'); $this->output .= $this->objOutput->objectRender->renderField($image_content); + } if ($this->imageType == 'hotels') { + $objHotelBranchInfo = new HotelBranchInformation((int)$this->wsObject->urlSegment[2]); + if (!Validate::isLoadedObject($objHotelBranchInfo)) { + throw new WebserviceException('Hotel '.(int)$this->wsObject->urlSegment[2].' does not exist', array(76, 400)); + } + $objHotelImage = new HotelImage(); + $addedImage = $objHotelImage->uploadHotelImages($file, $objHotelBranchInfo->id); + if (isset($addedImage['id'])) { + $objHotelImage = new HotelImage($addedImage['id']); + $this->imgToDisplay = _PS_HOTEL_IMG_DIR_.$objHotelImage->getImagePath().'.'.$objHotelImage->image_format; + $this->objOutput->setFieldsToDisplay('full'); + $this->output = $this->objOutput->renderEntity($objHotelImage, 1); + $image_content = array('sqlId' => 'content', 'value' => base64_encode(file_get_contents($this->imgToDisplay)), 'encode' => 'base64'); + $this->output .= $this->objOutput->objectRender->renderField($image_content); + } else { + throw new WebserviceException('An error occurred during the image upload', array(76, 400)); + } } elseif (in_array($this->imageType, array('categories', 'manufacturers', 'suppliers', 'stores'))) { if (!($tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS')) || !move_uploaded_file($file['tmp_name'], $tmp_name)) { throw new WebserviceException('An error occurred during the image upload', array(76, 400)); diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php index 38d0d82c9..c8e20a62e 100644 --- a/controllers/admin/AdminCustomersController.php +++ b/controllers/admin/AdminCustomersController.php @@ -447,7 +447,6 @@ class AdminCustomersControllerCore extends AdminController 'type' => 'password', 'label' => $this->l('Password'), 'name' => 'passwd', - 'required' => ($obj->id ? false : true), 'col' => '4', 'hint' => ($obj->id ? $this->l('Leave this field blank if there\'s no change.') : sprintf($this->l('Password should be at least %s characters long.'), Validate::PASSWORD_LENGTH)) @@ -1088,6 +1087,10 @@ class AdminCustomersControllerCore extends AdminController // Check that the new email is not already in use $customer_email = trim(strval(Tools::getValue('email'))); $customer = new Customer(); + if (trim(Tools::getValue('passwd')) == '') { + $_POST['passwd'] = md5(time()._COOKIE_KEY_); + } + if (Validate::isEmail($customer_email)) { $customer->getByEmail($customer_email); if ($customer->id) { @@ -1097,10 +1100,6 @@ class AdminCustomersControllerCore extends AdminController } elseif (Customer::customerExists($customer_email, false, false)) { $this->errors[] = Tools::displayError('The email is already associated with a banned account. Please use a different one.'); $this->display = 'edit'; - } elseif (trim(Tools::getValue('passwd')) == '') { - $this->validateRules(); - $this->errors[] = Tools::displayError('Password can not be empty.'); - $this->display = 'edit'; } elseif ($customer = parent::processAdd()) { $this->context->smarty->assign('new_customer', $customer); return $customer; diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 761b3459a..051625e54 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -230,7 +230,7 @@ class AdminImportControllerCore extends AdminController 'no' => array('label' => $this->l('Ignore this column')), 'room_num' => array('label' => $this->l('Room No *'),), 'floor' => array('label' => $this->l('Floor')), - 'id_product' => array('label' => $this->l('Product ID *')), + 'id_product' => array('label' => $this->l('Room Type ID *')), 'id_status' => array( 'label' => $this->l('Room status (1/2/3)'), 'help' => $this->l('1 = Active, 2 = Inactive, 3 = Temporarily Inactive')), @@ -2039,7 +2039,7 @@ class AdminImportControllerCore extends AdminController } } else { $this->errors[] = sprintf( - Tools::displayError('Invalid ID Product for %1$s (ID: %2$s).'), + Tools::displayError('Invalid ID Room Type for %1$s (ID: %2$s).'), (isset($info['room_num']) && !empty($info['room_num']))? Tools::safeOutput($info['room_num']) : 'No Name', (isset($info['id']) && !empty($info['id']))? Tools::safeOutput($info['id']) : 'No ID' ); diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index feca42832..801f76a80 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -437,6 +437,7 @@ class AdminOrdersControllerCore extends AdminController 'langs' => Language::getLanguages(true, Context::getContext()->shop->id), 'payment_modules' => $payment_modules, 'payment_types' => $paymentTypes, + 'PAYMENT_TYPE_PAY_AT_HOTEL' => OrderPayment::PAYMENT_TYPE_PAY_AT_HOTEL, 'currency' => new Currency((int)$cart->id_currency), 'max_child_in_room' => Configuration::get('WK_GLOBAL_MAX_CHILD_IN_ROOM'), 'max_child_age' => Configuration::get('WK_GLOBAL_CHILD_MAX_AGE'), @@ -1750,18 +1751,15 @@ class AdminOrdersControllerCore extends AdminController // Set transaction ID $extraVars = $paymentTransactionId ? array('transaction_id' => $paymentTransactionId) : array(); } else { + $objPaymentModule = new FreeOrder(); // Set order state if ($objCart->is_advance_payment) { if ($advancePaymentAmount <= $orderTotal) { $idOrderState = Configuration::get('PS_OS_PARTIAL_PAYMENT_ACCEPTED'); } else { - $objPaymentModule->name = 'free_order'; - $objPaymentModule->displayName = $this->l('Free order'); $idOrderState = Configuration::get('PS_OS_PAYMENT_ACCEPTED'); } } else { - $objPaymentModule->name = 'free_order'; - $objPaymentModule->displayName = $this->l('Free order'); $idOrderState = Configuration::get('PS_OS_PAYMENT_ACCEPTED'); } @@ -6071,16 +6069,16 @@ class AdminOrdersControllerCore extends AdminController protected function getPaymentsTypes() { return array( - OrderPayment::PAYMENT_TYPE_ONLINE => array( - 'key' => 'PAYMENT_TYPE_ONLINE', - 'value' => OrderPayment::PAYMENT_TYPE_ONLINE, - 'name' => $this->l('Online') - ), OrderPayment::PAYMENT_TYPE_PAY_AT_HOTEL => array( 'key' => 'PAYMENT_TYPE_PAY_AT_HOTEL', 'value' => OrderPayment::PAYMENT_TYPE_PAY_AT_HOTEL, 'name' => $this->l('Pay at hotel') ), + OrderPayment::PAYMENT_TYPE_ONLINE => array( + 'key' => 'PAYMENT_TYPE_ONLINE', + 'value' => OrderPayment::PAYMENT_TYPE_ONLINE, + 'name' => $this->l('Online') + ), OrderPayment::PAYMENT_TYPE_REMOTE_PAYMENT => array( 'key' => 'PAYMENT_TYPE_REMOTE_PAYMENT', 'value' => OrderPayment::PAYMENT_TYPE_REMOTE_PAYMENT, @@ -6150,7 +6148,10 @@ class AdminOrdersControllerCore extends AdminController if ($deleted) { HotelRoomTypeFeaturePricing::deleteByIdCart($cart_id, $id_product, $room_id, $dt_frm, $dt_to ); $obj_product_process = new HotelCartBookingData(); - $num_cart_rooms = $obj_product_process->getCountRoomsByIdCartIdProduct($cart_id, $id_product, $dt_frm, $dt_to); + $num_cart_rooms = 0; + if ($rooms = $obj_hotel_cart_detail->getCartCurrentDataByCartId($cart_id)) { + $num_cart_rooms = count($rooms); + } $numDays = HotelHelper::getNumberOfDays($dt_frm, $dt_to); $changed = $obj_product_process->changeProductDataByRoomId($room_id, $id_product, $numDays, $cart_id); diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 80ac896f9..d31f6b3f4 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2959,21 +2959,21 @@ class AdminProductsControllerCore extends AdminController $data->assign('htl_full_info', $hotelFullInfo); $objRoomDisableDates = new HotelRoomDisableDates(); - $hotelRoomInfo = $objRoomInfo->getHotelRoomInfo($obj->id, $hotelRoomType['id_hotel']); - if ($hotelRoomInfo) { + if ($hotelRoomInfo = $objRoomInfo->getHotelRoomInfo($obj->id, $hotelRoomType['id_hotel'])) { foreach ($hotelRoomInfo as &$room) { $bookedDates = $objRoomInfo->getFutureBookings($room['id']); foreach($bookedDates as &$bookedDate) { $bookedDate['date_from_formatted'] = Tools::displayDate($bookedDate['date_from']); $bookedDate['date_to_formatted'] = Tools::displayDate($bookedDate['date_to']); } - $room['booked_dates'] = json_encode($bookedDates); + $room['booked_dates'] = $bookedDates; if ($room['id_status'] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) { $disableDates = $objRoomDisableDates->getRoomDisableDates($room['id']); $room['disable_dates_json'] = json_encode($disableDates); } } + $data->assign('htl_room_info', $hotelRoomInfo); } } @@ -3556,7 +3556,7 @@ class AdminProductsControllerCore extends AdminController $this->errors[] = sprintf(Tools::displayError('Please add disable dates for room %s.'), $roomIndex); } } - Hook::exec('actionValidateRoomInformation', array('room_information', $roomInfo)); + Hook::exec('actionValidateRoomInformation', array('room_information' => $roomInfo)); } } else { $this->errors[] = Tools::displayError('Please add at least one room.'); @@ -5070,7 +5070,7 @@ class AdminProductsControllerCore extends AdminController 'date_to' => $dateTo, 'id_room' => $idRoom ); - Hook::exec('actionRoomDisableDatesRemoveBefore', array('disable_dates', $params)); + Hook::exec('actionRoomDisableDatesRemoveBefore', array('disable_dates' => $params)); if (empty($this->errors) && ($disableDates = $objRoomDisableDates->checkIfRoomAlreadyDisabled($params)) ) { @@ -5150,7 +5150,7 @@ class AdminProductsControllerCore extends AdminController $response = array('status' => false); if ($this->tabAccess['edit'] === '1') { $idDisableDate = Tools::getValue('id_disable_date'); - Hook::exec('actionDisableDateDeleteBefore', array('id_disable_date', $idDisableDate)); + Hook::exec('actionDisableDateDeleteBefore', array('id_disable_date' => $idDisableDate)); if (empty($this->errors) && (int) $idDisableDate && Validate::isLoadedObject($objRoomDisableDates = new HotelRoomDisableDates($idDisableDate)) diff --git a/controllers/front/GuestTrackingController.php b/controllers/front/GuestTrackingController.php index bd8307d8f..4ab0a4dd0 100644 --- a/controllers/front/GuestTrackingController.php +++ b/controllers/front/GuestTrackingController.php @@ -608,31 +608,30 @@ class GuestTrackingControllerCore extends FrontController // load Google Maps library if configured if (!count($this->errors)) { - $ordersCollection = Order::getByReference(Tools::getValue('order_reference')); - if ($objOrder = $ordersCollection->getFirst()) { - if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder($objOrder->id)) { - $objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id); - if (Validate::isLoadedObject($objHotelBranchInformation)) { - if (($apiKey = Configuration::get('PS_API_KEY')) - && Configuration::get('WK_GOOGLE_ACTIVE_MAP') - ) { - if (floatval($objHotelBranchInformation->latitude) != 0 - && floatval($objHotelBranchInformation->longitude) != 0 + if ($ordersCollection = Order::getByReference(Tools::getValue('order_reference'))) { + foreach ($ordersCollection as $objOrder) { + if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder($objOrder->id)) { + $objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id); + if (Validate::isLoadedObject($objHotelBranchInformation)) { + if (($apiKey = Configuration::get('PS_API_KEY')) + && Configuration::get('WK_GOOGLE_ACTIVE_MAP') ) { - Media::addJsDef(array( - 'hotel_location' => array( - 'latitude' => $objHotelBranchInformation->latitude, - 'longitude' => $objHotelBranchInformation->longitude, - 'map_input_text' => $objHotelBranchInformation->map_input_text, - ), - 'hotel_name' => $objHotelBranchInformation->hotel_name, - 'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')) - )); + if (floatval($objHotelBranchInformation->latitude) != 0 + && floatval($objHotelBranchInformation->longitude) != 0 + ) { + Media::addJsDef(array( + 'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')), + 'initiateMap' => 1, + )); - $this->addJS( - 'https://maps.googleapis.com/maps/api/js?key='.$apiKey.'&libraries=places&language='. - $this->context->language->iso_code.'®ion='.$this->context->country->iso_code - ); + $this->addJS( + 'https://maps.googleapis.com/maps/api/js?key='.$apiKey.'&libraries=places&language='. + $this->context->language->iso_code.'®ion='.$this->context->country->iso_code + ); + + // just need to load the map once for the first order with map details. So break the loop. + break; + } } } } diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php index 5e1da2853..3b15a99b6 100644 --- a/controllers/front/OrderDetailController.php +++ b/controllers/front/OrderDetailController.php @@ -805,13 +805,8 @@ class OrderDetailControllerCore extends FrontController && floatval($objHotelBranchInformation->longitude) != 0 ) { Media::addJsDef(array( - 'hotel_location' => array( - 'latitude' => $objHotelBranchInformation->latitude, - 'longitude' => $objHotelBranchInformation->longitude, - 'map_input_text' => $objHotelBranchInformation->map_input_text, - ), - 'hotel_name' => $objHotelBranchInformation->hotel_name, - 'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')) + 'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')), + 'initiateMap' => 1, )); $this->addJS( diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php index 61b602ec3..f551646e1 100644 --- a/controllers/front/OrderOpcController.php +++ b/controllers/front/OrderOpcController.php @@ -126,7 +126,7 @@ class OrderOpcControllerCore extends ParentOrderController } elseif (Tools::strlen($phone) > $rules['size']['phone']) { $this->errors[] = sprintf(Tools::displayError('Mobile phone number is too long. (%s chars max).'), $rules['size']['phone']); } else { - $this->context->customer = $phone; + $this->context->customer->phone = $phone; } $_POST['lastname'] = $_POST['customer_lastname']; @@ -692,7 +692,7 @@ class OrderOpcControllerCore extends ParentOrderController 'id_country' => (int)$address_delivery->id_country, 'id_state' => (int)$address_delivery->id_state, 'id_gender' => (int)$customer->id_gender, - 'phone' => (int)$customer->phone, + 'phone' => $customer->phone, 'sl_year' => $birthday[0], 'sl_month' => $birthday[1], 'sl_day' => $birthday[2], diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index 02e5665e3..2a0542b78 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -24,16 +24,6 @@ * International Registered Trademark & Property of PrestaShop SA */ -/** - * Class FreeOrder to use PaymentModule (abstract class, cannot be instancied) - */ -class FreeOrder extends PaymentModule -{ - public $active = 1; - public $name = 'free_order'; - public $displayName = 'free_order'; -} - class ParentOrderControllerCore extends FrontController { public $ssl = true; @@ -187,7 +177,7 @@ class ParentOrderControllerCore extends FrontController $orderStatus = Configuration::get('PS_OS_PAYMENT_ACCEPTED'); } - $order->validateOrder($this->context->cart->id, $orderStatus, 0, Tools::displayError('Free order', false), null, array(), null, false, $this->context->cart->secure_key); + $order->validateOrder($this->context->cart->id, $orderStatus, 0, $order->displayName, null, array(), null, false, $this->context->cart->secure_key); return (int)Order::getOrderByCartId($this->context->cart->id); } return false; diff --git a/docs/csv_import/room_types_import.csv b/docs/csv_import/room_types_import.csv index a2cec3792..6d3588d93 100644 --- a/docs/csv_import/room_types_import.csv +++ b/docs/csv_import/room_types_import.csv @@ -1,3 +1,3 @@ -Product ID;Active(0/1);Name;Hotel ID;Pre-Tax Retail Price;Pre-Tax Operating Cost;Tax Rule ID;Allow Advance Payment;Room Type Advance Payement (0/1/2);Advance Payment Value;Include Tax With Advance Payment;Minimum Lenght Of Stay;Maximum Lenght Of Stay;Base Adults;Base Children;Maximum Adults;Maximum Children;Maximmum Guest;Show At Front;Additional Facilities IDs;Service Products IDs (x, y, z...);Feature IDs (x, y, z...);Short Description;Description;Meta Title;Meta Keywords;Meta Description;URL Rewritten;Image URLs (x,y,z...);Delete Existing Images (0 = No, 1 = Yes) +ID;Active(0/1);Name;Hotel ID;Pre-Tax Retail Price;Pre-Tax Operating Cost;Tax Rule ID;Allow Advance Payment;Room Type Advance Payement (0/1/2);Advance Payment Value;Include Tax With Advance Payment;Minimum Lenght Of Stay;Maximum Lenght Of Stay;Base Adults;Base Children;Maximum Adults;Maximum Children;Maximmum Guest;Show At Front;Additional Facilities IDs;Service Products IDs (x, y, z...);Feature IDs (x, y, z...);Short Description;Description;Meta Title;Meta Keywords;Meta Description;URL Rewritten;Image URLs (x,y,z...);Delete Existing Images (0 = No, 1 = Yes) 6;1;The Sunshine Luxury;1;2200;0;1;1;1;10;0;1;0;2;0;2;2;4;1;1;12;1,2,3,4;The Sunshine Luxury;The Sunshine Luxury;;;;the-sunshine-luxury;http://localhost/hotelcommerce/img/p/4/4.jpg;0 10;1;King Premium Rooms;1;3200;0;1;;0;;;2;7;2;0;2;2;4;1;;;1,2,3,4;King Premium Rooms;King Premium Rooms;;;;king-premium-rooms;http://localhost/hotelcommerce/img/p/3/3.jpg;0 \ No newline at end of file diff --git a/docs/csv_import/rooms_import.csv b/docs/csv_import/rooms_import.csv index bfdc520db..32b646fd7 100644 --- a/docs/csv_import/rooms_import.csv +++ b/docs/csv_import/rooms_import.csv @@ -1,3 +1,3 @@ -Room No;Floor;Product ID;Room Status (1 = Active, 2 = Inactive, 3 = Temporarily Inactive);Extra Information;Disabled Dates And Reason Incase Of Temporary Inactive +Room No;Floor;Room Type ID;Room Status (1 = Active, 2 = Inactive, 3 = Temporarily Inactive);Extra Information;Disabled Dates And Reason Incase Of Temporary Inactive GR-109;First;1;3;Newly added room;2024-01-01:2024-01-02:Reason1, 2023-02-03:2023-02-02:Reason2 DR-107;First;2;1;; \ No newline at end of file diff --git a/install/langs/cs/data/cms.xml b/install/langs/cs/data/cms.xml index abe8104a0..2d6256361 100644 --- a/install/langs/cs/data/cms.xml +++ b/install/langs/cs/data/cms.xml @@ -130,7 +130,7 @@ terms-and-conditions-of-use - + Právní upozornění Právní upozornění upozornění, právní, autorská práva diff --git a/install/langs/it/data/cms.xml b/install/langs/it/data/cms.xml index ae2d826eb..c392da25b 100644 --- a/install/langs/it/data/cms.xml +++ b/install/langs/it/data/cms.xml @@ -93,7 +93,7 @@ note-legali - + Condizioni d'Uso Le nostre Condizioni d'Uso condizioni, termini, utilizzo, vendita diff --git a/install/langs/vn/data/cms.xml b/install/langs/vn/data/cms.xml index d77e5f1fd..c18ab1c8b 100644 --- a/install/langs/vn/data/cms.xml +++ b/install/langs/vn/data/cms.xml @@ -94,7 +94,7 @@ legal-notice - + Điều khoản và Điều kiện Điều khoản và điều kiện của chúng tôi điều khoản, điều kiện, sử dụng, bán hàng diff --git a/install/theme/img/visu_foBlock.png b/install/theme/img/visu_foBlock.png index 60ba7761a..7f9b1ff89 100644 Binary files a/install/theme/img/visu_foBlock.png and b/install/theme/img/visu_foBlock.png differ diff --git a/js/admin/reallocation.js b/js/admin/reallocation.js index 21846b804..130e03c7c 100644 --- a/js/admin/reallocation.js +++ b/js/admin/reallocation.js @@ -87,7 +87,7 @@ const RoomReallocationModal = { // For Rooms Swapping var json_arr_rm_swp = roomObj.data('avail_rm_swap'); - if (roomObj.data('avail_rm_swap') != 'false' && json_arr_rm_swp.length != 0) { + if (json_arr_rm_swp != false && json_arr_rm_swp.length != 0) { html = ''; $.each(json_arr_realloc_room_types, function(key, room_type) { diff --git a/modules/hotelreservationsystem/classes/HotelBookingDemands.php b/modules/hotelreservationsystem/classes/HotelBookingDemands.php index f4f51bbef..416ec2d67 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDemands.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDemands.php @@ -103,8 +103,8 @@ class HotelBookingDemands extends ObjectModel $sql .= ' AND hb.`id_room`='.(int)$idRoom; } if ($dateFrom && $dateTo) { - $dateFrom = date('Y-m-d', strtotime($dateFrom)); - $dateTo = date('Y-m-d', strtotime($dateTo)); + $dateFrom = date('Y-m-d H:i:s', strtotime($dateFrom)); + $dateTo = date('Y-m-d H:i:s', strtotime($dateTo)); $sql .= ' AND hb.`date_from`=\''.pSQL($dateFrom).'\' AND hb.`date_to`= \''.pSQL($dateTo).'\''; } diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 9e830293a..efe6f80f8 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -2377,8 +2377,12 @@ class HotelBookingDetail extends ObjectModel if (Validate::isLoadedObject($objHotelCartBookingFrom = new HotelCartBookingData($cartBookingInfoFrom['id'])) && Validate::isLoadedObject($objHotelCartBookingTo = new HotelCartBookingData($cartBookingInfoTo['id'])) ) { - $objHotelCartBookingFrom->id_room = $objHotelCartBookingTo->id_room; - $objHotelCartBookingTo->id_room = $objHotelCartBookingFrom->id_room; + $idRoomFrom = $objHotelCartBookingFrom->id_room; + $idRoomTo = $objHotelCartBookingTo->id_room; + + $objHotelCartBookingFrom->id_room = $idRoomTo; + $objHotelCartBookingTo->id_room = $idRoomFrom; + $result &= $objHotelCartBookingFrom->save(); $result &= $objHotelCartBookingTo->save(); } @@ -2404,7 +2408,6 @@ class HotelBookingDetail extends ObjectModel $result &= $objHotelBookingFrom->save(); $result &= $objHotelBookingTo->save(); - if ($result) { Hook::exec( 'actionRoomSwapAfter', diff --git a/modules/hotelreservationsystem/classes/HotelCartBookingData.php b/modules/hotelreservationsystem/classes/HotelCartBookingData.php index 3ee7aad41..a815b384d 100644 --- a/modules/hotelreservationsystem/classes/HotelCartBookingData.php +++ b/modules/hotelreservationsystem/classes/HotelCartBookingData.php @@ -1032,9 +1032,7 @@ class HotelCartBookingData extends ObjectModel $preparationTime = HotelOrderRestrictDate::getPreparationTime($roomData['id_hotel']); if ($preparationTime !== false) { $minOrderDate = date('Y-m-d', strtotime('+'. ($preparationTime) .' days')); - if (strtotime($minOrderDate) > strtotime($roomData['date_from']) - || strtotime($minOrderDate . ' +1 day')> strtotime($roomData['date_to']) - ) { + if (strtotime($minOrderDate) > strtotime($roomData['date_from'])) { $objHotelBranchInformation = new HotelBranchInformation( $roomData['id_hotel'], $context->language->id diff --git a/modules/hotelreservationsystem/classes/WebserviceSpecificManagementHotelAri.php b/modules/hotelreservationsystem/classes/WebserviceSpecificManagementHotelAri.php index 38ae522d4..65f064afc 100644 --- a/modules/hotelreservationsystem/classes/WebserviceSpecificManagementHotelAri.php +++ b/modules/hotelreservationsystem/classes/WebserviceSpecificManagementHotelAri.php @@ -270,11 +270,18 @@ class WebserviceSpecificManagementHotelAri extends ObjectModel implements Webser if (count($roomType['data']['unavailable'])) { foreach ($roomType['data']['unavailable'] as $unavailableRooms) { foreach ($unavailableRooms['detail'] as $unavailableDetail) { - for ($currentDate = date('Y-m-d', strtotime($unavailableDetail['date_from'])); - $currentDate < date('Y-m-d', strtotime($unavailableDetail['date_to'])); + if ($unavailableDetail['date_from'] && $unavailableDetail['date_to']) { + $startDate = date('Y-m-d', strtotime($unavailableDetail['date_from'])); + $endDate = date('Y-m-d', strtotime($unavailableDetail['date_to'])); + } else { + $startDate = $bookingParams['date_from']; + $endDate = $bookingParams['date_to']; + } + for ($currentDate = $startDate; + $currentDate < $endDate; $currentDate = date('Y-m-d', strtotime('+1 day', strtotime($currentDate))) ) { - $unavailableDates[$currentDate][$roomType['id_product']][$bookedRoom['id_room']] = $bookedRoom['id_room']; + $unavailableDates[$currentDate][$roomType['id_product']][$unavailableRooms['id_room']] = $unavailableRooms['id_room']; } } } @@ -328,12 +335,12 @@ class WebserviceSpecificManagementHotelAri extends ObjectModel implements Webser unset($roomDetail['available']); } if ($getUnavai) { - $ariDateInfo['total_unavailable_rooms'] += count($roomDetail['available']); + $ariDateInfo['total_unavailable_rooms'] += count($roomDetail['unavailable']); } else { unset($roomDetail['unavailable']); } if ($getBooked) { - $ariDateInfo['total_booked_rooms'] += count($roomDetail['available']); + $ariDateInfo['total_booked_rooms'] += count($roomDetail['booked']); } else { unset($roomDetail['booked']); } diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php index b13a3037b..637f0d59d 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php @@ -88,6 +88,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $this->context->cart->save(); $this->context->cookie->id_cart = (int) $this->context->cart->id; + $this->context->cookie->write(); } public function postProcess() diff --git a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php index 4c889b751..315dfeb1b 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php @@ -34,11 +34,12 @@ class AdminOrderRefundRequestsController extends ModuleAdminController $this->_orderWay = 'DESC'; if ($idOrder = Tools::getValue('id_order')) { - $this->_select .= ', orsl.`name` as `status_name`, ors.`color`'; + $this->_select .= ', orsl.`name` as `status_name`, ors.`color`, COUNT(ordrd.`id_order_return_detail`) as num_rooms'; $this->_join .= 'LEFT JOIN '._DB_PREFIX_.'order_return_state ors ON (ors.`id_order_return_state` = a.`state`)'; $this->_join .= 'LEFT JOIN '._DB_PREFIX_.'order_return_state_lang orsl ON (orsl.`id_order_return_state` = a.`state` AND orsl.`id_lang` = '.(int)$this->context->language->id.')'; + $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'order_return_detail` ordrd ON (a.`id_order_return` = ordrd.`id_order_return`)'; $this->_where = ' AND a.`id_order`='. (int)$idOrder; - $this->_group = ''; + $this->_group = 'GROUP BY a.`id_order_return`'; } else { $this->_select .= ', ord.`total_paid_tax_incl` AS total_order, os.`id_order_state`, os.`color`, COUNT(IF(a.`state` = '.(int) Configuration::get('PS_ORS_PENDING').', 1, NULL)) AS total_pending_requests, SUM(a.`refunded_amount`) AS refunded_amount'; $this->_join .= 'LEFT JOIN '._DB_PREFIX_.'order_state os ON (os.`id_order_state` = ord.`current_state`)'; @@ -79,6 +80,11 @@ class AdminOrderRefundRequestsController extends ModuleAdminController 'havingFilter' => true, 'callback' => 'setCustomerLink', ); + $this->fields_list['num_rooms'] = array( + 'title' => $this->l('Total Rooms'), + 'align' => 'center', + 'havingFilter' => true, + ); $this->fields_list['refunded_amount'] = array( 'title' => $this->l('Refunded Amount'), 'align' => 'center', diff --git a/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl b/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl index efa12371a..3dae5cd89 100644 --- a/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl @@ -81,6 +81,14 @@ {displayPrice price=$orderTotalPaid currency=$orderInfo['id_currency']} +
+
+ {l s='Total rooms' mod='hotelreservationsystem'} : +
+
+ {$refundReqBookings|count} +
+
{l s='Way of payment' mod='hotelreservationsystem'} : diff --git a/modules/wkhotelroom/wkhotelroom.php b/modules/wkhotelroom/wkhotelroom.php index 89a025c39..6fc995a72 100644 --- a/modules/wkhotelroom/wkhotelroom.php +++ b/modules/wkhotelroom/wkhotelroom.php @@ -69,7 +69,7 @@ class WkHotelRoom extends Module $idProduct, $dateFrom, $dateTo, - $useTax, + 1, 0, 0, 0, diff --git a/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js b/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js index d0698fa3e..5a9b17ee5 100644 --- a/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js +++ b/themes/hotel-reservation-theme/js/modules/blockcart/ajax-cart.js @@ -939,7 +939,7 @@ var ajaxCart = { content += '' + date_diff_v.num_rm + ''; content += '' + formatCurrency(parseFloat(date_diff_v.amount) + parseFloat(date_diff_v.demand_price), currency_format, currency_sign, currency_blank) + ''; content += ''; - content += ''; + content += ''; content += ''; content += ''; }); diff --git a/themes/hotel-reservation-theme/js/order-detail.js b/themes/hotel-reservation-theme/js/order-detail.js index ff9f5c340..69aa98360 100644 --- a/themes/hotel-reservation-theme/js/order-detail.js +++ b/themes/hotel-reservation-theme/js/order-detail.js @@ -134,12 +134,11 @@ function initRefundDeniedTooltip() { } function initMap() { - const hotelLocation = { - lat: Number(hotel_location.latitude), - lng: Number(hotel_location.longitude), - }; - $('.booking-hotel-map-container').each(function (i, element) { + const hotelLocation = { + lat: Number($(this).attr('latitude')), + lng: Number($(this).attr('longitude')), + }; const map = new google.maps.Map(element, { zoom: 10, center: hotelLocation, @@ -150,16 +149,16 @@ function initMap() { const marker = new google.maps.Marker({ position: hotelLocation, map: map, - title: hotel_name, + title: $(this).attr('title'), icon: PS_STORES_ICON }); marker.addListener('click', function() { let query = ''; - if (hotel_location.map_input_text != '') { - query = hotel_location.map_input_text; + if ($(this).attr('query') != '') { + query = $(this).attr('query'); } else { - query = hotel_location.latitude + ',' + hotel_location.longitude; + query = $(this).attr('latitude') + ',' + $(this).attr('longitude'); } window.open('https://www.google.com/maps/search/?api=1&query='+encodeURIComponent(query), '_blank'); @@ -377,7 +376,8 @@ $(document).ready(function () { if (typeof google === 'object' && typeof google.maps === 'object' - && typeof hotel_location === 'object' + && typeof initiateMap !== 'undefined' + && initiateMap === 1 ) { initMap(); } diff --git a/themes/hotel-reservation-theme/order-detail.tpl b/themes/hotel-reservation-theme/order-detail.tpl index b2f89be2e..9ac445d81 100644 --- a/themes/hotel-reservation-theme/order-detail.tpl +++ b/themes/hotel-reservation-theme/order-detail.tpl @@ -177,7 +177,13 @@ {if ($obj_hotel_branch_information->latitude|floatval != 0 && $obj_hotel_branch_information->longitude|floatval != 0) && $view_on_map}
-
+
+
{/if} @@ -626,7 +632,13 @@ {if ($obj_hotel_branch_information->latitude|floatval != 0 && $obj_hotel_branch_information->longitude|floatval != 0) && $view_on_map}
-
+
+
{/if} diff --git a/themes/hotel-reservation-theme/preview.jpg b/themes/hotel-reservation-theme/preview.jpg index 885343343..205745eda 100644 Binary files a/themes/hotel-reservation-theme/preview.jpg and b/themes/hotel-reservation-theme/preview.jpg differ