Merge branch 'develop' into gli-2721
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
<span class="message-date"> <i class="icon-calendar"></i> - {dateFormat date=$message.date_add full=0} - <i class="icon-time"></i> {$message.date_add|substr:11:5}</span>
|
||||
{if $message.private}<span class="badge badge-info">{l s='Private'}</span>{/if}
|
||||
{if isset($message.file_name)} <span class="message-product"> <i class="icon-link"></i> <a href="{$message.file_name|escape:'html':'UTF-8'}" class="_blank">{l s="Attachment"}</a></span>{/if}
|
||||
{if isset($message.product_name)} <span class="message-attachment"> <i class="icon-book"></i> <a href="{$message.product_link|escape:'html':'UTF-8'}" class="_blank">{l s="Room type:"} {$message.product_name|escape:'html':'UTF-8'} </a></span>{/if}
|
||||
{if isset($message.product_name)} <span class="message-attachment"> <i class="icon-book"></i> <a href="{$message.product_link|escape:'html':'UTF-8'}" class="_blank">{if isset($message.booking_product) && $message.booking_product}{l s="Room type:"}{else}{l s="Product:"}{/if} {$message.product_name|escape:'html':'UTF-8'} </a></span>{/if}
|
||||
<p class="message-item-text">{$message.message|escape:'html':'UTF-8'|nl2br}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -257,37 +257,6 @@
|
||||
}
|
||||
return typeIsPack;
|
||||
}
|
||||
$("#product_form").validate({
|
||||
ignore: '.updateCurrentText',
|
||||
rules: {
|
||||
inputPackItems: {
|
||||
required: {
|
||||
depends: checkIfProductTypeIsPack
|
||||
},
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
inputPackItems: {
|
||||
required: ""
|
||||
}
|
||||
},
|
||||
// override jquery validate plugin defaults for bootstrap 3
|
||||
highlight: function(element) {
|
||||
$(element).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function(element) {
|
||||
$(element).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
errorElement: 'span',
|
||||
errorClass: 'help-block',
|
||||
errorPlacement: function(error, element) {
|
||||
if(element.parent('.input-group').length) {
|
||||
error.insertAfter(element.parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="">{(int)$product['quantity']}</span>
|
||||
{if $product['allow_multiple_quantity']}<span class="">{(int)$product['quantity']}</span>{else}--{/if}
|
||||
</td>
|
||||
<td class="unit_price_tax_excl">
|
||||
<p>{displayPrice price=$product.total_price_tax_excl currency=$currency->id}</p>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="">{(int)$product['quantity']}</span>
|
||||
{if $product['allow_multiple_quantity']}<span class="">{(int)$product['quantity']}</span>{else}--{/if}
|
||||
</td>
|
||||
<td class="unit_price_tax_excl">
|
||||
<p>{displayPrice price=$product.total_price_tax_excl currency=$currency->id}</p>
|
||||
|
||||
@@ -1751,6 +1751,7 @@
|
||||
$('#room_type_services_desc').show();
|
||||
$('#add_new_room_services_block').hide();
|
||||
$('#back_to_service_btn').hide();
|
||||
$('#btn_new_room_service').show();
|
||||
});
|
||||
|
||||
// Add new custom service: Show hide new custom service form
|
||||
@@ -1758,6 +1759,7 @@
|
||||
$('#add_new_room_services_block').show();
|
||||
$('#back_to_service_btn').show();
|
||||
$('#room_type_services_desc').hide();
|
||||
$('#btn_new_room_service').hide();
|
||||
});
|
||||
|
||||
// Add new custom service: change auto added option
|
||||
|
||||
@@ -749,7 +749,12 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Request ID'}</th>
|
||||
<th>{l s='Total Rooms'}</th>
|
||||
{if isset($refundReqBookings) && $refundReqBookings}
|
||||
<th>{l s='Total Rooms'}</th>
|
||||
{/if}
|
||||
{if isset($refundReqProducts) && $refundReqProducts}
|
||||
<th>{l s='Total Products'}</th>
|
||||
{/if}
|
||||
<th>{l s='Requested Date'}</th>
|
||||
<th>{l s='Status'}</th>
|
||||
</tr>
|
||||
@@ -760,9 +765,12 @@
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminOrderRefundRequests')}&vieworder_return&id_order_return={$return_info.id_order_return}" target="_blank">#{$return_info.id_order_return}</a>
|
||||
</td>
|
||||
<td>
|
||||
{$return_info.total_rooms|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
{if isset($refundReqBookings) && $refundReqBookings}
|
||||
<td>{$return_info.total_rooms}</td>
|
||||
{/if}
|
||||
{if isset($refundReqProducts) && $refundReqProducts}
|
||||
<td>{$return_info.total_products}</td>
|
||||
{/if}
|
||||
<td>
|
||||
{$return_info.date_add}
|
||||
</td>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<input type="checkbox" name="id_service_product_order_detail[]" value="{$product.id_service_product_order_detail|escape:'html':'UTF-8'}"/>
|
||||
</td>
|
||||
<td><b>{$product.name|escape:'html':'UTF-8'}{if $product.option_name} : {$product.option_name|escape:'html':'UTF-8'}{/if}</b></td>
|
||||
<td>{$product.quantity|escape:'html':'UTF-8'}</td>
|
||||
<td>{if $product.allow_multiple_quantity}{$product.quantity|escape:'html':'UTF-8'}{else}--{/if}</td>
|
||||
<td>{convertPriceWithCurrency price=$product.total_price_tax_incl currency=$currency->id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
@@ -78,13 +78,10 @@
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
<input type="text" class="form-control unit_price" value="{Tools::ps_round($service['unit_price_tax_excl'], 2)}" data-id-product="{$service['id_product']}" name="service_price[{$service['id_service_product_order_detail']}]">
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.product_price_calculation_method}
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.price_calculation_method}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{* {if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{l s='/ night'}
|
||||
{/if} *}
|
||||
</td>
|
||||
<td>{displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency}</td>
|
||||
<td class="text-right"><a class="btn btn-danger pull-right del_room_additional_service" data-id_service_product_order_detail="{$service['id_service_product_order_detail']}" href="#"><i class="icon-trash"></i></a></td>
|
||||
@@ -150,7 +147,7 @@
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
<input type="text" class="form-control unit_price" name="service_price[{$product['id_product']|escape:'html':'UTF-8'}]" value="{$product['price_tax_exc']}" data-id-product="{$product.id_product}">
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['product_price_calculation_method']}
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['price_calculation_method']}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -274,7 +271,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{displayPrice price=$service['unit_price_tax_excl'] currency=$orderCurrency}
|
||||
{if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{if $service['price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{l s='/ night'}
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* @license LICENSE.txt
|
||||
*}
|
||||
|
||||
{l s='This room already has a booking for the selected date range.'}
|
||||
{sprintf({l s='The room "%s" already has a booking for the selected date range.'}, $orderDetails->room_num)}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<span class="error_message_label">{l s='Order ID'}:</span> <a href="{$link->getAdminLink('AdminOrders')}&id_order={$orderDetails->id_order}&vieworder" target="_blank"><strong>#{$orderDetails->id_order|intval}</strong></a>
|
||||
|
||||
@@ -1238,6 +1238,7 @@
|
||||
};
|
||||
|
||||
$('#page-loader').show();
|
||||
$('[name="submitBulkCreateRooms"]').attr('disabled', 'disable');
|
||||
$.ajax({
|
||||
url: prod_link,
|
||||
type: 'POST',
|
||||
@@ -1253,6 +1254,7 @@
|
||||
},
|
||||
complete: function() {
|
||||
$('#page-loader').hide();
|
||||
$('[name="submitBulkCreateRooms"]').attr('disabled', false);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
131
classes/Cart.php
131
classes/Cart.php
@@ -1034,7 +1034,7 @@ class CartCore extends ObjectModel
|
||||
$shop = Context::getContext()->shop;
|
||||
}
|
||||
|
||||
if (Context::getContext()->customer->id) {
|
||||
if (!empty(Context::getContext()->customer->id)) {
|
||||
if ($id_address_delivery == 0 && (int)$this->id_address_delivery) { // The $id_address_delivery is null, use the cart delivery address
|
||||
$id_address_delivery = $this->id_address_delivery;
|
||||
} elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) { // The $id_address_delivery must be linked with customer
|
||||
@@ -2432,7 +2432,7 @@ class CartCore extends ObjectModel
|
||||
$array[$selectedProduct['id_room_type_hotel']]['total_price_tax_incl'] += $selectedProduct['total_price_tax_incl'];
|
||||
} else {
|
||||
$array[$selectedProduct['id_room_type_hotel']] = array(
|
||||
'quantity' => 0,
|
||||
'quantity' => $selectedProduct['quantity'],
|
||||
'id_hotel' => $selectedProduct['id_room_type_hotel'],
|
||||
'total_price_tax_excl' => $selectedProduct['total_price_tax_excl'],
|
||||
'total_price_tax_incl' => $selectedProduct['total_price_tax_incl'],
|
||||
@@ -2452,35 +2452,37 @@ class CartCore extends ObjectModel
|
||||
}
|
||||
}
|
||||
|
||||
foreach($array as $selectedProduct) {
|
||||
$product['cart_quantity'] = $selectedProduct['quantity'];
|
||||
$product['total'] = $selectedProduct['total_price_tax_excl'];
|
||||
$product['total_wt'] = $selectedProduct['total_price_tax_incl'];
|
||||
$product['price_wt'] = $selectedProduct['total_price_tax_incl'] / $selectedProduct['quantity'];
|
||||
$product['price'] = $selectedProduct['total_price_tax_excl'] / $selectedProduct['quantity'];
|
||||
$product['id_hotel'] = $selectedProduct['id_hotel'];
|
||||
$product['id_room_type'] = $selectedProduct['id_room_type'];
|
||||
$product['id_hotel_cart_booking'] = $selectedProduct['id_hotel_cart_booking'];
|
||||
$productinfo = $product;
|
||||
$productinfo['selling_preference_type'] = Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['product_list'][] = $productinfo;
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_hotel'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['id_hotel'] = $selectedProduct['id_hotel'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'] = $product['carrier_list'];
|
||||
} else {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'] = array_intersect($orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'], $product['carrier_list']);
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['warehouse_list'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['warehouse_list'] = $package['warehouse_list'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_warehouse'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['id_warehouse'] = $package['id_warehouse'];
|
||||
}
|
||||
if (isset($package['id_carrier'])) {
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['id_carrier'] = $package['id_carrier'];
|
||||
if ($array) {
|
||||
foreach($array as $selectedProduct) {
|
||||
$product['cart_quantity'] = $selectedProduct['quantity'];
|
||||
$product['total'] = $selectedProduct['total_price_tax_excl'];
|
||||
$product['total_wt'] = $selectedProduct['total_price_tax_incl'];
|
||||
$product['price_wt'] = $selectedProduct['total_price_tax_incl'] / $selectedProduct['quantity'];
|
||||
$product['price'] = $selectedProduct['total_price_tax_excl'] / $selectedProduct['quantity'];
|
||||
$product['id_hotel'] = $selectedProduct['id_hotel'];
|
||||
$product['id_room_type'] = $selectedProduct['id_room_type'];
|
||||
$product['id_hotel_cart_booking'] = $selectedProduct['id_hotel_cart_booking'];
|
||||
$productinfo = $product;
|
||||
$productinfo['selling_preference_type'] = Product::SELLING_PREFERENCE_WITH_ROOM_TYPE;
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['product_list'][] = $productinfo;
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_hotel'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['id_hotel'] = $selectedProduct['id_hotel'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'] = $product['carrier_list'];
|
||||
} else {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'] = array_intersect($orderPackage[$id_address][$selectedProduct['id_hotel']]['carrier_list'], $product['carrier_list']);
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['warehouse_list'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['warehouse_list'] = $package['warehouse_list'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_warehouse'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['id_warehouse'] = $package['id_warehouse'];
|
||||
}
|
||||
if (isset($package['id_carrier'])) {
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['id_carrier'] = $package['id_carrier'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2528,38 +2530,41 @@ class CartCore extends ObjectModel
|
||||
);
|
||||
}
|
||||
}
|
||||
foreach($array as $hotelProduct) {
|
||||
$serviceProduct = $product;
|
||||
$serviceProduct['cart_quantity'] = $hotelProduct['quantity'];
|
||||
$serviceProduct['id_hotel'] = $hotelProduct['id_hotel'];
|
||||
$serviceProduct['total'] = $hotelProduct['total_price_tax_excl'];
|
||||
$serviceProduct['total_wt'] = $hotelProduct['total_price_tax_incl'];
|
||||
$serviceProduct['price'] = $hotelProduct['total_price_tax_excl'] / $hotelProduct['quantity'];
|
||||
$serviceProduct['price_wt'] = $hotelProduct['total_price_tax_incl'] / $hotelProduct['quantity'];
|
||||
$serviceProduct['id_room_type'] = $hotelProduct['id_room_type'];
|
||||
$serviceProduct['id_hotel_cart_booking'] = $hotelProduct['id_hotel_cart_booking'];
|
||||
// if (!empty($hotelProducts['products'])) {
|
||||
// foreach($hotelProducts['products'] as $hotelProduct) {
|
||||
$productinfo = $serviceProduct;
|
||||
$productinfo['selling_preference_type'] = Product::SELLING_PREFERENCE_HOTEL_STANDALONE;
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['product_list'][] = $productinfo;
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['id_hotel'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['id_hotel'] = $hotelProduct['id_hotel'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'] = $product['carrier_list'];
|
||||
} else {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'] = array_intersect($orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'], $product['carrier_list']);
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['warehouse_list'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['warehouse_list'] = $package['warehouse_list'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['id_warehouse'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['id_warehouse'] = $package['id_warehouse'];
|
||||
}
|
||||
if (isset($package['id_carrier'])) {
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['id_carrier'] = $package['id_carrier'];
|
||||
|
||||
if ($array) {
|
||||
foreach($array as $hotelProduct) {
|
||||
$serviceProduct = $product;
|
||||
$serviceProduct['cart_quantity'] = $hotelProduct['quantity'];
|
||||
$serviceProduct['id_hotel'] = $hotelProduct['id_hotel'];
|
||||
$serviceProduct['total'] = $hotelProduct['total_price_tax_excl'];
|
||||
$serviceProduct['total_wt'] = $hotelProduct['total_price_tax_incl'];
|
||||
$serviceProduct['price'] = $hotelProduct['total_price_tax_excl'] / $hotelProduct['quantity'];
|
||||
$serviceProduct['price_wt'] = $hotelProduct['total_price_tax_incl'] / $hotelProduct['quantity'];
|
||||
$serviceProduct['id_room_type'] = $hotelProduct['id_room_type'];
|
||||
$serviceProduct['id_hotel_cart_booking'] = $hotelProduct['id_hotel_cart_booking'];
|
||||
// if (!empty($hotelProducts['products'])) {
|
||||
// foreach($hotelProducts['products'] as $hotelProduct) {
|
||||
$productinfo = $serviceProduct;
|
||||
$productinfo['selling_preference_type'] = Product::SELLING_PREFERENCE_HOTEL_STANDALONE;
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['product_list'][] = $productinfo;
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['id_hotel'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['id_hotel'] = $hotelProduct['id_hotel'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'] = $product['carrier_list'];
|
||||
} else {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'] = array_intersect($orderPackage[$id_address][$hotelProduct['id_hotel']]['carrier_list'], $product['carrier_list']);
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['warehouse_list'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['warehouse_list'] = $package['warehouse_list'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['id_warehouse'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['id_warehouse'] = $package['id_warehouse'];
|
||||
}
|
||||
if (isset($package['id_carrier'])) {
|
||||
if (!isset($orderPackage[$id_address][$hotelProduct['id_hotel']]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$hotelProduct['id_hotel']]['id_carrier'] = $package['id_carrier'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ class DispatcherCore
|
||||
if (!isset($this->routes[$id_shop][$id_lang][$route_id])) {
|
||||
$query = http_build_query($params, '', '&');
|
||||
$index_link = $this->use_routes ? '' : 'index.php';
|
||||
return ($route_id == 'index') ? $index_link.(($query) ? '?'.$query : '') : ((trim($route_id) == '') ? '' : 'index.php?controller='.$route_id).(($query) ? '&'.$query : '').$anchor;
|
||||
return ($route_id == 'index') ? $index_link.(($query) ? '?'.$query : '') : ((!is_null($route_id) ? (trim($route_id) == '') : 1) ? '' : 'index.php?controller='.$route_id).(($query) ? '&'.$query : '').$anchor;
|
||||
}
|
||||
$route = $this->routes[$id_shop][$id_lang][$route_id];
|
||||
// Check required fields
|
||||
|
||||
@@ -621,7 +621,7 @@ abstract class PaymentModuleCore extends Module
|
||||
$product_list_txt = '';
|
||||
$product_list_html = '';
|
||||
if (count($product_var_tpl_list) > 0) {
|
||||
$product_list_txt = $this->getEmailTemplateContent('order_conf_product_list.txt', Mail::TYPE_TEXT, $product_var_tpl_list);
|
||||
$product_list_txt = $this->getEmailTemplateContent('order_conf_product_list_text.tpl', Mail::TYPE_TEXT, $product_var_tpl_list);
|
||||
$product_list_html = $this->getEmailTemplateContent('order_conf_product_list.tpl', Mail::TYPE_HTML, $product_var_tpl_list);
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ abstract class PaymentModuleCore extends Module
|
||||
$cart_rules_list_txt = '';
|
||||
$cart_rules_list_html = '';
|
||||
if (count($cart_rules_list) > 0) {
|
||||
$cart_rules_list_txt = $this->getEmailTemplateContent('order_conf_cart_rules.txt', Mail::TYPE_TEXT, $cart_rules_list);
|
||||
$cart_rules_list_txt = $this->getEmailTemplateContent('order_conf_cart_rules_text.tpl', Mail::TYPE_TEXT, $cart_rules_list);
|
||||
$cart_rules_list_html = $this->getEmailTemplateContent('order_conf_cart_rules.tpl', Mail::TYPE_HTML, $cart_rules_list);
|
||||
}
|
||||
|
||||
@@ -1342,6 +1342,7 @@ abstract class PaymentModuleCore extends Module
|
||||
'{products_txt}' => $product_list_txt,
|
||||
'{discounts}' => $cart_rules_list_html,
|
||||
'{discounts_txt}' => $cart_rules_list_txt,
|
||||
'{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false),
|
||||
'{total_products}' => Tools::displayPrice($total_products, $this->context->currency, false),
|
||||
'{total_discounts}' => Tools::displayPrice(-$order->total_discounts, $this->context->currency, false),
|
||||
'{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false),
|
||||
|
||||
@@ -326,9 +326,10 @@ class OrderReturnCore extends ObjectModel
|
||||
*/
|
||||
public function getOrderRefundRequestedProducts($idOrder, $idOrderReturn = 0, $onlyIds = 0, $skipReqCompletedNonRefunded = 0)
|
||||
{
|
||||
$sql = 'SELECT spod.*, ord.*, orr.`state` as id_return_state FROM `'._DB_PREFIX_.'order_return` orr';
|
||||
$sql = 'SELECT spod.*, ord.*, orr.`state` as id_return_state, p.`allow_multiple_quantity` FROM `'._DB_PREFIX_.'order_return` orr';
|
||||
$sql .= ' INNER JOIN `'._DB_PREFIX_.'order_return_detail` ord ON (orr.`id_order_return` = ord.`id_order_return`)';
|
||||
$sql .= ' INNER JOIN `'._DB_PREFIX_.'service_product_order_detail` spod ON (spod.`id_service_product_order_detail` = ord.`id_service_product_order_detail`)';
|
||||
$sql .= ' LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = spod.`id_product`)';
|
||||
$sql .= ' WHERE orr.`id_order` = '.(int)$idOrder;
|
||||
|
||||
if ($idOrderReturn) {
|
||||
@@ -368,7 +369,7 @@ class OrderReturnCore extends ObjectModel
|
||||
}
|
||||
$sql = 'SELECT orr.`id_order`, orr.`state`, orr.`id_order_return`, orr.`payment_mode`, orr.`id_transaction`,
|
||||
orr.`id_return_type`, orr.`return_type`, ors.`id_cart_rule`, orr.`date_add`, orr.`date_upd`, orr.`refunded_amount`,
|
||||
hbd.`is_cancelled`, SUM(IF(ord.`id_htl_booking`, 1, 0)) AS total_rooms
|
||||
hbd.`is_cancelled`, SUM(IF(ord.`id_htl_booking`, 1, 0)) AS total_rooms, SUM(IF(ord.`id_service_product_order_detail`, 1, 0)) AS total_products
|
||||
FROM `'._DB_PREFIX_.'order_return` orr
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_return_detail` ord
|
||||
ON (ord.`id_order_return` = orr.`id_order_return`)
|
||||
|
||||
@@ -318,25 +318,31 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
if (Module::isInstalled('hotelreservationsystem')) {
|
||||
$obj_htl_bk_dtl = new HotelBookingDetail();
|
||||
$objServiceProductOrderDetail = new ServiceProductOrderDetail();
|
||||
$objHotelBranchInfo = new HotelBranchInformation((int) HotelBookingDetail::getIdHotelByIdOrder($order_obj->id), $context->language->id);
|
||||
$invoiceAddressPatternRules['avoid'][] = 'lastname';
|
||||
if ($idHotelAddress = $objHotelBranchInfo->getHotelIdAddress()) {
|
||||
$objHotelAddress = new Address((int) $idHotelAddress);
|
||||
$objHotelAddress->firstname = $objHotelBranchInfo->hotel_name;
|
||||
$formattedHotelAddress = AddressFormat::generateAddress($objHotelAddress, $invoiceAddressPatternRules, '<br />', ' ');
|
||||
if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder($order_obj->id)) {
|
||||
$objHotelBranchInfo = new HotelBranchInformation((int) $idHotel, $context->language->id);
|
||||
$invoiceAddressPatternRules['avoid'][] = 'lastname';
|
||||
if ($idHotelAddress = $objHotelBranchInfo->getHotelIdAddress()) {
|
||||
$objHotelAddress = new Address((int) $idHotelAddress);
|
||||
$objHotelAddress->firstname = $objHotelBranchInfo->hotel_name;
|
||||
$formattedHotelAddress = AddressFormat::generateAddress($objHotelAddress, $invoiceAddressPatternRules, '<br />', ' ');
|
||||
}
|
||||
}
|
||||
|
||||
$customer = new Customer($this->order->id_customer);
|
||||
$idCustomer = 0;
|
||||
if (ValidateCore::isLoadedObject($customer = new Customer($this->order->id_customer))) {
|
||||
$idCustomer = $customer->id;
|
||||
}
|
||||
if (!empty($order_details)) {
|
||||
$processed_product = array();
|
||||
$totalDemandsPriceTE = 0;
|
||||
$totalDemandsPriceTI = 0;
|
||||
foreach ($order_details as $type_key => $type_value) {
|
||||
$processProuctKey = $type_value['product_id'].'_'.$type_value['selling_preference_type'].'_'.$type_value['id_order_detail'];
|
||||
if (isset($processed_product[$processProuctKey])) {
|
||||
$processProductKey = $type_value['product_id'].'_'.$type_value['selling_preference_type'].'_'.$type_value['id_order_detail'];
|
||||
if (isset($processed_product[$processProductKey])) {
|
||||
continue;
|
||||
}
|
||||
$processed_product[$processProuctKey] = $type_value['product_id'];
|
||||
$processed_product[$processProductKey] = $type_value['product_id'];
|
||||
|
||||
if ($type_value['is_booking_product']) {
|
||||
if ($display_product_images) {
|
||||
@@ -352,14 +358,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
$cart_htl_data[$type_key]['cover_img'] = $cover_img;
|
||||
}
|
||||
|
||||
if ($type_value)
|
||||
if (isset($customer->id)) {
|
||||
$cart_obj = new Cart($this->order->id_cart);
|
||||
$order_bk_data = $obj_htl_bk_dtl->getOnlyOrderBookingData($this->order->id, $cart_obj->id_guest, $type_value['product_id'], $customer->id);
|
||||
} else {
|
||||
$order_bk_data = $obj_htl_bk_dtl->getOnlyOrderBookingData($this->order->id, $customer->id_guest, $type_value['product_id'], 0);
|
||||
}
|
||||
|
||||
$order_bk_data = $obj_htl_bk_dtl->getOnlyOrderBookingData($this->order->id, 0, $type_value['product_id'], $idCustomer, $type_value['id_order_detail']);
|
||||
$cart_htl_data[$type_key]['id_product'] = $type_value['product_id'];
|
||||
$objBookingDemand = new HotelBookingDemands();
|
||||
foreach ($order_bk_data as $data_k => $data_v) {
|
||||
@@ -580,10 +579,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
0,
|
||||
$data_v['id']
|
||||
)) {
|
||||
$additionalServices['product_id'] = $type_value['product_id'];
|
||||
$additionalServices['room_type_name'] = $type_value['product_name'];
|
||||
$additionalServices['date_from'] = $data_v['date_from'];
|
||||
$additionalServices['date_to'] = $data_v['date_to'];
|
||||
$additionalServices[$data_v['id']]['product_id'] = $type_value['product_id'];
|
||||
$room_additinal_services[] = $additionalServices[$data_v['id']];
|
||||
}
|
||||
|
||||
|
||||
@@ -1321,7 +1321,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
$idHotelCartBooking = Tools::getValue('id_hotel_cart_booking');
|
||||
// valiadate services being added
|
||||
if (Validate::isLoadedObject($objHtlCartBooking = new HotelCartBookingData($idHotelCartBooking))) {
|
||||
$name = Tools::getValue('new_service_name');
|
||||
$name = trim(Tools::getValue('new_service_name'));
|
||||
$price = Tools::getValue('new_service_price');
|
||||
$priceCalcMethod = Tools::getValue('new_service_price_calc_method');
|
||||
$priceAdditionType = Tools::getValue('new_service_price_addition_type');
|
||||
|
||||
@@ -860,7 +860,12 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$product = new Product((int)$mess['id_product'], false, $this->context->language->id);
|
||||
if (Validate::isLoadedObject($product)) {
|
||||
$messages[$key]['product_name'] = $product->name;
|
||||
$messages[$key]['product_link'] = $this->context->link->getAdminLink('AdminProducts').'&updateproduct&id_product='.(int)$product->id;
|
||||
$messages[$key]['booking_product'] = $product->booking_product;
|
||||
if ($product->booking_product) {
|
||||
$messages[$key]['product_link'] = $this->context->link->getAdminLink('AdminProducts').'&updateproduct&id_product='.(int)$product->id;
|
||||
} else {
|
||||
$messages[$key]['product_link'] = $this->context->link->getAdminLink('AdminNormalProducts').'&updateproduct&id_product='.(int)$product->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -981,8 +986,6 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$timeline = array();
|
||||
foreach ($messages as $message) {
|
||||
$product = new Product((int)$message['id_product'], false, $this->context->language->id);
|
||||
$link_product = $this->context->link->getAdminLink('AdminOrders').'&vieworder&id_order='.(int)$product->id;
|
||||
|
||||
$content = '';
|
||||
if (!$message['private']) {
|
||||
$customerName = false;
|
||||
@@ -1000,7 +1003,13 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if (Validate::isLoadedObject($product)) {
|
||||
$content .= $this->l('Room type: ').'<span class="label label-info">'.$product->name.'</span><br/><br/>';
|
||||
if ($product->booking_product) {
|
||||
$content .= $this->l('Room type:');
|
||||
} else {
|
||||
$content .= $this->l('Product:');
|
||||
}
|
||||
|
||||
$content .= ' <span class="label label-info">'.$product->name.'</span><br/><br/>';
|
||||
}
|
||||
$content .= Tools::safeOutput($message['message']);
|
||||
|
||||
|
||||
@@ -401,8 +401,20 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
|
||||
public function beforeUpdateOptions()
|
||||
{
|
||||
$lang = new Language((int)Tools::getValue('PS_LANG_DEFAULT'));
|
||||
if (!trim(Tools::getValue('PS_WEIGHT_UNIT'))) {
|
||||
$this->errors[] = sprintf(Tools::displayError('field %s is required.'), $this->l('Weight unit'));
|
||||
}
|
||||
if (!trim(Tools::getValue('PS_DISTANCE_UNIT'))) {
|
||||
$this->errors[] = sprintf(Tools::displayError('field %s is required.'), $this->l('Distance unit'));
|
||||
}
|
||||
if (!trim(Tools::getValue('PS_DIMENSION_UNIT'))) {
|
||||
$this->errors[] = sprintf(Tools::displayError('field %s is required.'), $this->l('Dimension unit'));
|
||||
}
|
||||
if (!trim(Tools::getValue('PS_VOLUME_UNIT'))) {
|
||||
$this->errors[] = sprintf(Tools::displayError('field %s is required.'), $this->l('Volume unit'));
|
||||
}
|
||||
|
||||
$lang = new Language((int)Tools::getValue('PS_LANG_DEFAULT'));
|
||||
if (!$lang->active) {
|
||||
$lang->active = 1;
|
||||
$lang->save();
|
||||
|
||||
@@ -88,6 +88,7 @@ class AdminLogsControllerCore extends AdminController
|
||||
'title' => $this->l('Minimum severity level'),
|
||||
'hint' => $this->l('Enter "5" if you do not want to receive any emails.').'<br />'.$this->l('Emails will be sent to the website owner.'),
|
||||
'cast' => 'intval',
|
||||
'validation' => 'isUnsignedInt',
|
||||
'type' => 'text'
|
||||
)
|
||||
),
|
||||
|
||||
@@ -3854,14 +3854,14 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
$selectetRoomTypes = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id, RoomTypeServiceProduct::WK_ELEMENT_TYPE_ROOM_TYPE);
|
||||
$selectetHotels = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id, RoomTypeServiceProduct::WK_ELEMENT_TYPE_HOTEL);
|
||||
$selectedRoomTypes = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id, RoomTypeServiceProduct::WK_ELEMENT_TYPE_ROOM_TYPE);
|
||||
$selectedHotels = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id, RoomTypeServiceProduct::WK_ELEMENT_TYPE_HOTEL);
|
||||
|
||||
$tree = new HelperTree('hotels-room-tree');
|
||||
$tree->setData(HotelHelper::generateTreeData([
|
||||
'rootNode' => HotelHelper::NODE_HOTEL,
|
||||
'leafNode' => HotelHelper::NODE_ROOM_TYPE,
|
||||
'selectedElements' => $selectetRoomTypes
|
||||
'selectedElements' => $selectedRoomTypes
|
||||
]))
|
||||
->setUseCheckBox(true)
|
||||
->setAutoSelectChildren(true)
|
||||
@@ -3873,7 +3873,7 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
$tree->setData(HotelHelper::generateTreeData([
|
||||
'rootNode' => HotelHelper::NODE_HOTEL,
|
||||
'leafNode' => HotelHelper::NODE_HOTEL,
|
||||
'selectedElements' => $selectetHotels
|
||||
'selectedElements' => $selectedHotels
|
||||
]))
|
||||
->setUseCheckBox(true)
|
||||
->setAutoSelectChildren(true)
|
||||
|
||||
@@ -362,23 +362,24 @@ class AdminOrderPreferencesControllerCore extends AdminController
|
||||
$countries = Country::getCountries($this->context->language->id);
|
||||
$this->context->smarty->assign('countries', $countries);
|
||||
$this->fields_options['standard_product'] = array(
|
||||
'title' => $this->l('Standard Product'),
|
||||
'title' => $this->l('Standard Product Address configuration'),
|
||||
'icon' => 'icon-cogs',
|
||||
'fields' => array(
|
||||
'PS_STANDARD_PRODUCT_ORDER_ADDRESS_PREFRENCE' => array(
|
||||
'title' => $this->l('Standard product address type'),
|
||||
'title' => $this->l('Address for standard product tax calculation'),
|
||||
'validation' => 'isInt',
|
||||
'type' => 'select',
|
||||
'cast' => 'intval',
|
||||
'list' => $addressPrefrenceTypes,
|
||||
'identifier' => 'value',
|
||||
'js' => "changeStandardProductAddressType()",
|
||||
'hint' => $this->l('Select Standard product Address type, this will be used to calculate the tax for the standard product price.'),
|
||||
'desc' => $this->l('The selected address type will be used to calculate tax for the standard product.')
|
||||
'hint' => $this->l('Select address for standard product tax calculation, this will be used to calculate the tax for the standard product price.'),
|
||||
'desc' => $this->l('The selected address will be used to calculate tax for standard products. To change the hotel address, update the "Primary Hotel" in the').
|
||||
'<a href="'.$this->context->link->getAdminLink('AdminHotelGeneralSettings').'"> '.$this->l('Hotel General Configuration.').'</a>'
|
||||
),
|
||||
'PS_STANDARD_PRODUCT_ORDER_ADDRESS' => array(
|
||||
'title' => $this->l('Standard product custom address'),
|
||||
'hint' => $this->l('Set the Address details'),
|
||||
'title' => $this->l('Custom address for tax calculation'),
|
||||
'hint' => $this->l('Set the custom address details for tax calculation'),
|
||||
'type' => 'html',
|
||||
),
|
||||
),
|
||||
@@ -429,7 +430,7 @@ class AdminOrderPreferencesControllerCore extends AdminController
|
||||
$postcode = trim(Tools::getValue('service_postcode'));
|
||||
$serviceAddressPrefrenceType = Tools::getValue('PS_STANDARD_PRODUCT_ORDER_ADDRESS_PREFRENCE');
|
||||
if ($serviceAddressPrefrenceType == Product::STANDARD_PRODUCT_ADDRESS_PREFERENCE_CUSTOM) {
|
||||
$addressValidation = Address::getValidationRules('Address');
|
||||
$addressValidation = Address::getValidationRules('Address')['size'];
|
||||
if (!$idCountry) {
|
||||
$this->errors[] = Tools::displayError('Field country is required');
|
||||
} elseif (!Validate::isLoadedObject($objCountry = new Country($idCountry))) {
|
||||
|
||||
@@ -986,14 +986,12 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if ($serviceProducts) {
|
||||
if ($additionalServices) {
|
||||
foreach ($serviceProducts as $key => $servProduct) {
|
||||
$serviceProducts[$key]['price_tax_exc'] = $servProduct['price'];
|
||||
if (isset($additionalServices[$productLineData['id']])
|
||||
&& in_array($servProduct['id_product'], array_column($additionalServices[$productLineData['id']]['additional_services'], 'id_product'))
|
||||
) {
|
||||
unset($serviceProducts[$key]);
|
||||
}
|
||||
foreach ($serviceProducts as $key => $servProduct) {
|
||||
$serviceProducts[$key]['price_tax_exc'] = $servProduct['price'];
|
||||
if (isset($additionalServices[$productLineData['id']])
|
||||
&& in_array($servProduct['id_product'], array_column($additionalServices[$productLineData['id']]['additional_services'], 'id_product'))
|
||||
) {
|
||||
unset($serviceProducts[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,6 +1015,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$smartyVars['taxRulesGroups'] = $taxRulesGroups;
|
||||
$smartyVars['invoices_collection'] = $objOrder->getInvoicesCollection();
|
||||
$smartyVars['customServiceAllowed'] = Configuration::get('PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING');
|
||||
$smartyVars['current_id_lang'] = $this->context->language->id;
|
||||
|
||||
$this->context->smarty->assign($smartyVars);
|
||||
|
||||
@@ -1124,6 +1123,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'order' => $objOrder,
|
||||
'currency' => new Currency($objOrder->id_currency),
|
||||
'current_index' => self::$currentIndex,
|
||||
'bookingOrderInfo' => $bookingOrderInfo,
|
||||
'serviceProducts' => array_merge($hotelProducts, $standaloneProducts)
|
||||
@@ -2024,6 +2024,11 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->context->currency = new Currency((int)$objCart->id_currency);
|
||||
|
||||
$this->errors = HotelCartBookingData::validateCartBookings(!Configuration::get('PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING'));
|
||||
|
||||
// Remove cart rules and add if any changes
|
||||
CartRule::autoRemoveFromCart($this->context);
|
||||
CartRule::autoAddToCart($this->context);
|
||||
|
||||
$orderTotal = $objCart->getOrderTotal(true, Cart::BOTH);
|
||||
if ($objCart->is_advance_payment) {
|
||||
$advancePaymentAmount = $objCart->getOrderTotal(true, Cart::ADVANCE_PAYMENT);
|
||||
@@ -2849,10 +2854,36 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Total Rooms');
|
||||
$helper->tooltip = $this->l('Total rooms is the number of rooms booked in this order.');
|
||||
$helper->href = '#start_products';
|
||||
$helper->href = '#start_rooms';
|
||||
$helper->value = $numRooms;
|
||||
$this->kpis[] = $helper;
|
||||
|
||||
// if order has normal products the add kpi for total products
|
||||
$objServiceProductOrderDetail = new ServiceProductOrderDetail();
|
||||
$hotelProducts = $objServiceProductOrderDetail->getServiceProductsInOrder($objOrder->id, 0, 0, Product::SELLING_PREFERENCE_HOTEL_STANDALONE);
|
||||
$standaloneProducts = $objServiceProductOrderDetail->getServiceProductsInOrder($objOrder->id, 0, 0, Product::SELLING_PREFERENCE_STANDALONE);
|
||||
|
||||
if ($hotelProducts || $standaloneProducts) {
|
||||
$helper = new HelperKpi();
|
||||
$helper->id = 'box-total-products';
|
||||
$helper->icon = 'icon-home';
|
||||
$helper->color = 'color1';
|
||||
$helper->title = $this->l('Total Products');
|
||||
$helper->tooltip = $this->l('Total products is the number of product quantities booked in this order.');
|
||||
$helper->href = '#start_products';
|
||||
|
||||
$totalProductQuantity = 0;
|
||||
if ($hotelProducts) {
|
||||
$totalProductQuantity += array_sum(array_column($hotelProducts, 'quantity'));
|
||||
}
|
||||
if ($standaloneProducts) {
|
||||
$totalProductQuantity += array_sum(array_column($standaloneProducts, 'quantity'));
|
||||
}
|
||||
|
||||
$helper->value = $totalProductQuantity;
|
||||
$this->kpis[] = $helper;
|
||||
}
|
||||
|
||||
$helper = new HelperKpi();
|
||||
if (isset($orderHistory[0]['id_order_state']) && ($orderHistory[0]['id_order_state'] == Configuration::get('PS_OS_PAYMENT_ACCEPTED'))) {
|
||||
$initialPaymentStatus = $this->l('Full Payment');
|
||||
@@ -3266,7 +3297,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
0,
|
||||
null,
|
||||
null,
|
||||
0,
|
||||
$value['id']
|
||||
@@ -6125,6 +6156,9 @@ class AdminOrdersControllerCore extends AdminController
|
||||
|
||||
// Save order invoice
|
||||
if (isset($objOrderInvoice)) {
|
||||
$objOrderInvoice->total_products_wt -= $diffPriceTaxIncl;
|
||||
$objOrderInvoice->total_paid_tax_excl += $diffPriceTaxExcl;
|
||||
$objOrderInvoice->total_paid_tax_incl += $diffPriceTaxIncl;
|
||||
$result &= $objOrderInvoice->update();
|
||||
}
|
||||
|
||||
@@ -6221,7 +6255,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
null, // to get the auto added services.
|
||||
null,
|
||||
0,
|
||||
$idHotelBooking
|
||||
@@ -6237,7 +6271,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
null, // to get the auto added services.
|
||||
null,
|
||||
0,
|
||||
$idHotelBooking
|
||||
@@ -6253,7 +6287,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
0,
|
||||
null, // to get the auto added services.
|
||||
null,
|
||||
0,
|
||||
$idHotelBooking
|
||||
@@ -7662,7 +7696,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$objHotelBookingDetail->date_to,
|
||||
$objHotelBookingDetail->id_room
|
||||
)) {
|
||||
$name = Tools::getValue('new_service_name');
|
||||
$name = trim(Tools::getValue('new_service_name'));
|
||||
$price = Tools::getValue('new_service_price');
|
||||
$priceCalcMethod = Tools::getValue('new_service_price_calc_method');
|
||||
$priceAdditionType = Tools::getValue('new_service_price_addition_type');
|
||||
|
||||
@@ -5312,6 +5312,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
if ($idRooms = Tools::getValue('id_rooms')) {
|
||||
$rowsToHighlight = array();
|
||||
$room = array();
|
||||
$bookedRows = array();
|
||||
if (trim($floor = Tools::getValue('floor'))) {
|
||||
$room['floor'] = $floor;
|
||||
if (!Validate::isGenericName($floor)) {
|
||||
@@ -5379,7 +5380,8 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
} else if ($room['id_status'] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE && $disableDates) {
|
||||
foreach ($disableDates as $key => $dateRange) {
|
||||
if ($objHotelBookingDetail->chechRoomBooked($idRoom, $dateRange['date_from'], $dateRange['date_to'])) {
|
||||
if ($bookingRow = $objHotelBookingDetail->chechRoomBooked($idRoom, $dateRange['date_from'], $dateRange['date_to'])) {
|
||||
$bookedRows[$bookingRow['id']] = new HotelBookingDetail($bookingRow['id']);
|
||||
$rowsToHighlight[] = $key;
|
||||
}
|
||||
}
|
||||
@@ -5390,6 +5392,18 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
Hook::exec('actionValidateRoomInformation', array('room_information' => $room));
|
||||
}
|
||||
|
||||
if (count($bookedRows)) {
|
||||
foreach ($bookedRows as $bookedRow) {
|
||||
$this->context->smarty->assign(array(
|
||||
'link' => $this->context->link,
|
||||
'orderDetails' => $bookedRow,
|
||||
));
|
||||
|
||||
$this->errors[] = $this->context->smarty->fetch('controllers/products/booked_room_date_ranges_list.tpl');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->errors)) {
|
||||
@@ -5476,7 +5490,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
if (!($roomQuantity = Tools::getValue('qty'))) {
|
||||
$this->errors[] = Tools::displayError('Number of rooms is required.');
|
||||
} else if ($roomQuantity < 1) {
|
||||
} else if (!Validate::isUnsignedInt($roomQuantity) || $roomQuantity < 1) {
|
||||
$this->errors[] = Tools::displayError('Invalid value for number of rooms.');
|
||||
}
|
||||
|
||||
|
||||
@@ -420,11 +420,8 @@ class OrderDetailControllerCore extends FrontController
|
||||
}
|
||||
$roomTypes[$type_value['id_product']] = $type_value;
|
||||
}
|
||||
$redirectTermsLink = $this->context->link->getCMSLink(new CMS(3, $this->context->language->id), null, $this->context->language->id);
|
||||
}
|
||||
|
||||
$objHotelBookingDetail = new HotelBookingDetail();
|
||||
$htlBookingDetail = $objHotelBookingDetail->getOrderCurrentDataByOrderId($order->id);
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
|
||||
@@ -41,8 +41,28 @@ class OrderFollowControllerCore extends FrontController
|
||||
|
||||
parent::initContent();
|
||||
if (isset($this->context->customer->id) && $this->context->customer->id) {
|
||||
$ordersReturns = OrderReturn::getOrdersReturn($this->context->customer->id, Tools::getValue('id_order'));
|
||||
$this->context->smarty->assign('ordersReturns', $ordersReturns);
|
||||
$hasProductRefunds = 0;
|
||||
$hasRoomRefunds = 0;
|
||||
if ($ordersReturns = OrderReturn::getOrdersReturn($this->context->customer->id, Tools::getValue('id_order'))) {
|
||||
$objOrderReturn = new OrderReturn();
|
||||
foreach ($ordersReturns as $key => $orderReturn) {
|
||||
$ordersReturns[$key]['total_rooms_refunds'] = 0;
|
||||
$ordersReturns[$key]['total_products_refunds'] = 0;
|
||||
if ($refundReqBookings = $objOrderReturn->getOrderRefundRequestedBookings($orderReturn['id_order'], $orderReturn['id_order_return'])) {
|
||||
$hasRoomRefunds = 1;
|
||||
}
|
||||
|
||||
if ($refundReqProducts = $objOrderReturn->getOrderRefundRequestedProducts($orderReturn['id_order'], $orderReturn['id_order_return'])) {
|
||||
$hasProductRefunds = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'ordersReturns' => $ordersReturns,
|
||||
'hasRoomRefunds' => $hasRoomRefunds,
|
||||
'hasProductRefunds' => $hasProductRefunds
|
||||
));
|
||||
|
||||
$this->setTemplate(_PS_THEME_DIR_.'order-follow.tpl');
|
||||
} else {
|
||||
|
||||
@@ -1148,6 +1148,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->_assignCheckoutValidationVars();
|
||||
$this->_assignCheckoutVars();
|
||||
$this->_assignShoppingCart();
|
||||
$this->_assignSummaryInformations();
|
||||
$response['success'] = true;
|
||||
$response['shopping_cart'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'shopping-cart.tpl');
|
||||
$response['cart_total_block'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'cart-total-block.tpl');
|
||||
|
||||
@@ -891,6 +891,14 @@ class ProductControllerCore extends FrontController
|
||||
$useTax,
|
||||
$quantity
|
||||
);
|
||||
$smartyVars['service_price_without_reduction'] = RoomTypeServiceProductPrice::getPrice(
|
||||
$this->product->id,
|
||||
$idHotel,
|
||||
$idProductOption,
|
||||
$useTax,
|
||||
$quantity,
|
||||
false
|
||||
);
|
||||
if ($quantity) {
|
||||
$smartyVars['quantity'] = $quantity;
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{foreach $list as $cart_rule}
|
||||
{$cart_rule['voucher_name']} {$cart_rule['voucher_reduction']}
|
||||
{/foreach}
|
||||
@@ -1,21 +0,0 @@
|
||||
{foreach $list as $product}
|
||||
{$product['reference']}
|
||||
|
||||
{$product['name']}
|
||||
|
||||
{$product['price']}
|
||||
|
||||
{$product['quantity']}
|
||||
|
||||
{$product['price']}
|
||||
|
||||
{foreach $product['customization'] as $customization}
|
||||
{$product['name']} {$customization['customization_text']}
|
||||
|
||||
{$product['price']}
|
||||
|
||||
{$product['customization_quantity']}
|
||||
|
||||
{$product['quantity']}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
@@ -805,7 +805,6 @@ var ajaxCart = {
|
||||
}
|
||||
$('.vouchers').show();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// Update product quantity
|
||||
@@ -844,7 +843,7 @@ var ajaxCart = {
|
||||
if (parseInt(this.selling_preference_type) == SELLING_PREFERENCE_HOTEL_STANDALONE
|
||||
|| parseInt(this.selling_preference_type) == SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE
|
||||
) {
|
||||
if (typeof value.hotel_wise_data != 'undefined' && value.hotel_wise_data.length) {
|
||||
if (typeof value.hotel_wise_data != 'undefined') {
|
||||
$(value.hotel_wise_data).each(function(i, val) {
|
||||
ajaxCart.addProductRow(value, val);
|
||||
});
|
||||
@@ -887,11 +886,12 @@ var ajaxCart = {
|
||||
content += '<div class="cart-info-sec rm_product_info_' + productId + '">';
|
||||
content += '<span class="product_info_label">Price:</span>';
|
||||
content += '<span class="price product_info_data"> ';
|
||||
|
||||
if (product.booking_product) {
|
||||
content += formatCurrency(parseFloat(product.bookingData.total_room_type_amount), currency_format, currency_sign, currency_blank);
|
||||
}else if ((parseInt(product.selling_preference_type) == SELLING_PREFERENCE_HOTEL_STANDALONE
|
||||
|| parseInt(product.selling_preference_type) == SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE)
|
||||
&& (typeof(hotel_wise_data) != 'undefined' && hotel_wise_data.length)
|
||||
&& (typeof(hotel_wise_data) != 'undefined')
|
||||
) {
|
||||
content += formatCurrency(parseFloat(hotel_wise_data.amount), currency_format, currency_sign, currency_blank);
|
||||
} else {
|
||||
@@ -901,15 +901,19 @@ var ajaxCart = {
|
||||
content += '</div>';
|
||||
}
|
||||
content += '<div class="cart-info-sec rm_product_info_' + productId + '">';
|
||||
content += '<span class="product_info_label">' + total_qty_txt + ':</span>';
|
||||
if (product.booking_product || product.allow_multiple_quantity) {
|
||||
content += '<span class="product_info_label">' + total_qty_txt + ':</span>';
|
||||
}
|
||||
content += '<span class="quantity-formated">';
|
||||
content += '<span class="quantity product_info_data">';
|
||||
if (product.booking_product) {
|
||||
content += product.bookingData.total_num_rooms;
|
||||
} else if (typeof(hotel_wise_data) != 'undefined' && hotel_wise_data.total_qty) {
|
||||
content += hotel_wise_data.total_qty;
|
||||
} else {
|
||||
content += product.cart_quantity;
|
||||
} else if (product.allow_multiple_quantity) {
|
||||
if (typeof(hotel_wise_data) != 'undefined' && hotel_wise_data.total_qty) {
|
||||
content += hotel_wise_data.total_qty;
|
||||
} else {
|
||||
content += product.cart_quantity;
|
||||
}
|
||||
}
|
||||
content += '</span>';
|
||||
content += '</span>';
|
||||
@@ -1186,6 +1190,7 @@ var ajaxCart = {
|
||||
product.date_from + ' - ' + product.date_to
|
||||
);
|
||||
$('#layer_cart_product_hotel_name').parent().hide();
|
||||
$('#layer_cart_product_quantity').parent().show();
|
||||
var product_quantity_text = '';
|
||||
if(parseInt(product.booking_product)) {
|
||||
let rooms = 0;
|
||||
@@ -1202,7 +1207,11 @@ var ajaxCart = {
|
||||
product_quantity_text = product.occupancy;
|
||||
}
|
||||
} else {
|
||||
product_quantity_text = product.qty;
|
||||
if (product.allow_multiple_quantity) {
|
||||
product_quantity_text = product.qty;
|
||||
} else {
|
||||
$('#layer_cart_product_quantity').parent().hide();
|
||||
}
|
||||
$('#layer_cart_product_unit_price').text(product.unit_price);
|
||||
if (product.hotel_name) {
|
||||
$('#layer_cart_product_hotel_name').text(product.hotel_name).parent().show();
|
||||
@@ -1369,18 +1378,21 @@ function crossselling_serialScroll() {
|
||||
});
|
||||
}
|
||||
|
||||
function resetRoomtypeServices() {
|
||||
function resetRoomtypeServices(refresh = true) {
|
||||
$('.room_demands_container').find('input.id_room_type_demand:checked').prop('checked', false).uniform();
|
||||
$('#additional_products').empty();
|
||||
$('#additional_products div')
|
||||
$('.remove_roomtype_product').text(select_txt).removeClass('btn-danger remove_roomtype_product').addClass('btn-success add_roomtype_product');
|
||||
BookingForm.refresh();
|
||||
if (refresh) {
|
||||
BookingForm.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
function disableRoomTypeDemands(show) {
|
||||
if (show) {
|
||||
$('.room_demands_container_overlay').show();
|
||||
$('.room_demands_container').find('input:checkbox.id_room_type_demand').prop('checked', false);
|
||||
$('.room_demand_block').find('.id_room_type_demand').prop('checked', false).parent().removeClass('checked');
|
||||
$('.room_demands_container').find('input:checkbox.id_room_type_demand').attr('disabled', 'disabled');
|
||||
} else {
|
||||
$('.room_demands_container_overlay').hide();
|
||||
@@ -1391,6 +1403,7 @@ function disableRoomTypeDemands(show) {
|
||||
|
||||
function disableRoomTypeServices(disable) {
|
||||
if (disable) {
|
||||
resetRoomtypeServices(false);
|
||||
$('#service_products_cont').find('button.add_roomtype_product').attr('disabled', 'disabled');
|
||||
$('#service_products_cont').find('.qty_container .qty_direction a').attr('disabled', 'disabled');
|
||||
} else {
|
||||
@@ -1472,4 +1485,4 @@ function getBookingOccupancyDetails(bookingform, booking_product)
|
||||
}
|
||||
|
||||
return occupancy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,11 +48,11 @@
|
||||
|
||||
{block name='blockcart_shopping_cart_product_quantity'}
|
||||
<div class="cart-info-sec rm_product_info_{$product.id_product}">
|
||||
<span class="product_info_label">{l s='Total Qty.' mod='blockcart'}:</span>
|
||||
{if $product.allow_multiple_quantity || $product.booking_product}<span class="product_info_label">{l s='Total Qty.' mod='blockcart'}:</span>{/if}
|
||||
<span class="quantity-formated">
|
||||
{if $product.booking_product}
|
||||
<span class="quantity product_info_data">{$product.bookingData['total_num_rooms']}</span>
|
||||
{else}
|
||||
{elseif $product.allow_multiple_quantity}
|
||||
{if $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE || $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE}
|
||||
<span class="quantity product_info_data">{$hotel_wise_data.total_qty}</span>
|
||||
{elseif $product.selling_preference_type == Product::SELLING_PREFERENCE_STANDALONE}
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<span class="remove_link">
|
||||
{if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)}
|
||||
<a class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$static_token}")|escape:'html':'UTF-8'}{if isset($hotel_wise_data) && $hotel_wise_data.id_hotel}&id_hotel={$hotel_wise_data.id_hotel|escape:'html':'UTF-8'}{/if}" rel="nofollow" title="{l s='remove this product from my cart' mod='blockcart'}"> </a>
|
||||
<a class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$static_token}")|escape:'html':'UTF-8'}{if !empty($hotel_wise_data.id_hotel)}&id_hotel={$hotel_wise_data.id_hotel|escape:'html':'UTF-8'}{/if}" rel="nofollow" title="{l s='remove this product from my cart' mod='blockcart'}"> </a>
|
||||
{/if}
|
||||
</span>
|
||||
<div style="clear:both"></div>
|
||||
|
||||
@@ -113,17 +113,18 @@ class RoomTypeServiceProductPrice extends ObjectModel
|
||||
$idHotel,
|
||||
$idProductOption = null,
|
||||
$useTax = null,
|
||||
$quantity = 1
|
||||
$quantity = 1,
|
||||
$useReduc = true
|
||||
) {
|
||||
$idHotelAddress = Cart::getIdAddressForTaxCalculation($idProduct, $idHotel);
|
||||
$price = ProductCore::getPriceStatic(
|
||||
$price = Product::getPriceStatic(
|
||||
$idProduct,
|
||||
$useTax,
|
||||
$idProductOption,
|
||||
6,
|
||||
null,
|
||||
false,
|
||||
true,
|
||||
$useReduc,
|
||||
$quantity,
|
||||
false,
|
||||
null,
|
||||
|
||||
@@ -168,7 +168,7 @@ class ServiceProductCartDetail extends ObjectModel
|
||||
|
||||
$sql = 'SELECT spc.*, p.`selling_preference_type`, hcbd.`date_from`, spc.`id_cart` as service_id_cart, hcbd.`date_to`, p.`price_calculation_method`, hcbd.`id_product` as `id_product_room_type`';
|
||||
if (!$getTotalPrice) {
|
||||
$sql .= ', hbil.`hotel_name` ';
|
||||
$sql .= ', hbil.`hotel_name`, p.`auto_add_to_cart`, p.`price_addition_type` ';
|
||||
}
|
||||
$sql .= ' FROM `'._DB_PREFIX_.'service_product_cart_detail` spc';
|
||||
$sql .= ' LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = spc.`id_product`)';
|
||||
@@ -310,6 +310,9 @@ class ServiceProductCartDetail extends ObjectModel
|
||||
'total_price_tax_excl' => $priceTaxExcl * (int)$product['quantity'] * $numDays,
|
||||
'cover_img' => $coverImg,
|
||||
'price_calculation_method' => $product['price_calculation_method'],
|
||||
'auto_add_to_cart' => $product['auto_add_to_cart'],
|
||||
'price_addition_type' => $product['price_addition_type'],
|
||||
'total_price' => ($useTax ? $priceTaxIncl * (int)$product['quantity'] * $numDays : $priceTaxExcl * (int)$product['quantity'] * $numDays),
|
||||
);
|
||||
|
||||
if ($product['htl_cart_booking_id']) {
|
||||
|
||||
@@ -95,11 +95,26 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
$sql .= ' AND od.`selling_preference_type` = '.(int)$sellingPreferenceType;
|
||||
}
|
||||
|
||||
$products = Db::getInstance()->executeS($sql);
|
||||
foreach ($products as $key => $product) {
|
||||
// Check if this booking as any refund history then enter refund data
|
||||
if ($refundInfo = OrderReturn::getOrdersReturnDetail($idOrder, 0, 0, $product['id_service_product_order_detail'])) {
|
||||
$products[$key]['refund_info'] = reset($refundInfo);
|
||||
if ($products = Db::getInstance()->executeS($sql)) {
|
||||
$objContext = Context::getContext();
|
||||
$defaultImageLink = $objContext->link->getImageLink('', $objContext->language->iso_code.'-default', 'small_default');
|
||||
foreach ($products as $key => $product) {
|
||||
// Check if this booking as any refund history then enter refund data
|
||||
if ($refundInfo = OrderReturn::getOrdersReturnDetail($idOrder, 0, 0, $product['id_service_product_order_detail'])) {
|
||||
$products[$key]['refund_info'] = reset($refundInfo);
|
||||
}
|
||||
|
||||
$products[$key]['cover_image'] = $defaultImageLink;
|
||||
$products[$key]['allow_multiple_quantity'] = 0;
|
||||
if (Validate::isLoadedObject($objProduct = new Product((int) $product['id_product'], Configuration::get('PS_LANG_DEFAULT')))) {
|
||||
$products[$key]['allow_multiple_quantity'] = $objProduct->allow_multiple_quantity;
|
||||
if ($productCoverImg = Product::getCover($product['id_product'])) {
|
||||
$products[$key]['cover_image'] = $objContext->link->getImageLink(
|
||||
$objProduct->link_rewrite[Configuration::get('PS_LANG_DEFAULT')],
|
||||
$productCoverImg['id_image'], 'small_default'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,13 +142,15 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
|
||||
$sql = 'SELECT spod.*';
|
||||
if (!$getTotalPrice) {
|
||||
$sql .= ', hbd.`id_product` as `id_room_type`, od.`product_allow_multiple_quantity`, od.`product_price_calculation_method`, hbd.`id_room`, hbd.`adults`, hbd.`children`, hbd.`id_product`, hbd.`date_from`, hbd.`date_to`, hbd.`room_type_name`, spod.`id_product` as id_product';
|
||||
$sql .= ', hbd.`id_product` as `id_room_type`, od.`product_price_calculation_method`,
|
||||
hbd.`id_room`, hbd.`adults`, hbd.`children`, hbd.`date_from`, hbd.`date_to`, hbd.`room_type_name`,
|
||||
spod.`id_product` as id_product, od.`product_allow_multiple_quantity`, od.`product_price_calculation_method`, od.`product_auto_add`, od.`product_price_addition_type`';
|
||||
}
|
||||
$sql .= ' FROM `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
LEFT JOIN `'._DB_PREFIX_.'service_product_order_detail` spod ON(spod.`id_htl_booking_detail` = hbd.`id`)';
|
||||
|
||||
$sql .= ' LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON(od.`id_order_detail` = spod.`id_order_detail`)';
|
||||
$sql .= ' WHERE 1';
|
||||
$sql .= ' WHERE spod.`id_htl_booking_detail` IS NOT NULL';
|
||||
|
||||
if ($idOrder) {
|
||||
$sql .= ' AND spod.`id_order` = '.(int)$idOrder;
|
||||
@@ -210,6 +227,8 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
'total_price_tax_incl' => $product['total_price_tax_incl'],
|
||||
'unit_price_tax_excl' => $product['unit_price_tax_excl'],
|
||||
'unit_price_tax_incl' => $product['unit_price_tax_incl'],
|
||||
'product_auto_add' => $product['product_auto_add'],
|
||||
'product_price_addition_type' => $product['product_price_addition_type'],
|
||||
);
|
||||
} else {
|
||||
$selectedAdditionalServices[$product['id_htl_booking_detail']]['id_order'] = $product['id_order'];
|
||||
@@ -240,6 +259,8 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
'total_price_tax_incl' => $product['total_price_tax_incl'],
|
||||
'unit_price_tax_excl' => $product['unit_price_tax_excl'],
|
||||
'unit_price_tax_incl' => $product['unit_price_tax_incl'],
|
||||
'product_auto_add' => $product['product_auto_add'],
|
||||
'product_price_addition_type' => $product['product_price_addition_type'],
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -319,7 +340,7 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
'max_quantity' => $product['max_quantity'],
|
||||
'product_auto_add' => $product['product_auto_add'],
|
||||
'product_price_addition_type' => $product['product_price_addition_type'],
|
||||
'product_price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'unit_price_tax_excl' => $product['unit_price_tax_excl'],
|
||||
'unit_price_tax_incl' => $product['unit_price_tax_incl'],
|
||||
'total_price_tax_excl' => $product['total_price_tax_excl'],
|
||||
@@ -346,7 +367,7 @@ class ServiceProductOrderDetail extends ObjectModel
|
||||
'max_quantity' => $product['max_quantity'],
|
||||
'product_auto_add' => $product['product_auto_add'],
|
||||
'product_price_addition_type' => $product['product_price_addition_type'],
|
||||
'product_price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'price_calculation_method' => $product['product_price_calculation_method'],
|
||||
'unit_price_tax_excl' => $product['unit_price_tax_excl'],
|
||||
'unit_price_tax_incl' => $product['unit_price_tax_incl'],
|
||||
'total_price_tax_excl' => $product['total_price_tax_excl'],
|
||||
|
||||
@@ -143,12 +143,25 @@ class AdminHotelBedTypesController extends ModuleAdminController
|
||||
return;
|
||||
}
|
||||
|
||||
if (!trim(Tools::getValue('width'))) {
|
||||
$this->errors[] = $this->l('Field Width is required');
|
||||
$defaultLangId = Configuration::get('PS_LANG_DEFAULT');
|
||||
$objDefaultLanguage = Language::getLanguage((int) $defaultLangId);
|
||||
$languages = Language::getLanguages(false);
|
||||
if (!trim(Tools::getValue('name_'.$defaultLangId))) {
|
||||
$this->errors[] = $this->l('Bed type name is required at least in ').$objDefaultLanguage['name'];
|
||||
} else {
|
||||
foreach ($languages as $lang) {
|
||||
if (trim(Tools::getValue('name_'.$lang['id_lang'])) && !Validate::isGenericName(Tools::getValue('name_'.$lang['id_lang']))) {
|
||||
$this->errors[] = $this->l('Invalid bed type name in ').$lang['name'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!trim(Tools::getValue('length'))) {
|
||||
$this->errors[] = $this->l('Field Length is required');
|
||||
if (!(float) Tools::getValue('width')) {
|
||||
$this->errors[] = $this->l('The width field is required');
|
||||
}
|
||||
|
||||
if (!(float) Tools::getValue('length')) {
|
||||
$this->errors[] = $this->l('The length field is required');
|
||||
}
|
||||
|
||||
return parent::processSave();
|
||||
|
||||
@@ -36,7 +36,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
|
||||
$this->allow_export = true;
|
||||
$this->_new_list_header_design = true;
|
||||
if ($idOrder = Tools::getValue('id_order')) {
|
||||
$this->_select .= ', orsl.`name` as `status_name`, ors.`color`, COUNT(ordrd.`id_order_return_detail`) as num_rooms';
|
||||
$this->_select .= ', orsl.`name` as `status_name`, ors.`color`, SUM(IF((ordrd.id_htl_booking != 0) , 1, 0)) as num_rooms, SUM(IF((ordrd.id_service_product_order_detail != 0) , 1, 0)) as num_products';
|
||||
$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`)';
|
||||
@@ -60,6 +60,11 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
|
||||
if ($idOrder = Tools::getValue('id_order')) {
|
||||
$refundStatuses = OrderReturnStateCore::getOrderReturnStates($this->context->language->id);
|
||||
|
||||
// to set columns for products and rooms count in render list
|
||||
$objOrderReturn = new OrderReturn();
|
||||
$refundReqBookings = $objOrderReturn->getOrderRefundRequestedBookings($idOrder);
|
||||
$refundReqProducts = $objOrderReturn->getOrderRefundRequestedProducts($idOrder);
|
||||
|
||||
$retStatuses = array();
|
||||
foreach ($refundStatuses as $status) {
|
||||
$retStatuses[$status['id_order_return_state']] = $status['name'];
|
||||
@@ -82,11 +87,21 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
|
||||
'havingFilter' => true,
|
||||
'callback' => 'setCustomerLink',
|
||||
);
|
||||
$this->fields_list['num_rooms'] = array(
|
||||
'title' => $this->l('Total Rooms'),
|
||||
'align' => 'center',
|
||||
'havingFilter' => true,
|
||||
);
|
||||
|
||||
if ($refundReqBookings) {
|
||||
$this->fields_list['num_rooms'] = array(
|
||||
'title' => $this->l('Total Rooms'),
|
||||
'align' => 'center',
|
||||
'havingFilter' => true,
|
||||
);
|
||||
}
|
||||
if ($refundReqProducts) {
|
||||
$this->fields_list['num_products'] = array(
|
||||
'title' => $this->l('Total Products'),
|
||||
'align' => 'center',
|
||||
'havingFilter' => true,
|
||||
);
|
||||
}
|
||||
$this->fields_list['refunded_amount'] = array(
|
||||
'title' => $this->l('Refunded Amount'),
|
||||
'align' => 'center',
|
||||
@@ -299,9 +314,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
|
||||
}
|
||||
}
|
||||
|
||||
if ($refundReqProducts = $objOrderReturn->getOrderRefundRequestedProducts($objOrderReturn->id_order, $objOrderReturn->id)){
|
||||
}
|
||||
|
||||
$refundReqProducts = $objOrderReturn->getOrderRefundRequestedProducts($objOrderReturn->id_order, $objOrderReturn->id);
|
||||
|
||||
$paymentMethods = array();
|
||||
foreach (PaymentModule::getInstalledPaymentModules() as $payment) {
|
||||
|
||||
@@ -508,6 +508,7 @@ class HotelReservationSystem extends Module
|
||||
'htl_room_type_global_demand_advance_option',
|
||||
'htl_order_refund_rules',
|
||||
'htl_settings_link',
|
||||
'htl_bed_type'
|
||||
);
|
||||
//If Admin update new language when we do entry in module all lang tables.
|
||||
HotelHelper::updateLangTables($newIdLang, $langTables);
|
||||
|
||||
@@ -81,14 +81,26 @@
|
||||
{displayPrice price=$orderTotalPaid currency=$orderInfo['id_currency']}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3">
|
||||
<strong>{l s='Total rooms' mod='hotelreservationsystem'} :</strong>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
{$refundReqBookings|count}
|
||||
</div>
|
||||
</div>
|
||||
{if isset($refundReqBookings) && $refundReqBookings}
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3">
|
||||
<strong>{l s='Total rooms' mod='hotelreservationsystem'} :</strong>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
{$refundReqBookings|count}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($refundReqProducts) && $refundReqProducts}
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3">
|
||||
<strong>{l s='Total products' mod='hotelreservationsystem'} :</strong>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
{$refundReqProducts|count}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3">
|
||||
<strong>{l s='Way of payment' mod='hotelreservationsystem'} :</strong>
|
||||
@@ -263,7 +275,7 @@
|
||||
<td><input type="checkbox" name="id_order_return_detail[]" value="{$product['id_order_return_detail']|escape:'html':'UTF-8'}" checked/></td>
|
||||
{/if}
|
||||
<td>{$product['name']|escape:'htmlall':'UTF-8'}{if isset($product['option_name']) && $product['option_name']} : {$product['option_name']|escape:'htmlall':'UTF-8'}{/if}</td>
|
||||
<td>{$product['quantity']|escape:'htmlall':'UTF-8'}</td>
|
||||
<td>{if $product['allow_multiple_quantity']}{$product['quantity']|escape:'htmlall':'UTF-8'}{else}--{/if}</td>
|
||||
<td>{displayPrice price=$product['total_price_tax_incl'] currency=$orderCurrency['id']}</td>
|
||||
<td>{displayPrice price=$product['paid_amount'] currency=$orderCurrency['id']}</td>
|
||||
{if $hasOrderDiscountOrPayment || $isRefundCompleted}
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
{/if}
|
||||
</td> -->
|
||||
<td width="33%">
|
||||
<span class="bold">{l s='Hotel Detail' pdf='true'}</span><br/><br/>
|
||||
{if $hotel_address}
|
||||
{if !empty($hotel_address)}
|
||||
<span class="bold">{l s='Hotel Detail' pdf='true'}</span><br/><br/>
|
||||
{$hotel_address}
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*}
|
||||
|
||||
{if isset($cart_htl_data) && $cart_htl_data}
|
||||
<table class="product" class="bordered-table" width="100%" cellpadding="4" cellspacing="0">
|
||||
<table class="bordered-table" width="100%" cellpadding="4" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="{if $display_product_images}8{else}7{/if}" class="header">{l s='Rooms Details' pdf='true'}</th>
|
||||
@@ -50,7 +50,7 @@
|
||||
{foreach from=$cart_htl_data key=data_k item=data_v}
|
||||
{foreach from=$data_v['date_diff'] key=rm_k item=rm_v}
|
||||
{cycle values=["color_line_even", "color_line_odd"] assign=bgcolor_class}
|
||||
<tr class="product {$bgcolor_class}">
|
||||
<tr class="{$bgcolor_class}">
|
||||
{if $display_product_images}
|
||||
<td class="cart_product">
|
||||
<img src="{$data_v['cover_img']}" class="thumbnail" />
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
<tbody>
|
||||
{foreach $service_product_data as $product}
|
||||
{cycle values=["color_line_even", "color_line_odd"] assign=bgcolor_class}
|
||||
<tr class="product {$bgcolor_class}">
|
||||
<tr class="{$bgcolor_class}">
|
||||
{if $display_product_images}
|
||||
<td class="product center">
|
||||
{if isset($product.image) && $product.image->id}
|
||||
{$product.image_tag}
|
||||
<td class="cart_product">
|
||||
{if isset($product['cover_image']) && $product['cover_image']}
|
||||
<img src="{$product['cover_image']}" class="thumbnail" />
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<table class="bordered-table" width="100%" cellpadding="4" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4" class="header">{l s='Room Bookings Detail' pdf='true'}</th>
|
||||
<th colspan="5" class="header">{l s='Room Bookings Detail' pdf='true'}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="product header">{l s='Room Type / Reference' pdf='true'}</th>
|
||||
|
||||
@@ -280,12 +280,12 @@
|
||||
<div class="total_price_block col-xs-7 form-group">
|
||||
<label class="control-label">{l s='Price'}</label>
|
||||
<p>
|
||||
{if $service_price && $service_price_without_reduction > $service_price}
|
||||
<span class="room_type_old_price">
|
||||
{convertPrice price=$service_price_without_reduction|floatval}
|
||||
</span>
|
||||
{/if}
|
||||
{convertPrice price=$service_price}
|
||||
{* {if !$priceDisplay || $priceDisplay == 2}
|
||||
{convertPrice price=$product->getPrice(true, $smarty.const.NULL, 6)|floatval}
|
||||
{elseif $priceDisplay == 1}
|
||||
{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 6)|floatval}
|
||||
{/if} *}
|
||||
</p>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
@@ -52,12 +52,14 @@
|
||||
<div class="description-list">
|
||||
<dl class="">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.quantity}</dd>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.quantity}</dd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Unit Price'}</dt>
|
||||
@@ -72,8 +74,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Total Pricing'}</dt>
|
||||
|
||||
@@ -23,7 +23,15 @@
|
||||
<div class="col-sm-6">
|
||||
<strong>
|
||||
{if $message.id_employee}
|
||||
{$obj_hotel_branch_information->hotel_name|escape:'html':'UTF-8'}
|
||||
{if isset($obj_hotel_branch_information->hotel_name) && $obj_hotel_branch_information->hotel_name}
|
||||
{$obj_hotel_branch_information->hotel_name|escape:'html':'UTF-8'}
|
||||
{elseif isset($message.elastname) && $message.elastname}
|
||||
{$message.efirstname|escape:'html':'UTF-8'} {$message.elastname|escape:'html':'UTF-8'}
|
||||
{elseif $message.clastname}
|
||||
{$message.cfirstname|escape:'html':'UTF-8'} {$message.clastname|escape:'html':'UTF-8'}
|
||||
{else}
|
||||
{$shop_name|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
{else}
|
||||
{$message.cfirstname|escape:'html':'UTF-8'} {$message.clastname|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
|
||||
@@ -52,12 +52,14 @@
|
||||
<div class="description-list">
|
||||
<dl class="">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.quantity}</dd>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.quantity}</dd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Unit Price'}</dt>
|
||||
@@ -72,8 +74,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Total Pricing'}</dt>
|
||||
|
||||
@@ -901,15 +901,19 @@ var ajaxCart = {
|
||||
content += '</div>';
|
||||
}
|
||||
content += '<div class="cart-info-sec rm_product_info_' + productId + '">';
|
||||
content += '<span class="product_info_label">' + total_qty_txt + ':</span>';
|
||||
if (product.booking_product || product.allow_multiple_quantity) {
|
||||
content += '<span class="product_info_label">' + total_qty_txt + ':</span>';
|
||||
}
|
||||
content += '<span class="quantity-formated">';
|
||||
content += '<span class="quantity product_info_data">';
|
||||
if (product.booking_product) {
|
||||
content += product.bookingData.total_num_rooms;
|
||||
} else if (typeof(hotel_wise_data) != 'undefined' && hotel_wise_data.total_qty) {
|
||||
content += hotel_wise_data.total_qty;
|
||||
} else {
|
||||
content += product.cart_quantity;
|
||||
} else if (product.allow_multiple_quantity) {
|
||||
if (typeof(hotel_wise_data) != 'undefined' && hotel_wise_data.total_qty) {
|
||||
content += hotel_wise_data.total_qty;
|
||||
} else {
|
||||
content += product.cart_quantity;
|
||||
}
|
||||
}
|
||||
content += '</span>';
|
||||
content += '</span>';
|
||||
@@ -1186,6 +1190,7 @@ var ajaxCart = {
|
||||
product.date_from + ' - ' + product.date_to
|
||||
);
|
||||
$('#layer_cart_product_hotel_name').parent().hide();
|
||||
$('#layer_cart_product_quantity').parent().show();
|
||||
var product_quantity_text = '';
|
||||
if(parseInt(product.booking_product)) {
|
||||
let rooms = 0;
|
||||
@@ -1202,7 +1207,11 @@ var ajaxCart = {
|
||||
product_quantity_text = product.occupancy;
|
||||
}
|
||||
} else {
|
||||
product_quantity_text = product.qty;
|
||||
if (product.allow_multiple_quantity) {
|
||||
product_quantity_text = product.qty;
|
||||
} else {
|
||||
$('#layer_cart_product_quantity').parent().hide();
|
||||
}
|
||||
$('#layer_cart_product_unit_price').text(product.unit_price);
|
||||
if (product.hotel_name) {
|
||||
$('#layer_cart_product_hotel_name').text(product.hotel_name).parent().show();
|
||||
|
||||
@@ -48,11 +48,11 @@
|
||||
|
||||
{block name='blockcart_shopping_cart_product_quantity'}
|
||||
<div class="cart-info-sec rm_product_info_{$product.id_product}">
|
||||
<span class="product_info_label">{l s='Total Qty.' mod='blockcart'}:</span>
|
||||
{if $product.allow_multiple_quantity || $product.booking_product}<span class="product_info_label">{l s='Total Qty.' mod='blockcart'}:</span>{/if}
|
||||
<span class="quantity-formated">
|
||||
{if $product.booking_product}
|
||||
<span class="quantity product_info_data">{$product.bookingData['total_num_rooms']}</span>
|
||||
{else}
|
||||
{elseif $product.allow_multiple_quantity}
|
||||
{if $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE || $product.selling_preference_type == Product::SELLING_PREFERENCE_HOTEL_STANDALONE_AND_WITH_ROOM_TYPE}
|
||||
<span class="quantity product_info_data">{$hotel_wise_data.total_qty}</span>
|
||||
{elseif $product.selling_preference_type == Product::SELLING_PREFERENCE_STANDALONE}
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<span class="remove_link">
|
||||
{if !isset($customizedDatas.$productId.$productAttributeId) && (!isset($product.is_gift) || !$product.is_gift)}
|
||||
<a class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$static_token}")|escape:'html':'UTF-8'}{if isset($hotel_wise_data) && $hotel_wise_data.id_hotel}&id_hotel={$hotel_wise_data.id_hotel|escape:'html':'UTF-8'}{/if}" rel="nofollow" title="{l s='remove this product from my cart' mod='blockcart'}"> </a>
|
||||
<a class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery={$product.id_address_delivery|intval}&token={$static_token}")|escape:'html':'UTF-8'}{if !empty($hotel_wise_data.id_hotel)}&id_hotel={$hotel_wise_data.id_hotel|escape:'html':'UTF-8'}{/if}" rel="nofollow" title="{l s='remove this product from my cart' mod='blockcart'}"> </a>
|
||||
{/if}
|
||||
</span>
|
||||
<div style="clear:both"></div>
|
||||
|
||||
@@ -241,12 +241,14 @@
|
||||
<div class="description-list">
|
||||
<dl class="">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.product_quantity}</dd>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.product_quantity}</dd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Unit Price'}</dt>
|
||||
@@ -261,8 +263,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Total Pricing'}</dt>
|
||||
@@ -311,12 +315,14 @@
|
||||
<div class="description-list">
|
||||
<dl class="">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.product_quantity}</dd>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Quantity'}</dt>
|
||||
<dd class="col-xs-7">{$product.product_quantity}</dd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Unit Price'}</dt>
|
||||
@@ -331,8 +337,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="row">
|
||||
<dt class="col-xs-5">{l s='Total Pricing'}</dt>
|
||||
|
||||
@@ -577,18 +577,28 @@
|
||||
{block name='order_detail_add_order_messages_form'}
|
||||
<form action="{$link->getPageLink('order-detail', true)|escape:'html':'UTF-8'}" method="post" class="std" id="sendOrderMessage">
|
||||
<div class="form-group select-room-type">
|
||||
<label for="id_product">{l s='Room Type'}</label>
|
||||
<label for="id_product">{l s='Room Type'}{if $service_products_formatted}/{l s='Product'}{/if}</label>
|
||||
<p class="card-subheader text-muted">
|
||||
{l s='To add a comment about a room type, please select one first.'}
|
||||
{if $service_products_formatted}
|
||||
{l s='To add a comment about a room type/product, please select one first.'}
|
||||
{else}
|
||||
{l s='To add a comment about a room type, please select one first.'}
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<select name="id_product" class="form-control">
|
||||
<option value="0">{l s='-- Choose --'}</option>
|
||||
{foreach from=$roomTypes item=product}
|
||||
{if $product.is_booking_product}
|
||||
<option value="{$product.product_id}">{$product.product_name|escape:'html':'UTF-8'}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $roomTypes}
|
||||
{foreach from=$roomTypes item=product}
|
||||
{if $product.is_booking_product}
|
||||
<option value="{$product.product_id}">{$product.product_name|escape:'html':'UTF-8'}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{if $service_products_formatted}
|
||||
{foreach from=$service_products_formatted item=product}
|
||||
<option value="{$product.id_product}">{$product.name|escape:'html':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -1029,9 +1039,11 @@
|
||||
</label>
|
||||
{if $product_option.is_cancelled}<span class="badge badge-danger badge-cancelled">{l s='Cancelled'}</span>{else if $product_option.is_refunded}<span class="badge badge-danger badge-cancelled">{l s='Refunded'}</span>{else if isset($product_option.refund_denied) && $product_option.refund_denied}<span class="badge badge-danger badge-cancelled">{l s='Refund denied'}</span> <i class="icon-info-circle refund-denied-info" data-refund_denied_info="{l s='Refund for this product is denied. Please contact admin for more detail.'}"></i></span>{/if}
|
||||
</div>
|
||||
<div class="quantity-wrap clearfix">
|
||||
<span>{l s='Quantity'} : {$product_option.quantity}</span>
|
||||
</div>
|
||||
{if $product_option.allow_multiple_quantity}
|
||||
<div class="quantity-wrap clearfix">
|
||||
<span>{l s='Quantity'} : {$product_option.quantity}</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,12 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Order'}</th>
|
||||
<th>{l s='Total rooms'}</th>
|
||||
{if isset($hasRoomRefunds) && $hasRoomRefunds}
|
||||
<th>{l s='Total rooms'}</th>
|
||||
{/if}
|
||||
{if isset($hasProductRefunds) && $hasProductRefunds}
|
||||
<th>{l s='Total products'}</th>
|
||||
{/if}
|
||||
<th>{l s='Refund status'}</th>
|
||||
<th>{l s='Date requested'}</th>
|
||||
<th>{l s='Actions'}</th>
|
||||
@@ -59,9 +64,16 @@
|
||||
<td>
|
||||
#{$return.reference|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
<td>
|
||||
{$return.total_rooms|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
{if isset($hasRoomRefunds) && $hasRoomRefunds}
|
||||
<td>
|
||||
{$return.total_rooms|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
{/if}
|
||||
{if isset($hasProductRefunds) && $hasProductRefunds}
|
||||
<td>
|
||||
{$return.total_products|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
{/if}
|
||||
<td>
|
||||
<span class="badge wk-badge" style="background-color:{$return.state_color|escape:'html':'UTF-8'}">{$return.state_name|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
{/block}
|
||||
{block name='order_return_detail'}
|
||||
{if $refundReqBookings}
|
||||
{if isset($refundReqProducts) && $refundReqProducts}
|
||||
<h1 class="page-subheading">{l s='Rooms refund requests'}</h1>
|
||||
{/if}
|
||||
<div class="table-responsive wk-datatable-wrapper">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
@@ -97,12 +100,13 @@
|
||||
</div>
|
||||
{/if}
|
||||
{if $refundReqProducts}
|
||||
<h1 class="page-subheading">{l s='Products refund requests'}</h1>
|
||||
<div class="table-responsive wk-datatable-wrapper">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Product name'}</th>
|
||||
<th>{l s='Quantity'}</th>
|
||||
<th>{l s='Total rooms price (tax incl.)'}</th>
|
||||
<th>{l s='Total price (tax incl.)'}</th>
|
||||
{if $isRefundCompleted}
|
||||
<th>{l s='Refund amount'}</th>
|
||||
<th>{l s='Refund Status'}</th>
|
||||
@@ -111,7 +115,7 @@
|
||||
{foreach from=$refundReqProducts item=$product name=refundRequest}
|
||||
<tr>
|
||||
<td>{$product['name']|escape:'htmlall':'UTF-8'}{if isset($product['option_name']) && $product['option_name']} : {$product['option_name']}{/if}</td>
|
||||
<td>{$product['quantity']|escape:'htmlall':'UTF-8'}</td>
|
||||
<td>{if $product['allow_multiple_quantity']}{$product['quantity']|escape:'htmlall':'UTF-8'}{else}--{/if}</td>
|
||||
<td>{displayPrice price=$product['total_price_tax_incl'] currency=$orderCurrency['id']}</td>
|
||||
{if $isRefundCompleted}
|
||||
<td>
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
{if isset($id_hotel) && $id_hotel}
|
||||
<li><a href="#refund_policies_tab" class="idTabHrefShort" data-toggle="tab">{l s='Refund Policies'}</a></li>
|
||||
{/if}
|
||||
{if $display_google_maps && ($hotel_latitude|floatval != 0 && $hotel_longitude|floatval != 0)}
|
||||
{if $display_google_maps && !empty($hotel_latitude) && !empty($hotel_longitude) && ($hotel_latitude|floatval != 0 && $hotel_longitude|floatval != 0)}
|
||||
<li><a href="#room_type_map_tab" class="idTabHrefShort" data-toggle="tab">{l s='View on Map'}</a></li>
|
||||
{/if}
|
||||
{block name='displayProductTab'}
|
||||
@@ -399,7 +399,7 @@
|
||||
{/if}
|
||||
{/block}
|
||||
{block name='product_map_tab_content'}
|
||||
{if $display_google_maps && ($hotel_latitude|floatval != 0 && $hotel_longitude|floatval != 0)}
|
||||
{if $display_google_maps && !empty($hotel_latitude) && !empty($hotel_longitude) && ($hotel_latitude|floatval != 0 && $hotel_longitude|floatval != 0)}
|
||||
<div id="room_type_map_tab" class="tab-pane card">
|
||||
<div class="map-wrap"></div>
|
||||
<div id="room-info-map-ui-content" style="display: none;">
|
||||
|
||||
@@ -240,8 +240,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row product_price_detail_block">
|
||||
<div class="col-sm-4 col-xs-7">
|
||||
<div class="price_block">
|
||||
<div class="col-sm-7">
|
||||
<div class="price_block col-xs-7">
|
||||
<p class="total_price">
|
||||
<span>
|
||||
{if $priceDisplay}{displayPrice price=($product['unit_price_tax_excl'])}{else}{displayPrice price=($product['unit_price_tax_incl'])}{/if}
|
||||
@@ -251,35 +251,26 @@
|
||||
{l s='Unit price'} {if $display_tax_label}{if $priceDisplay} {l s='(Excl.'} {else}{l s='(Incl.)'}{/if} {l s='all taxes.)'}{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 col-xs-5">
|
||||
<div class="quantity_cont">
|
||||
<input type="hidden" value="{$product.quantity}" name="quantity_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}_hidden" />
|
||||
<input size="2" type="text" autocomplete="off" class="cart_quantity_input grey" value="{$product.quantity}" name="quantity_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" />
|
||||
<div class="cart_quantity_button">
|
||||
<a rel="nofollow" class="cart_quantity_up btn btn-default" id="cart_quantity_up_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery=0&token={$token_cart}")|escape:'html':'UTF-8'}" title="{l s='Add'}"><span><i class="icon-plus"></i></span></a>
|
||||
{if $product.minimal_quantity < ($product.quantity)}
|
||||
<a rel="nofollow" class="cart_quantity_down btn btn-default" id="cart_quantity_down_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery=0&op=down&token={$token_cart}")|escape:'html':'UTF-8'}" title="{l s='Subtract'}">
|
||||
<span><i class="icon-minus"></i></span>
|
||||
</a>
|
||||
{else}
|
||||
<a class="cart_quantity_down btn btn-default disabled" href="#" id="cart_quantity_down_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" title="{l s='You must purchase a minimum of %d of this product.' sprintf=1}">
|
||||
<span><i class="icon-minus"></i></span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="col-xs-5">
|
||||
<div class="quantity_cont">
|
||||
<input type="hidden" value="{$product.quantity}" name="quantity_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}_hidden" />
|
||||
<input size="2" type="text" autocomplete="off" class="cart_quantity_input grey" value="{$product.quantity}" name="quantity_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" />
|
||||
<div class="cart_quantity_button">
|
||||
<a rel="nofollow" class="cart_quantity_up btn btn-default" id="cart_quantity_up_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery=0&token={$token_cart}")|escape:'html':'UTF-8'}" title="{l s='Add'}"><span><i class="icon-plus"></i></span></a>
|
||||
{if $product.minimal_quantity < ($product.quantity)}
|
||||
<a rel="nofollow" class="cart_quantity_down btn btn-default" id="cart_quantity_down_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" href="{$link->getPageLink('cart', true, NULL, "add=1&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_address_delivery=0&op=down&token={$token_cart}")|escape:'html':'UTF-8'}" title="{l s='Subtract'}">
|
||||
<span><i class="icon-minus"></i></span>
|
||||
</a>
|
||||
{else}
|
||||
<a class="cart_quantity_down btn btn-default disabled" href="#" id="cart_quantity_down_{$product.id_product}_{if $product.id_product_option}{$product.id_product_option}{else}0{/if}_{if $product.id_hotel}{$product.id_hotel}{else}0{/if}" title="{l s='You must purchase a minimum of %d of this product.' sprintf=1}">
|
||||
<span><i class="icon-minus"></i></span>
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{* <div class="product_quantity_block">
|
||||
<p class="">
|
||||
<span>
|
||||
{if $product['quantity'] <= 9}0{$product['quantity']}{else}{$product['quantity']}{/if}
|
||||
</span>
|
||||
</p>
|
||||
<p class="product_quantity_detial">
|
||||
{l s='Total Qty'}
|
||||
</p>
|
||||
</div> *}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="total_price_block col-xs-12">
|
||||
@@ -370,17 +361,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* <div class="product_quantity_block">
|
||||
<p class="">
|
||||
<span>
|
||||
{if $product['quantity'] <= 9}0{$product['quantity']}{else}{$product['quantity']}{/if}
|
||||
</span>
|
||||
</p>
|
||||
<p class="product_quantity_detial">
|
||||
{l s='Total Qty'}
|
||||
</p>
|
||||
</div> *}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user