Merge branch 'origin/develop' into gli-1697
This commit is contained in:
@@ -14,18 +14,43 @@
|
||||
.booking_occupancy
|
||||
.booking_occupancy_wrapper
|
||||
max-height: 250px
|
||||
width: 100%
|
||||
overflow-x: auto
|
||||
label.room_num_wrapper
|
||||
text-decoration: underline
|
||||
margin-bottom: 10px
|
||||
|
||||
#booking-documents-modal
|
||||
.documents-list
|
||||
table
|
||||
tbody
|
||||
img
|
||||
max-height: 55px
|
||||
max-width: 55px
|
||||
.documents-list table tbody img
|
||||
max-width: 55px
|
||||
|
||||
.toolbar_order_status_badge
|
||||
font-size: 12px
|
||||
.error_text
|
||||
color: red
|
||||
.room_type_old_price
|
||||
text-decoration: line-through
|
||||
color: #979797
|
||||
font-size: 12px
|
||||
.wk-input-date
|
||||
cursor: text
|
||||
background-color: #F5F8F9
|
||||
#room_status_info_wrapper .margin-bottom-5
|
||||
margin-bottom: 5px
|
||||
#room_status_info_wrapper .room_status_date
|
||||
display: none
|
||||
|
||||
#order_detail_view .panel .panel-heading
|
||||
height: auto
|
||||
padding: 5px 5px 3px 5px
|
||||
a
|
||||
text-transform: none
|
||||
.modal-body .modal-footer
|
||||
padding: 15px 0px 0px 0px
|
||||
.modal-body .tab-content
|
||||
padding: 15px
|
||||
border: 1px solid #ddd
|
||||
|
||||
.loading_overlay
|
||||
display: none
|
||||
position: fixed
|
||||
|
||||
@@ -85,8 +85,8 @@ body
|
||||
.btn-group
|
||||
position: absolute
|
||||
white-space: nowrap
|
||||
top: -2px
|
||||
@include right(2px)
|
||||
top: 2px
|
||||
@include right(6px)
|
||||
a.btn
|
||||
float: none
|
||||
> a.btn
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// Kill the scroll on the body
|
||||
.modal-open {
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
// Container that the modal scrolls within
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
{**
|
||||
* 2010-2023 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through LICENSE.txt file inside our module
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright 2010-2023 Webkul IN
|
||||
* @license LICENSE.txt
|
||||
*}
|
||||
|
||||
<div class="modal-body text-center">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="text-left errors-wrap"></div>
|
||||
<div class="documents-list">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{l s='Preview'}</th>
|
||||
<th class="text-left">{l s='Title'}</th>
|
||||
<th class="text-center">{l s='Upload Date'}</th>
|
||||
<th class="text-center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="add-new-document-form" style="margin-top: 10px;">
|
||||
<div class="text-left add-new-wrap">
|
||||
<a class="btn btn-primary btn-add-new-document">
|
||||
{l s='Upload new document'}
|
||||
</a>
|
||||
<span></span>
|
||||
</div>
|
||||
<form id="form-add-new-document" class="well" method="post" action="#" style="display: none; margin-top: 5px;">
|
||||
|
||||
<input type="hidden" name="id_htl_booking" value="0">
|
||||
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Write the title for the document. Invalid characters <>;=#{}'}">
|
||||
{l s='Title'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group fixed-width-xxl">
|
||||
<input type="text" name="title" value="" placeholder="{l s='Eg. Passport, Driving license'}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label required col-sm-2">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Choose the document file to be uploaded.'}">
|
||||
{l s='File'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-file-wrap"></div>
|
||||
<div class="input-group fixed-width-xxl">
|
||||
<span class="input-group-addon"><i class="icon-file"></i></span>
|
||||
<input type="text" class="file-name" readonly="">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-default btn-add-file">
|
||||
<i class="icon-folder-open"></i>
|
||||
{l s='Add file'}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<p class="text-left" style="margin-top: 4px; font-style: italic;">
|
||||
{l s='Upload a PDF or an image file. Allowed image formats: .gif, .jpg, .jpeg and .png'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix btn-group-add-new">
|
||||
<button class="btn btn-primary pull-right upload" type="submit" name="submitAddPayment">
|
||||
{l s='Upload'}
|
||||
</button>
|
||||
<button class="btn btn-default pull-left cancel">
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{addJsDefL name=txt_booking_document_upload_success}{l s='Document uploaded successfully.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_confirm}{l s='Are you sure?' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_success}{l s='Document deleted successfully.' js=1}{/addJsDefL}
|
||||
@@ -1,233 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if $product['customizedDatas']}
|
||||
{* Assign product price *}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{assign var=product_price value=($product['unit_price_tax_excl'] + $product['ecotax'])}
|
||||
{else}
|
||||
{assign var=product_price value=$product['unit_price_tax_incl']}
|
||||
{/if}
|
||||
<tr class="customized customized-{$product['id_order_detail']|intval} product-line-row">
|
||||
<td>
|
||||
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
|
||||
{if isset($product['image']) && $product['image']->id|intval}{$product['image_tag']}{else}--{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&id_product={$product['product_id']|intval}&updateproduct&token={getAdminToken tab='AdminProducts'}">
|
||||
<span class="productName">{$product['product_name']} - {l s='Customized'}</span><br />
|
||||
{if ($product['product_reference'])}{l s='Reference number:'} {$product['product_reference']}<br />{/if}
|
||||
{if ($product['product_supplier_reference'])}{l s='Supplier reference:'} {$product['product_supplier_reference']}{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="product_price_show">{displayPrice price=$product_price currency=$currency->id|intval}</span>
|
||||
{if $can_edit}
|
||||
<div class="product_price_edit" style="display:none;">
|
||||
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
|
||||
<div class="form-group">
|
||||
<div class="fixed-width-xl">
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
|
||||
<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" />
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="fixed-width-xl">
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
|
||||
<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" />
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="productQuantity text-center">{$product['customizationQuantityTotal']}</td>
|
||||
{if $display_warehouse}<td> </td>{/if}
|
||||
{if ($order->hasBeenPaid())}<td class="productQuantity text-center">{$product['customizationQuantityRefunded']}</td>{/if}
|
||||
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<td class="productQuantity text-center">{$product['customizationQuantityReturned']}</td>{/if}
|
||||
{if $stock_management}<td class="text-center">{$product['current_stock']}</td>{/if}
|
||||
<td class="total_product">
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{displayPrice price=($product['unit_price_tax_excl'] * $product['customizationQuantityTotal']) currency=$currency->id|intval}
|
||||
{else}
|
||||
{displayPrice price=($product['unit_price_tax_incl'] * $product['customizationQuantityTotal']) currency=$currency->id|intval}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none" colspan="2">
|
||||
|
||||
</td>
|
||||
<td class="edit_product_fields" colspan="2" style="display:none"> </td>
|
||||
<td class="partial_refund_fields current-edit" style="text-align:left;display:none;"></td>
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<td class="product_action text-right">
|
||||
{* edit/delete controls *}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default edit_product_change_link">
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="#" class="delete_product_line">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{* Update controls *}
|
||||
<button type="button" class="btn btn-default submitProductChange" style="display: none;">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Update'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default cancel_product_change_link" style="display: none;">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{foreach $product['customizedDatas'] as $customizationPerAddress}
|
||||
{foreach $customizationPerAddress as $customizationId => $customization}
|
||||
<tr class="customized customized-{$product['id_order_detail']|intval}">
|
||||
<td colspan="2">
|
||||
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
|
||||
<div class="form-horizontal">
|
||||
{foreach $customization.datas as $type => $datas}
|
||||
{if ($type == Product::CUSTOMIZE_FILE)}
|
||||
{foreach from=$datas item=data}
|
||||
<div class="form-group">
|
||||
<span class="col-lg-4 control-label"><strong>{if $data['name']}{$data['name']}{else}{l s='Picture #'}{$data@iteration}{/if}</strong></span>
|
||||
<div class="col-lg-8">
|
||||
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$data@iteration}" class="_blank">
|
||||
<img class="img-thumbnail" src="{$smarty.const._THEME_PROD_PIC_DIR_}{$data['value']}_small" alt=""/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif ($type == Product::CUSTOMIZE_TEXTFIELD)}
|
||||
{foreach from=$datas item=data}
|
||||
<div class="form-group">
|
||||
<span class="col-lg-4 control-label"><strong>{if $data['name']}{l s='%s' sprintf=$data['name']}{else}{l s='Text #%s' sprintf=$data@iteration}{/if}</strong></span>
|
||||
<div class="col-lg-8">
|
||||
<p class="form-control-static">{$data['value']}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td class="productQuantity text-center">
|
||||
<span class="product_quantity_show{if (int)$customization['quantity'] > 1} red bold{/if}">{$customization['quantity']}</span>
|
||||
{if $can_edit}
|
||||
<span class="product_quantity_edit" style="display:none;">
|
||||
<input type="text" name="product_quantity[{$customizationId|intval}]" class="edit_product_quantity" value="{$customization['quantity']|htmlentities}" size="2" />
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
{if $display_warehouse}<td> </td>{/if}
|
||||
{if ($order->hasBeenPaid())}
|
||||
<td class="text-center">
|
||||
{if !empty($product['amount_refund'])}
|
||||
{l s='%s (%s refund)' sprintf=[$customization['quantity_refunded'], $product['amount_refund']]}
|
||||
{/if}
|
||||
<input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" />
|
||||
<input type="hidden" value="{(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal']))}" class="partialRefundProductAmount" />
|
||||
</td>
|
||||
{/if}
|
||||
{if ($order->hasBeenDelivered())}<td class="text-center">{$customization['quantity_returned']}</td>{/if}
|
||||
<td class="text-center">-</td>
|
||||
<td class="total_product">
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{displayPrice price=($product['unit_price_tax_excl'] * $customization['quantity']) currency=$currency->id|intval}
|
||||
{else}
|
||||
{displayPrice price=($product['unit_price_tax_incl'] * $customization['quantity']) currency=$currency->id|intval}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cancelCheck standard_refund_fields current-edit" style="display:none">
|
||||
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']|intval}" />
|
||||
<input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']|intval}" />
|
||||
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
|
||||
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($customization['quantity_returned']) < (int)($customization['quantity']))}
|
||||
<input type="checkbox" name="id_customization[{$customizationId|intval}]" id="id_customization[{$customizationId|intval}]" value="{$product['id_order_detail']|intval}" onchange="setCancelQuantity(this, {$customizationId|intval}, {$customization['quantity'] - $product['customizationQuantityTotal'] - $product['product_quantity_reinjected']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
|
||||
{if ($customization['quantity_returned'] + $customization['quantity_refunded'] >= $customization['quantity'])}
|
||||
<input type="hidden" name="cancelCustomizationQuantity[{$customizationId|intval}]" value="0" />
|
||||
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
|
||||
<input type="text" id="cancelQuantity_{$customizationId|intval}" name="cancelCustomizationQuantity[{$customizationId|intval}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" colspan="2" style="display:none; width: 250px;">
|
||||
{if $product['quantity_refundable'] > 0}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{assign var='amount_refundable' value=$product['amount_refundable']}
|
||||
{else}
|
||||
{assign var='amount_refundable' value=$product['amount_refundable_tax_incl']}
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<div class="{if $product['amount_refundable'] > 0}col-lg-4{else}col-lg-12{/if}">
|
||||
<label class="control-label">
|
||||
{l s='Quantity:'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input onchange="checkPartialRefundProductQuantity(this)" type="text" name="partialRefundProductQuantity[{$product['id_order_detail']|intval}]" value="{if ($customization['quantity']-$customization['quantity_refunded']) >0}1{else}0{/if}" />
|
||||
<div class="input-group-addon">/ {$product['quantity_refundable']}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="{if $product['quantity_refundable'] > 0}col-lg-8{else}col-lg-12{/if}">
|
||||
<label class="control-label">
|
||||
<span class="title_box ">{l s='Amount:'}</span>
|
||||
<small class="text-muted">({$smarty.capture.TaxMethod})</small>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
<input onchange="checkPartialRefundProductAmount(this)" type="text" name="partialRefundProduct[{$product['id_order_detail']|intval}]" />
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
</div>
|
||||
<p class="help-block"><i class="icon-warning-sign"></i> {l s='(Max %s %s)' sprintf=[Tools::displayPrice(Tools::ps_round($amount_refundable, 2), $currency->id), $smarty.capture.TaxMethod]}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<td class="edit_product_fields" colspan="2" style="display:none"></td>
|
||||
<td class="product_action" style="text-align:right"></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/if}
|
||||
@@ -1,110 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="form-horizontal well">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Name'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input class="form-control" type="text" name="discount_name" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Type'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<select class="form-control" name="discount_type" id="discount_type">
|
||||
<option value="1">{l s='Percent'}</option>
|
||||
<option value="2">{l s='Amount'}</option>
|
||||
{*<option value="3">{l s='Free shipping'}</option>*}<!-- By webkul no need of free shipping voucher -->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="discount_value_field" class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Value'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span id="discount_currency_sign" style="display: none;">{$currency->sign}</span>
|
||||
<span id="discount_percent_symbol">%</span>
|
||||
</div>
|
||||
<input class="form-control" type="text" name="discount_value"/>
|
||||
</div>
|
||||
<p class="text-muted" id="discount_value_help" style="display: none;">
|
||||
{l s='This value must include taxes.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $order->hasInvoice()}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Invoice'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="discount_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" selected="selected">
|
||||
{$invoice->getInvoiceNumberFormatted($current_id_lang)} - {displayPrice price=$invoice->total_paid_tax_incl currency=$order->id_currency}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<p class="checkbox">
|
||||
<label class="control-label" for="discount_all_invoices">
|
||||
<input type="checkbox" name="discount_all_invoices" id="discount_all_invoices" value="1" />
|
||||
{l s='Apply on all invoices'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="help-block">
|
||||
{l s='If you chooses to create this discount for all invoices, only one discount will be created per order invoice.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<button class="btn btn-default" type="button" id="cancel_add_voucher">
|
||||
<i class="icon-remove text-danger"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
<button class="btn btn-default" type="submit" name="submitNewVoucher">
|
||||
<i class="icon-ok text-success"></i>
|
||||
{l s='Add'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,113 +38,90 @@
|
||||
<th>
|
||||
<span class="title_box ">{l s='Amount'}</span>
|
||||
</th>
|
||||
<th></th>
|
||||
<th><span class="title_box ">{l s='Note'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getDocuments() item=document}
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
<tr id="invoice_{$document->id}">
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<tr id="orderslip_{$document->id}">
|
||||
{/if}
|
||||
<td>{dateFormat date=$document->date_add}</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{l s='Invoice'}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{l s='Credit Slip'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
|
||||
{/if}
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{$document->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
|
||||
{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getTotalPaid()}
|
||||
<span>
|
||||
{if $document->getRestPaid() > 0}
|
||||
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
|
||||
{elseif $document->getRestPaid() < 0}
|
||||
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{displayPrice price=$document->total_products_tax_incl+$document->total_shipping_tax_incl currency=$currency->id}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-right document_action">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if $document->getRestPaid()}
|
||||
<a href="#form_add_payment_panel" class="js-set-payment btn btn-default anchor" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}">
|
||||
<i class="icon-money"></i>
|
||||
{l s='Enter payment'}
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
<a href="#" class="btn btn-default" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}">
|
||||
{if $document->note eq ''}
|
||||
<i class="icon-plus-sign-alt"></i>
|
||||
{l s='Add note'}
|
||||
{else}
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit note'}
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
<tr id="invoiceNote{$document->id}" style="display:none">
|
||||
<td colspan="5">
|
||||
<form action="{$current_index}&viewOrder&id_order={$order->id}{if isset($smarty.get.token)}&token={$smarty.get.token|escape:'html':'UTF-8'}{/if}" method="post">
|
||||
<p>
|
||||
<label for="editNote{$document->id}" class="t">{l s='Note'}</label>
|
||||
<input type="hidden" name="id_order_invoice" value="{$document->id}" />
|
||||
<textarea name="note" id="editNote{$document->id}" class="edit-note textarea-autosize">{$document->note|escape:'html':'UTF-8'}</textarea>
|
||||
</p>
|
||||
<p>
|
||||
<button type="submit" name="submitEditNote" class="btn btn-default">
|
||||
<i class="icon-save"></i>
|
||||
{l s='Save'}
|
||||
</button>
|
||||
<a class="btn btn-default" href="#" id="cancelNote" onclick="$('#invoiceNote{$document->id}').hide();return false;">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</a>
|
||||
</p>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{foreachelse}
|
||||
<tr>
|
||||
{if $orderDocuments|count}
|
||||
{foreach from=$orderDocuments item=document}
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
<tr id="invoice_{$document->id}">
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<tr id="orderslip_{$document->id}">
|
||||
{/if}
|
||||
<td>{dateFormat date=$document->date_add}</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{l s='Invoice'}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{l s='Credit Slip'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
|
||||
{/if}
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{$document->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
|
||||
{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getTotalPaid()}
|
||||
<span>
|
||||
{if $document->getRestPaid() > 0}
|
||||
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
|
||||
{elseif $document->getRestPaid() < 0}
|
||||
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{displayPrice price=$document->total_products_tax_incl+$document->total_shipping_tax_incl currency=$currency->id}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="document_action">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
<a href="#" class="btn btn-default add_document_note" data-id_order_invoice="{$document->id}" data-edit_note="{$document->note|escape:'html':'UTF-8'}" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}">
|
||||
{if $document->note eq ''}
|
||||
<i class="icon-file-alt"></i> {l s='Add note'}
|
||||
{else}
|
||||
<i class="icon-pencil"></i> {l s='Edit note'}
|
||||
{/if}
|
||||
</a>
|
||||
{if $document->getRestPaid()}
|
||||
<a href="#form_add_payment_panel" class="btn btn-default js-set-payment anchor pull-right" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}">
|
||||
<i class="icon-money"></i> {l s='Enter payment'}
|
||||
</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="5" class="list-empty">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='There is no available document'}
|
||||
</div>
|
||||
{if isset($invoice_management_active) && $invoice_management_active}
|
||||
<a class="btn btn-default" href="{$current_index}&viewOrder&submitGenerateInvoice&id_order={$order->id}{if isset($smarty.get.token)}&token={$smarty.get.token|escape:'html':'UTF-8'}{/if}">
|
||||
<i class="icon-repeat"></i>
|
||||
{l s='Generate invoice'}
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{if !$orderDocuments|count && isset($invoice_management_active) && $invoice_management_active}
|
||||
<div class="well hidden-print">
|
||||
<a class="btn btn-primary" href="{$current_index}&viewOrder&submitGenerateInvoice&id_order={$order->id}{if isset($smarty.get.token)}&token={$smarty.get.token|escape:'html':'UTF-8'}{/if}">
|
||||
<i class="icon-file-text"></i> {l s='Generate invoice'}
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -68,7 +68,7 @@
|
||||
{if $order->with_occupancy}
|
||||
<div class="booking_occupancy">
|
||||
<div class="dropdown">
|
||||
<button class="booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy disabled" type="button">
|
||||
<button class="booking_guest_occupancy form-control btn btn-default btn-left btn-block input-occupancy disabled" type="button">
|
||||
<span>{l s='Select occupancy'}</span>
|
||||
</button>
|
||||
<input type="hidden" class="max_avail_type_qty" value="">
|
||||
|
||||
@@ -24,39 +24,17 @@
|
||||
*}
|
||||
|
||||
<tr class="product-line-row" data-id_htl_booking="{$data.id|escape:'html':'UTF-8'}" data-id_room="{$data.id_room}" data-id_product="{$data.id_product}" data-id_hotel="{$data.id_hotel}" data-date_from="{$data.date_from}" data-date_to="{$data.date_to}" data-product_price="{$data.unit_amt_tax_incl}" data-id_order_detail="{$data.id_order_detail}">
|
||||
{if $refund_allowed}
|
||||
<td class="standard_refund_fields" style="display:none">
|
||||
<input type="checkbox" name="id_htl_booking[]" value="{$data.id|escape:'html':'UTF-8'}" {if (isset($refundReqBookings) && ($data.id|in_array:$refundReqBookings)) || $data.is_refunded}disabled{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
<td class="text-center">
|
||||
<p>{$data.room_num}</p>
|
||||
<td>
|
||||
<p>{$data.room_num}</p>
|
||||
{if $data.is_back_order}
|
||||
<span class="overbooked_room">{l s='overbooked'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img src="{$data.image_link}" title="Room image" />
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p>{$data.room_type}</p>
|
||||
{* <p class="room_extra_demands {if !isset($data['extra_demands']) || !$data['extra_demands']}edit_product_fields{/if}" {if (!isset($data['extra_demands']) || !$data['extra_demands']) && (!isset($data['additional_services']) || !$data['additional_services'])}style="display: none;"{/if}>
|
||||
<a href="#" data-toggle="modal" data-target="#rooms_type_extra_demands" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" class="open_room_extra_services" id_htl_booking="{$data['id']}" edit_orde_line="0">
|
||||
{l s='Extra Services'}
|
||||
</a>
|
||||
</p> *}
|
||||
{* {if (isset($data['extra_demands']) && $data['extra_demands']) || (isset($data['additional_services']) && $data['additional_services'])}
|
||||
<p>
|
||||
{convertPriceWithCurrency price=($data['extra_demands_price_ti'] + $data['additional_services_price_ti']) currency=$currency->id}
|
||||
</p>
|
||||
{/if} *}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{$link->getAdminLink('AdminAddHotel')}&id={$data['id_hotel']}&updatehtl_branch_info" target="_blank">
|
||||
<span>{$data['hotel_name']}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
</td>
|
||||
<td><img src="{$data.image_link}" title="{l s='Room image'}"></td>
|
||||
<td>
|
||||
<p><a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&id_product={$data.id_product}&updateproduct" target="_blank"><span>{$data.room_type}</span></a></p>
|
||||
</td>
|
||||
<td>
|
||||
<span class="booking_duration_show">{dateFormat date=$data.date_from} - {dateFormat date=$data.date_to}</span>
|
||||
|
||||
{if $can_edit}
|
||||
@@ -65,7 +43,7 @@
|
||||
<div class="fixed-width-xl room_check_in_div">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{l s='Check In'}</div>
|
||||
<input type="text" class="form-control edit_product_date_from" name="edit_product[date_from]" value="{$data.date_from|date_format:"%d-%m-%Y"}" data-min_date="{$data.date_from|date_format:"%d-%m-%Y"}"/>
|
||||
<input type="text" class="form-control edit_product_date_from" name="edit_product[date_from]" value="{$data.date_from|date_format:"%d-%m-%Y"}" data-min_date="{$data.date_from|date_format:"%d-%m-%Y"}"/>
|
||||
<div class="input-group-addon"><i class="icon-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -81,12 +59,12 @@
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{if $data['children']}
|
||||
<div class="dropdown booking_occupancy_show">
|
||||
<button class="btn btn-default btn-left btn-block" data-toggle="dropdown" type="button">
|
||||
<a data-toggle="dropdown">
|
||||
<span>{if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}</span>
|
||||
</button>
|
||||
</a>
|
||||
<div class="dropdown-menu well well-sm">
|
||||
<label>{l s='Children Ages'}</label>
|
||||
{if isset($data['child_ages']) && $data['child_ages']}
|
||||
@@ -101,8 +79,7 @@
|
||||
{else}
|
||||
<span class="booking_occupancy_show">{if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}</span>
|
||||
{/if}
|
||||
|
||||
<div class="booking_occupancy_edit" style="display:none;">
|
||||
<div class="booking_occupancy_edit" style="display:none;">
|
||||
<div class="dropdown">
|
||||
<button class="booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy" type="button">
|
||||
<span>
|
||||
@@ -160,13 +137,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
<span class="room_unit_price_show">
|
||||
{* {if $data['feature_price_diff'] != 0}
|
||||
<span class="product_original_price room_type_old_price">
|
||||
{convertPriceWithCurrency price=$data['unit_price_without_reduction_tax_excl'] currency=$currency->id}
|
||||
</span>
|
||||
{/if} *}
|
||||
<p>
|
||||
<span class="room_type_current_price">
|
||||
{convertPriceWithCurrency price=$data['total_price_tax_excl'] currency=$currency->id}
|
||||
@@ -175,29 +147,29 @@
|
||||
<p class="help-block">{l s='Per day price:'} {convertPriceWithCurrency price=$data['paid_unit_price_tax_excl'] currency=$currency->id}</p>
|
||||
</span>
|
||||
<div class="room_unit_price_edit" style="display: none;">
|
||||
<input type="text" class="room_unit_price" name="room_unit_price" value="{$data['paid_unit_price_tax_excl']}">
|
||||
<input class="form-control" type="text" class="room_unit_price" name="room_unit_price" value="{$data['paid_unit_price_tax_excl']}">
|
||||
<p class="help-block">{l s='Set per day price'}</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
<span class="extra_service_show">
|
||||
{convertPriceWithCurrency price=($data['extra_demands_price_te'] + $data['additional_services_price_te'] + $data['convenience_fee_te'] + $data['additional_services_price_auto_add_te']) currency=$currency->id}
|
||||
{if $data['extra_demands']|count || $data['additional_services']|count}
|
||||
<a href="#" data-toggle="modal" data-target="#rooms_type_extra_demands" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" class="open_room_extra_services" id_htl_booking="{$data['id']}">
|
||||
<a class="open_room_extra_services" href="#" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" id_htl_booking="{$data['id']}">
|
||||
<i class="icon icon-lg icon-info-circle"></i>
|
||||
</a>
|
||||
{/if}
|
||||
</span>
|
||||
<span class="extra_service_edit" style="display: none;">
|
||||
<a href="#" data-toggle="modal" data-target="#rooms_type_extra_demands" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" class="open_room_extra_services" id_htl_booking="{$data['id']}">
|
||||
<a class="open_room_extra_services" href="#" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" id_htl_booking="{$data['id']}">
|
||||
{convertPriceWithCurrency price=($data['extra_demands_price_te'] + $data['additional_services_price_te'] + $data['convenience_fee_te'] + $data['additional_services_price_auto_add_te']) currency=$currency->id}
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
<span class="product_price_show">{convertPriceWithCurrency price=($data['total_room_tax']) currency=$currency->id}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
<span class="product_price_show">{convertPriceWithCurrency price=($data['total_room_price_ti']) currency=$currency->id}</span>
|
||||
{if $can_edit}
|
||||
<div class="product_price_edit" style="display:none;">
|
||||
@@ -222,7 +194,7 @@
|
||||
{/if}
|
||||
</td>
|
||||
{if (isset($refundReqBookings) && $refundReqBookings) || (isset($isCancelledRoom) && $isCancelledRoom)}
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{if $data.is_cancelled}
|
||||
<span class="badge badge-danger">{l s='Cancelled'}</span>
|
||||
{elseif isset($data.refund_info) && $data.refund_info}
|
||||
@@ -231,9 +203,11 @@
|
||||
<span>--</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{if isset($data.refund_info) && $data.refund_info}
|
||||
{convertPriceWithCurrency price=$data.refund_info.refunded_amount currency=$currency->id}
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
@@ -242,7 +216,7 @@
|
||||
{if sizeof($invoices_collection)}
|
||||
<select name="product_invoice" class="edit_product_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" {*{if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}*}>
|
||||
<option value="{$invoice->id}">
|
||||
#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}
|
||||
</option>
|
||||
{/foreach}
|
||||
@@ -251,40 +225,30 @@
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td class="product_action text-right">
|
||||
{* edit/delete controls *}
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-default edit_room_change_link">
|
||||
<td class="product_action">
|
||||
<div class="btn-group">
|
||||
<button href="#" class="btn btn-default edit_room_change_link" data-product_line_data="{$data|json_encode|escape}">
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="#" id="reallocate_room_{$data['id']}" data-room_type_name="{$data['room_type_name']}" data-toggle="modal" data-target="#mySwappigModal" data-id_htl_booking="{$data['id']}" data-room_num='{$data.room_num}' data-id_room_type='{$data.id_product}' data-cust_name='{$data.alloted_cust_name}' data-cust_email='{$data.alloted_cust_email}' data-avail_rm_swap='{$data.avail_rooms_to_swap|@json_encode}' data-avail_realloc_room_types='{$data.avail_room_types_to_realloc|@json_encode}'>
|
||||
<i class="icon-refresh"></i>
|
||||
{l s='Reallocate/Swap Room'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="delete_room_line">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="#" class="room_reallocate_swap" id="reallocate_room_{$data['id']}" data-room_type_name="{$data['room_type_name']}" data-toggle="modal" data-target="#mySwappigModal" data-id_htl_booking="{$data['id']}" data-room_num='{$data.room_num}' data-id_room_type='{$data.id_product}' data-cust_name='{$data.alloted_cust_name}' data-cust_email='{$data.alloted_cust_email}' data-avail_rm_swap='{$data.avail_rooms_to_swap|@json_encode}' data-avail_realloc_room_types='{$data.avail_room_types_to_realloc|@json_encode}'>
|
||||
<i class="icon-refresh"></i>
|
||||
{l s='Reallocate/Swap Room'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="delete_room_line">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{* Update controls *}
|
||||
<button type="button" class="btn btn-default submitRoomChange" style="display: none;">
|
||||
<i class="icon-ok"></i>
|
||||
{l s='Update'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default cancel_room_change_link" style="display: none;">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
</tr>
|
||||
@@ -1,58 +0,0 @@
|
||||
{*
|
||||
* 2010-2023 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2023 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a></li>
|
||||
<li role="presentation"><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-body" id="rooms_extra_demands">
|
||||
<div class="tab-content clearfix">
|
||||
{include file='controllers/orders/_room_facilities_block.tpl'}
|
||||
{include file='controllers/orders/_room_services_block.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Css for handling extra demands changes *}
|
||||
<style type="text/css">
|
||||
/*Extra demands CSS*/
|
||||
#room_extra_demand_content .modal-header {
|
||||
padding-bottom: 0px;}
|
||||
#rooms_type_extra_demands .modal-title {
|
||||
margin: 0px;}
|
||||
#rooms_extra_demands .demand_header {
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
border-bottom: 1px solid #ddd;}
|
||||
#rooms_extra_demands .room_demand_block {
|
||||
margin-bottom: 15px;
|
||||
color: #333;
|
||||
font-size: 14px;}
|
||||
#rooms_extra_demands .facility_nav_btn {
|
||||
margin-bottom: 20px;}
|
||||
#rooms_extra_demands .room_demands_container, #rooms_extra_demands .room_services_container {
|
||||
display: none;}
|
||||
#room_extra_demand_content #save_room_demands, #room_extra_demand_content #back_to_demands_btn, #room_extra_demand_content #save_service_service, #room_extra_demand_content #back_to_service_btn {
|
||||
display: none;}
|
||||
</style>
|
||||
|
||||
@@ -1,49 +1,62 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table" id="customer_cart_details">
|
||||
<thead>
|
||||
<tr>
|
||||
{if $refund_allowed}
|
||||
<th class="standard_refund_fields" style="display:none"></th>
|
||||
{/if}
|
||||
<th class="text-center"><span class="title_box">{l s='Room No.'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Room Image'}</th>
|
||||
<th class="text-center"><span class="title_box">{l s='Room Type'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Hotel Name'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Duration'}</span></th>
|
||||
<th class="text-center fixed-width-lg"><span class="title_box">{l s='Occupancy'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Room Price (Tax excl.)'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Extra Services/Fee (Tax excl.)'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Total Tax'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Total Price (Tax incl.)'}</span></th>
|
||||
{if (isset($refundReqBookings) && $refundReqBookings) || (isset($isCancelledRoom) && $isCancelledRoom)}
|
||||
<th class="text-center"><span class="title_box">{l s='Refund/Cancellation Status'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Refunded amount'}</span></th>
|
||||
{/if}
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<th class="text-center fixed-width-lg"><span class="title_box">{l s='Edit Order'}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $order_detail_data}
|
||||
{foreach from=$order_detail_data item=data}
|
||||
{* Include product line partial *}
|
||||
{include file='controllers/orders/_product_line.tpl'}
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td class="list-empty" colspan="14">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No rooms found'}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* Include product line partial *}
|
||||
{include file='controllers/orders/_new_product.tpl'}
|
||||
</tbody>
|
||||
</table>
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
{if $order_detail_data}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="customer_cart_details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="title_box">{l s='Room No.'}</span></th>
|
||||
<th><span class="title_box">{l s='Image'}</th>
|
||||
<th><span class="title_box">{l s='Room Type'}</span></th>
|
||||
<th><span class="title_box">{l s='Duration'}</span></th>
|
||||
<th class="fixed-width-lg"><span class="title_box">{l s='Occupancy'}</span></th>
|
||||
<th><span class="title_box">{l s='Room Price (Tax excl.)'}</span></th>
|
||||
<th><span class="title_box">{l s='Extra Services/Fee (Tax excl.)'}</span></th>
|
||||
<th><span class="title_box">{l s='Total Tax'}</span></th>
|
||||
<th><span class="title_box">{l s='Total Price (Tax incl.)'}</span></th>
|
||||
{if (isset($refundReqBookings) && $refundReqBookings) || (isset($isCancelledRoom) && $isCancelledRoom)}
|
||||
<th><span class="title_box">{l s='Refund/Cancel Status'}</span></th>
|
||||
<th><span class="title_box">{l s='Refunded amount'}</span></th>
|
||||
{/if}
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<th class="fixed-width-md"><span class="title_box">{l s='Actions'}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order_detail_data item=data}
|
||||
{* Include product line partial *}
|
||||
{include file='controllers/orders/_product_line.tpl'}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="list-empty">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='Room information not available.'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1,3 +1,22 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<table class="table" id="customer_products_details" {if !$order_service_products}style="display:none"{/if}>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,152 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="new_product">
|
||||
<input type="hidden" id="add_product_product_id" name="add_product[product_id]" value="0" />
|
||||
<div class="form-group">
|
||||
<label class="control-label">{l s='Room Type:'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="add_product_product_name" class="form-control" value="" placeholder="{l s='Enter the name of the room type'}" />
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="add_room_fields bookingDuration" style="display:none;">
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6 room_check_in_div">
|
||||
<label class="control-label">{l s='Check-In'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control add_room_date_from" name="add_product[date_from]" readonly />
|
||||
<div class="input-group-addon"><i class="icon-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 room_check_out_div">
|
||||
<label class="control-label">{l s='Check-Out'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control add_room_date_to" name="add_product[date_to]" readonly/>
|
||||
<div class="input-group-addon"><i class="icon-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price (Tax excl.)'}</label>
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
<input class="form-control" type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" disabled="disabled"/>
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price (Tax incl.)'}</label>
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
<input class="form-control" type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" disabled="disabled"/>
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="productQuantity">
|
||||
{if $order->with_occupancy}
|
||||
<div class="booking_occupancy form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Occupancy'}</label>
|
||||
<div class="dropdown">
|
||||
<button class="booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy disabled form-control" type="button">
|
||||
<span>{l s='Select occupancy'}</span>
|
||||
</button>
|
||||
<input type="hidden" class="max_avail_type_qty" value="">
|
||||
<div class="dropdown-menu booking_occupancy_wrapper well well-sm">
|
||||
<div class="booking_occupancy_inner">
|
||||
<input type="hidden" class="max_adults" value="">
|
||||
<input type="hidden" class="max_children" value="">
|
||||
<input type="hidden" class="max_guests" value="">
|
||||
<div class="occupancy_info_block row" occ_block_index="0">
|
||||
<div class="occupancy_info_head col-sm-12"><label class="room_num_wrapper">{l s='Room - 1'}</label></div>
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-6 occupancy_count_block">
|
||||
<label>{l s='Adults'}</label>
|
||||
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[0][adults]" value="1" min="1">
|
||||
</div>
|
||||
<div class="form-group col-xs-6 occupancy_count_block">
|
||||
<label>{l s='Child'} <span class="label-desc-txt"></span></label>
|
||||
<input type="number" class="form-control num_occupancy num_children" name="occupancy[0][children]" value="0" min="0">
|
||||
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
|
||||
</div>
|
||||
</div>
|
||||
<div class="row children_age_info_block" style="display:none">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="">{l s='All Children'}</label>
|
||||
<div class="">
|
||||
<div class="row children_ages">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="occupancy-info-separator col-sm-12">
|
||||
</div>
|
||||
</div>
|
||||
<div class="add_occupancy_block">
|
||||
<a class="add_new_occupancy_btn" href="#"><i class="icon-plus"></i> <span>{l s='Add Room'}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='No. of rooms'}</label>
|
||||
<input type="number" class="form-control" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" disabled="disabled" min="1"/>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if sizeof($invoices_collection)}
|
||||
<div class="form-group">
|
||||
<label class="control-label">{l s='Invoice'}</label>
|
||||
<select class="form-control" name="add_product[invoice]" id="add_product_product_invoice" disabled="disabled">
|
||||
<optgroup class="existing" label="{l s='Existing'}">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<optgroup label="{l s='New'}">
|
||||
<option value="0">{l s='Create a new invoice'}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<button type="button" class="btn btn-default" id="submitAddProduct" disabled="disabled" style="display:none;"></button>
|
||||
</div>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,86 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="text-left errors-wrap"></div>
|
||||
<div class="documents-list form-group">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{l s='Preview'}</th>
|
||||
<th class="text-left">{l s='Title'}</th>
|
||||
<th class="text-center">{l s='Upload Date'}</th>
|
||||
<th class="text-center">{l s='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="well add-new-document-form" style="margin-top: 10px;">
|
||||
<form class="form-horizontal" id="form-add-new-document" method="post" action="#">
|
||||
<input type="hidden" name="id_htl_booking" value="0">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Write the title for the document. Invalid characters <>;=#{}'}">
|
||||
{l s='Title'}
|
||||
</span>
|
||||
</label>
|
||||
<input class="form-control" type="text" name="title" value="" placeholder="{l s='eg. passport, driving license'}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label required">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Choose the document file to be uploaded.'}">
|
||||
{l s='File'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="input-file-wrap"></div>
|
||||
<div class="input-group">
|
||||
<input class="form-control file-name" type="text" readonly="">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary btn-add-file">
|
||||
<i class="icon-folder-open"></i>
|
||||
{l s='Add file'}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<p class="text-left" style="margin-top: 4px; font-style: italic;">
|
||||
{l s='Upload a PDF or an image file. Allowed image formats: .gif, .jpg, .jpeg and .png'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary pull-right upload" type="submit" name="uploadDocument" id="uploadDocument" style="display:none;">
|
||||
{l s='Upload'}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,78 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
{if $bookingOrderInfo|count > 0}
|
||||
<form id="order_discount_form" action="{$current_index}&vieworder&token={$smarty.get.token|escape:'html':'UTF-8'}&id_order={$order->id|intval}" method="post">
|
||||
<div class="form-group">
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="customer_cart_details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{l s='Room No.'}</th>
|
||||
<th>{l s='Room Type'}</th>
|
||||
<th>{l s='Hotel Name'}</th>
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Total Price (Tax incl.)'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$bookingOrderInfo item=bookingInfo}
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="id_htl_booking[]" value="{$bookingInfo.id|escape:'html':'UTF-8'}"/>
|
||||
</td>
|
||||
<td><b>{$bookingInfo.room_num|escape:'html':'UTF-8'}</b></td>
|
||||
<td>{$bookingInfo.room_type_name|escape:'html':'UTF-8'}</td>
|
||||
<td>{$bookingInfo.hotel_name|escape:'html':'UTF-8'}</td>
|
||||
<td>{dateFormat date=$bookingInfo.date_from} - {dateFormat date=$bookingInfo.date_to}</span></td>
|
||||
<td>{convertPriceWithCurrency price=$bookingInfo.total_price_tax_incl currency=$currency->id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{l s='Reason to Cancel'}</label>
|
||||
<textarea rows="3" class="textarea-autosize cancellation_reason" name="cancellation_reason"></textarea>
|
||||
</div>
|
||||
|
||||
<button style="display: none;" type="submit" name="initiateRefund" class="btn btn-primary" id="initiateRefund">
|
||||
{if $order->hasBeenPaid()}<i class="icon-undo"></i> {l s='Initiate Refund'}{else}{l s='Submit'}{/if}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
{else}
|
||||
<div class="list-empty">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No room bookings found.'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,92 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<form id="order_discount_form" action="{$current_index}&vieworder&token={$smarty.get.token|escape:'html':'UTF-8'}&id_order={$order->id|intval}" method="post">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{l s='Name'}</label>
|
||||
<input class="form-control" type="text" name="discount_name" value="" />
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Type'}</label>
|
||||
<select class="form-control" name="discount_type" id="discount_type">
|
||||
<option value="1">{l s='Percent'}</option>
|
||||
<option value="2">{l s='Amount'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6" id="discount_value_field">
|
||||
<label class="control-label">{l s='Value'}</label>
|
||||
<div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span id="discount_currency_sign" style="display: none;">{$currency->sign}</span>
|
||||
<span id="discount_percent_symbol">%</span>
|
||||
</div>
|
||||
<input class="form-control" type="text" name="discount_value"/>
|
||||
</div>
|
||||
<p class="text-muted" id="discount_value_help" style="display: none;">
|
||||
{l s='This value must include taxes.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if $order->hasInvoice()}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<label class="control-label">{l s='Invoice'}</label>
|
||||
<select name="discount_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" selected="selected">
|
||||
{$invoice->getInvoiceNumberFormatted($current_id_lang)} - {displayPrice price=$invoice->total_paid_tax_incl currency=$order->id_currency}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<p class="checkbox">
|
||||
<label class="control-label" for="discount_all_invoices">
|
||||
<input type="checkbox" name="discount_all_invoices" id="discount_all_invoices" value="1" />
|
||||
{l s='Apply on all invoices'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="help-block">
|
||||
{l s='If you chooses to create this discount for all invoices, only one discount will be created per order invoice.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<button class="btn btn-default" type="submit" name="submitNewVoucher" style="display:none" id="submitNewVoucher"></button>
|
||||
</form>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<form action="{$current_index}&viewOrder&id_order={$order->id}{if isset($smarty.get.token)}&token={$smarty.get.token|escape:'html':'UTF-8'}{/if}" method="post">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{l s='Note Detail'}</label>
|
||||
<input type="hidden" name="id_order_invoice" id="id_order_invoice" value="" />
|
||||
<textarea name="note" id="editNote" class="edit-note textarea-autosize"></textarea>
|
||||
</div>
|
||||
<button class="btn btn-default" type="submit" name="submitEditNote" style="display:none" id="submitEditNote"></button>
|
||||
</form>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,47 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="edit_product">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#edit_room_tab" role="tab" data-toggle="tab">{l s='Rooms'}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content clearfix">
|
||||
{include file='controllers/orders/modals/_edit_room_tab_content.tpl'}
|
||||
|
||||
{* below tpl contains tab contents for facilities and service products *}
|
||||
{include file='controllers/orders/modals/_partials/_room_extra_services_content.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,128 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div id="edit_room_tab" class="tab-pane active">
|
||||
<input type="hidden" name="id_order" value="{$data.id_order}" />
|
||||
<input type="hidden" name="id_room" value="{$data.id_room}" />
|
||||
<input type="hidden" name="id_product" value="{$data.id_product}" />
|
||||
<input type="hidden" name="id_hotel" value="{$data.id_hotel}" />
|
||||
<input type="hidden" name="date_from" value="{$data.date_from}" />
|
||||
<input type="hidden" name="date_to" value="{$data.date_to}" />
|
||||
<input type="hidden" name="id_order_detail" value="{$data.id_order_detail}" />
|
||||
<input type="hidden" name="product_price_tax_excl" value="{Tools::ps_round($data.original_unit_price_tax_excl, 2)}" />
|
||||
<input type="hidden" name="product_price_tax_incl" value="{Tools::ps_round($data.original_unit_price_tax_incl, 2)}" />
|
||||
|
||||
<div class="edit_room_fields">
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6 room_check_in_div">
|
||||
<label class="control-label">{l s='Check-In'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control edit_product_date_from" readonly/>
|
||||
<input type="hidden" class="edit_product_date_from_actual" name="edit_product[date_from]"/>
|
||||
<div class="input-group-addon"><i class="icon-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 room_check_out_div">
|
||||
<label class="control-label">{l s='Check-Out'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control edit_product_date_to" readonly/>
|
||||
<input type="hidden" class="edit_product_date_to_actual" name="edit_product[date_to]"/>
|
||||
<div class="input-group-addon"><i class="icon-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price (Tax excl.)'}</label>
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
<input class="form-control room_unit_price" type="text" name="room_unit_price" value=""/>
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Occupancy'}</label>
|
||||
{if $order->with_occupancy}
|
||||
<div class="booking_occupancy_edit">
|
||||
<div class="dropdown">
|
||||
<button class="form-control booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy" type="button">
|
||||
<span>
|
||||
{if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}
|
||||
</span>
|
||||
</button>
|
||||
<div class="dropdown-menu booking_occupancy_wrapper fixed-width-xxl well well-sm">
|
||||
<div class="booking_occupancy_inner">
|
||||
<input type="hidden" class="max_adults" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_adults']|escape:'html':'UTF-8'}{/if}">
|
||||
<input type="hidden" class="max_children" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_children']|escape:'html':'UTF-8'}{/if}">
|
||||
<input type="hidden" class="max_guests" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_guests']|escape:'html':'UTF-8'}{/if}">
|
||||
<div class="occupancy_info_block" occ_block_index="0">
|
||||
<div class="occupancy_info_head col-sm-12"><span class="room_num_wrapper">{l s='Room - 1'}</span></div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 occupancy_count_block">
|
||||
<div class="col-sm-12">
|
||||
<label>{l s='Adults'}</label>
|
||||
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[0][adults]" value="{$data['adults']}" min="1" max="{$data['room_type_info']['max_adults']|escape:'html':'UTF-8'}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 occupancy_count_block">
|
||||
<div class="col-sm-12">
|
||||
<label>{l s='Child'} <span class="label-desc-txt"></span></label>
|
||||
<input type="number" class="form-control num_occupancy num_children" name="occupancy[0][children]" value="{$data['children']}" min="0" max="{$data['room_type_info']['max_children']|escape:'html':'UTF-8'}">
|
||||
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row children_age_info_block" {if !isset($data['child_ages']) || !$data['child_ages']}style="display:none"{/if}>
|
||||
<div class="col-sm-12">
|
||||
<label class="col-sm-12">{l s='All Children'}</label>
|
||||
<div class="col-sm-12">
|
||||
<div class="row children_ages">
|
||||
{if isset($data['child_ages']) && $data['child_ages']}
|
||||
{foreach $data['child_ages'] as $childAge}
|
||||
<p class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<select class="guest_child_age room_occupancies" name="occupancy[0][child_ages][]">
|
||||
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select 1'}</option>
|
||||
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1'}</option>
|
||||
{for $age=1 to ($max_child_age-1)}
|
||||
<option value="{$age|escape:'htmlall':'UTF-8'}" {if $childAge == $age}selected{/if}>{$age|escape:'htmlall':'UTF-8'}</option>
|
||||
{/for}
|
||||
</select>
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<span class="booking_occupancy_edit" style="display:none;">{if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="submitRoomChange" class="btn btn-primary"><i class="icon icon-bed"></i> {l s="Update Rooms"}</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,34 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="extra-services-content modal-body">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a></li>
|
||||
<li role="presentation"><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content clearfix">
|
||||
{include file='controllers/orders/modals/_partials/_room_extra_services_content.tpl'}
|
||||
</div>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -1,5 +1,5 @@
|
||||
{*
|
||||
* 2010-2023 Webkul.
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -13,11 +13,11 @@
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2023 Webkul IN
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div id="room_type_demands_desc" class="tab-pane active">
|
||||
<div id="room_type_demands_desc" class="tab-pane {if (isset($show_active) && $show_active) || (!isset($orderEdit) || !$orderEdit)}active{/if} extra-services-container">
|
||||
<input type="hidden" value="{$id_booking_detail}" id="id_htl_booking">
|
||||
{if isset($orderEdit) && $orderEdit}
|
||||
<p class="col-sm-12 facility_nav_btn">
|
||||
@@ -52,13 +52,13 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>{displayPrice price=$demand['total_price_tax_excl'] currency=$orderCurrency}</td>
|
||||
<td><a class="btn btn-danger pull-right del-order-room-demand" href="#" id_booking_demand="{$demand['id_booking_demand']}"><i class="icon-trash"></i></a></td>
|
||||
<td class="text-right"><a class="btn btn-danger pull-right del-order-room-demand" href="#" id_booking_demand="{$demand['id_booking_demand']}"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="4">
|
||||
<i class="icon-warning"></i> {l s='No facilities added yet.'}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -77,7 +77,7 @@
|
||||
<th></th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Option'}</th>
|
||||
<th class="text-right">{l s='Unit Price'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -105,8 +105,7 @@
|
||||
<input type="hidden" class="id_option" value="0" />
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
{if isset($selected_adv_option) && isset($demand['adv_option'][$selected_adv_option]['price_tax_excl'])}
|
||||
@@ -126,41 +125,50 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="save_room_demands" class="btn btn-primary"><i class="icon icon-save"></i> {l s="Update Facilities"}</button>
|
||||
</div>
|
||||
{else}
|
||||
<i class="icon-warning"></i> {l s='No facilities available for this room.'}
|
||||
<i class="icon-warning"></i> {l s='No facilities available for this room.'}
|
||||
{/if}
|
||||
</div>
|
||||
<button type="button" id="save_room_demands" class="btn btn-success pull-right"><i class="icon-save"></i> {l s='Save'}</button>
|
||||
</div>
|
||||
{elseif isset($extraDemands) && $extraDemands}
|
||||
{foreach $extraDemands as $roomDemand}
|
||||
<div class="row room_demand_detail">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th class="text-right">{l s='Total Price'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $roomDemand['extra_demands'] as $demand}
|
||||
<tr class="room_demand_block">
|
||||
<td>{$demand['name']}</td>
|
||||
<td>
|
||||
{displayPrice price=$demand['unit_price_tax_excl'] currency=$orderCurrency}
|
||||
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
|
||||
{l s='/ night'}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-right">{displayPrice price=$demand['total_price_tax_excl'] currency=$orderCurrency}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/foreach}
|
||||
{else}
|
||||
{l s='No facilities selected!'}
|
||||
<div class="room_demand_detail">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th>{l s='Total Price'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if isset($extraDemands) && $extraDemands}
|
||||
{foreach $extraDemands as $roomDemand}
|
||||
{foreach $roomDemand['extra_demands'] as $demand}
|
||||
<tr class="room_demand_block">
|
||||
<td>{$demand['name']}</td>
|
||||
<td>
|
||||
{displayPrice price=$demand['unit_price_tax_excl'] currency=$orderCurrency}
|
||||
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
|
||||
{l s='/ night'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>{displayPrice price=$demand['total_price_tax_excl'] currency=$orderCurrency}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<i class="icon-warning"></i> {l s='No facilities added yet.'}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -1,5 +1,5 @@
|
||||
{*
|
||||
* 2010-2023 Webkul.
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -13,11 +13,11 @@
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2023 Webkul IN
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div id="room_type_service_product_desc" class="tab-pane {if isset($show_active) && $show_active}active{/if}">
|
||||
<div id="room_type_service_product_desc" class="tab-pane {if isset($show_active) && $show_active}active{/if} extra-services-container">
|
||||
{if isset($orderEdit) && $orderEdit}
|
||||
|
||||
<p class="col-sm-12 facility_nav_btn">
|
||||
@@ -27,12 +27,12 @@
|
||||
|
||||
{* Already selected room services *}
|
||||
<div class="col-sm-12 room_ordered_services table-responsive">
|
||||
<table class="table">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Name'}</th>
|
||||
<th class="fixed-width-sm"></th>
|
||||
<th class="fixed-width-sm">{l s='Quantity'}</th>
|
||||
<th class="fixed-width-sm text-center">{l s='Quantity'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th>{l s='Total Price'}</th>
|
||||
<th class="text-right">{l s='Action'}</th>
|
||||
@@ -45,7 +45,7 @@
|
||||
<td>
|
||||
<div>{$service['name']|escape:'html':'UTF-8'}</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
|
||||
<span class="badge badge-info label">{l s='Auto added'}</span><br>
|
||||
{/if}
|
||||
@@ -53,7 +53,7 @@
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-center">
|
||||
{if $service['allow_multiple_quantity']}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control qty" min="1" data-id_product="{$service['id_product']|escape:'html':'UTF-8'}" value="{$service['quantity']|escape:'html':'UTF-8'}">
|
||||
@@ -78,7 +78,7 @@
|
||||
{/if} *}
|
||||
</td>
|
||||
<td>{displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency}</td>
|
||||
<td><a class="btn btn-danger pull-right del_room_additional_service" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}" href="#"><i class="icon-trash"></i></a></td>
|
||||
<td class="text-right"><a class="btn btn-danger pull-right del_room_additional_service" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}" href="#"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
@@ -100,7 +100,7 @@
|
||||
<th></th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th class="fixed-width-sm"> </th>
|
||||
<th class="fixed-width-sm">{l s='Quantity'}</th>
|
||||
<th class="fixed-width-sm text-center">{l s='Quantity'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -121,7 +121,7 @@
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-center">
|
||||
{if $product['allow_multiple_quantity']}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control qty" min="1" id="qty_{$product['id_product']|escape:'html':'UTF-8'}" name="service_qty[{$product['id_product']|escape:'html':'UTF-8'}]" data-id-product="{$product.id_product|escape:'html':'UTF-8'}" value="1">
|
||||
@@ -143,12 +143,15 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="save_service_service" class="btn btn-primary"><i class="icon icon-save"></i> {l s="Update Services"}</button>
|
||||
</div>
|
||||
{else}
|
||||
<i class="icon-warning"></i> {l s='No services available to add to this room.'}
|
||||
{/if}
|
||||
</div>
|
||||
<input type="hidden" name="id_booking_detail" value="{$id_booking_detail}">
|
||||
<button type="submit" id="save_service_service" class="btn btn-success pull-right"><i class="icon-save"></i> {l s='Save'}</button>
|
||||
</form>
|
||||
|
||||
{elseif isset($additionalServices) && $additionalServices}
|
||||
@@ -159,7 +162,7 @@
|
||||
<th>{l s='Name'}</th>
|
||||
<th></th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th class="text-right">{l s='Total Price'}</th>
|
||||
<th>{l s='Total Price'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
@@ -169,7 +172,7 @@
|
||||
{$service['id_product']|escape:'html':'UTF-8'} <a target="blank" href="{$link->getAdminLink('AdminNormalProducts')|escape:'html':'UTF-8'}&id_product={$service['id_product']|escape:'html':'UTF-8'}&updateproduct"><i class="icon-external-link-sign"></i></a>
|
||||
</td>
|
||||
<td>{$service['name']|escape:'html':'UTF-8'}</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT}
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
@@ -183,7 +186,7 @@
|
||||
{l s='/ night'}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td>
|
||||
{displayPrice price=$service['total_price_tax_excl'] currency=$orderCurrency}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,77 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Payment Date'}</label>
|
||||
<b><div id="payment_date"></div></b>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Payment Method'}</label>
|
||||
<b><div id="payment_method"></div></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Payment Source'}</label>
|
||||
<b><div id="payment_source"></div></b>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Transaction Id'}</label>
|
||||
<b><div id="transaction_id"></div></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Amount'}</label>
|
||||
<b><div id="amount"></div></b>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Invoice'}</label>
|
||||
<b><div id="invoice_number"></div></b>
|
||||
</div>
|
||||
</div>
|
||||
{* <div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Card Number'}</label>
|
||||
<b><div id="card_number"></div></b>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Card Brand'}</label>
|
||||
<b><div id="card_brand"></div></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Card Expiration'}</label>
|
||||
<b><div id="card_expiration"></div></b>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Card Holder'}</label>
|
||||
<b><div id="card_holder"></div></b>
|
||||
</div>
|
||||
</div> *}
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,94 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<form id="form_add_payment" method="post" action="{$current_index}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'html':'UTF-8'}">
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Date'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="payment_date" class="datepicker" value="{date('Y-m-d')}" />
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-calendar-o"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Payment method'}</label>
|
||||
<div>
|
||||
<input name="payment_method" list="payment_method" class="form-control payment_method">
|
||||
<datalist id="payment_method">
|
||||
{foreach from=$payment_methods item=payment_method}
|
||||
<option value="{$payment_method}">
|
||||
{/foreach}
|
||||
</datalist>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Payment source'}</label>
|
||||
<select name="payment_type" class="payment_type form-control">
|
||||
{foreach from=$payment_types item=payment_type}
|
||||
<option value="{$payment_type['value']}">{$payment_type['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Transaction ID'}</label>
|
||||
<input type="text" name="payment_transaction_id" value="" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Amount'}</label>
|
||||
<input type="text" name="payment_amount" value="" class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Currency'}</label>
|
||||
<select name="payment_currency" class="payment_currency form-control pull-left">
|
||||
{foreach from=$currencies item=current_currency}
|
||||
<option value="{$current_currency['id_currency']}"{if $current_currency['id_currency'] == $currency->id} selected="selected"{/if}>{$current_currency['sign']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{if count($invoices_collection) > 0}
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Invoice'}</label>
|
||||
<select name="payment_invoice" id="payment_invoice">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}" selected="selected">{$invoice->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<button style="display:none" class="btn btn-primary pull-right" type="submit" name="submitAddPayment" id="submitAddPayment">
|
||||
{l s='Add payment'}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
{include file='controllers/orders/modals/_extra_services_facilities_tab_content.tpl'}
|
||||
{include file='controllers/orders/modals/_extra_services_service_products_tab_content.tpl'}
|
||||
|
||||
{* Css for handling extra demands changes *}
|
||||
<style type="text/css">
|
||||
/*Extra demands CSS*/
|
||||
#edit_product .extra-services-container .room_demands_container,
|
||||
#edit_product .extra-services-container .room_services_container {
|
||||
display: none;}
|
||||
#edit_product .extra-services-container #save_room_demands,
|
||||
#edit_product .extra-services-container #back_to_demands_btn,
|
||||
#edit_product .extra-services-container #save_service_service,
|
||||
#edit_product .extra-services-container #back_to_service_btn {
|
||||
display: none;}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../');
|
||||
exit;
|
||||
@@ -0,0 +1,134 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#reallocate_room_tab" aria-controls="reallocate" role="tab" data-toggle="tab">{l s='Room Reallocation'}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#swap_room_tab" aria-controls="swap" role="tab" data-toggle="tab">{l s='Swap Room'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content active">
|
||||
<div role="tabpanel" class="tab-pane active" id="reallocate_room_tab">
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Currently Alloted Customer'}</label>
|
||||
<dd><i class="icon-user"></i> <span class="cust_name"></span></dd>
|
||||
<dd><i class="icon-envelope"></i> <span class="cust_email"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<form class="form-hozizontal" method="post" action="{$current_index}&vieworder&token={$smarty.get.token|escape:'html':'UTF-8'}&id_order={$order->id|intval}">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="realloc_avail_room_type" class="control-label model-label">{l s='Room Type To Reallocate:'}</label>
|
||||
<input type="hidden" class="form-control modal_id_htl_booking" name="id_htl_booking">
|
||||
<div class="realloc_avail_room_type_container">
|
||||
<select class="form-control" name="realloc_avail_room_type" id="realloc_avail_room_type">
|
||||
<option value="0" selected="selected">{l s='Select Room Type'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="error_text" id="realloc_sel_rm_type_err_p"></p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="realloc_avail_rooms" class="control-label model-label">{l s='Room To Reallocate:'}</label>
|
||||
<div class="realloc_avail_rooms_container">
|
||||
<select class="form-control" name="realloc_avail_rooms" id="realloc_avail_rooms">
|
||||
<option value="0" selected="selected">{l s='Select Rooms'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="error_text" id="realloc_sel_rm_err_p"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="reallocation_price_diff_block" style="display:none;">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="reallocation_price_diff" class="control-label model-label">{l s='Price Difference'} *</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
|
||||
<input class="alert-warning" type="text" name="reallocation_price_diff" id="reallocation_price_diff" value="0" />
|
||||
<span class="input-group-addon">{l s='Tax excl.'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="alert alert-warning col-sm-12 realloc_roomtype_change_message" style="display:none">
|
||||
<p>{l s="If room type is changed while room reallocation then all additional facilities and services will be assigned to the selected room of new room type."}</p>
|
||||
<p>{l s="If you want to change additional facilities or services, you can update by editing the room after reallocation."}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="error_text" id="realloc_sel_rm_err_p"></p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default btn-close" data-dismiss="modal">{l s="Close"}</button>
|
||||
<button type="submit" id="realloc_allocated_rooms" name="realloc_allocated_rooms" class="btn btn-primary" value="Reallocate"><i class="icon icon-refresh"></i> {l s="Reallocate"}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="swap_room_tab">
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Currently Alloted Customer'}</label>
|
||||
<dd><i class="icon-user"></i> <span class="cust_name"></span></dd>
|
||||
<dd><i class="icon-envelope"></i> <span class="cust_email"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<hr>
|
||||
<form method="post" action="{$current_index}&vieworder&token={$smarty.get.token|escape:'html':'UTF-8'}&id_order={$order->id|intval}">
|
||||
<div class="form-group">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<label for="swap_avail_rooms" class="control-label model-label">{l s='Available rooms to swap'}</label>
|
||||
<input type="hidden" class="form-control modal_id_htl_booking" name="id_htl_booking">
|
||||
<div class="swap_avail_rooms_container"></div>
|
||||
|
||||
<p class="error_text" id="swap_sel_rm_err_p"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default btn-close" data-dismiss="modal">{l s="Close"}</button>
|
||||
<button type="submit" id="swap_allocated_rooms" name="swap_allocated_rooms" class="btn btn-primary" value="Swap"><i class="icon icon-refresh"></i> {l s="Swap"}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* If you want to show loader in your modals the send loaderImage from postProcess() method *}
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<form action="{$current_index}&vieworder&token={$smarty.get.token|escape:'html':'UTF-8'}&id_order={$order->id|intval}" method="post" class="room_status_info_form">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{l s='Status'}</label>
|
||||
<select name="booking_order_status" class="form-control booking_order_status margin-bottom-5">
|
||||
{foreach from=$hotel_order_status item=state}
|
||||
<option value="{$state['id_status']|intval}">{$state.name|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" style="display:none;">
|
||||
<label class="control-label">{l s='Date'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="status_date" class="room_status_date wk-input-date" value="" />
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-calendar-o"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="room_status_id_hotel_booking_detail" name="id_hotel_booking_detail" />
|
||||
<input type="hidden" id="room_status_date_from" name="date_from" />
|
||||
<input type="hidden" id="room_status_date_to" name="date_to" />
|
||||
<input type="hidden" id="room_status_id_room" name="id_room" />
|
||||
<input type="hidden" id="room_status_id_order" name="id_order" />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" type="submit" name="submitbookingOrderStatus" style="display:none" id="submitbookingOrderStatus"></button>
|
||||
</form>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,57 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<form id="customer-guest-details-form">
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-2">
|
||||
<label class="control-label">{l s='Date'}</label>
|
||||
<select name="id_gender">
|
||||
{foreach from=$genders key=k item=gender}
|
||||
<option value="{$gender->id_gender}"{if $customerGuestDetail->id_gender == $gender->id_gender} selected="selected"{/if}>{$gender->name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<label class="control-label">{l s='First Name'}</label>
|
||||
<input type="text" value="{$customerGuestDetail->firstname}" name="firstname">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<label class="control-label">{l s='Last Name'}</label>
|
||||
<input type="text" value="{$customerGuestDetail->lastname}" name="lastname">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Email'}</label>
|
||||
<input type="text" value="{$customerGuestDetail->email}" name="email">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Phone'}</label>
|
||||
<input type="text" value="{$customerGuestDetail->phone}" name="phone">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../');
|
||||
exit;
|
||||
@@ -297,7 +297,7 @@
|
||||
{/if}
|
||||
|
||||
<ul id="header_employee_box">
|
||||
{if $upgrade_info->update_available > 0}
|
||||
{if isset($upgrade_info->update_available) && $upgrade_info->update_available > 0}
|
||||
<li class="hidden-md hidden-sm hidden-xs"><a href="{$upgrade_info->upgrade_url}">{l s='QloApps Update Availabe:'} {$upgrade_info->latest_availabe}</a></li>
|
||||
{/if}
|
||||
<li class="hidden-sm hidden-xs">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="modal-content">
|
||||
{if isset($modal_title)}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<button type="button" class="close" data-dismiss="modal"><i class="icon-remove-sign"></i></button>
|
||||
<h4 class="modal-title">{$modal_title}</h4>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
{if isset($modal_actions)}
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{l s='Close'}</button>
|
||||
<button type="button" class="btn btn-default btn-close" data-dismiss="modal">{l s='Close'}</button>
|
||||
{foreach $modal_actions as $action}
|
||||
{if $action.type == 'link'}
|
||||
<a href="{$action.href}" class="btn {$action.class}">{$action.label}</a>
|
||||
|
||||
170
classes/Cart.php
170
classes/Cart.php
@@ -1797,18 +1797,13 @@ class CartCore extends ObjectModel
|
||||
(int)$product['id_product'],
|
||||
isset($product['id_hotel']) ? $product['id_hotel'] : 0,
|
||||
0,
|
||||
isset($product['date_from']) ? $product['date_from'] : 0,
|
||||
isset($product['date_to']) ? $product['date_to'] : 0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
$with_taxes,
|
||||
null
|
||||
);
|
||||
} else if ($roomTypesByIdProduct = $objCartBookingData->getCartInfoIdCartIdProduct(
|
||||
$this->id,
|
||||
$product['id_product'],
|
||||
isset($product['date_from']) ? $product['date_from'] : 0,
|
||||
isset($product['date_to']) ? $product['date_to'] : 0,
|
||||
)) {
|
||||
} else if ($roomTypesByIdProduct = $objCartBookingData->getCartInfoIdCartIdProduct($this->id, $product['id_product'])) {
|
||||
// by webkul to calculate rates of the product from hotelreservation syatem tables with feature prices....
|
||||
$totalPriceByProduct = 0;
|
||||
$priceDisplay = Group::getPriceDisplayMethod(Group::getCurrent()->id);
|
||||
@@ -2355,78 +2350,28 @@ class CartCore extends ObjectModel
|
||||
foreach ($packages as $id_package => $package) {
|
||||
foreach ($package['product_list'] as $product) {
|
||||
if ($product['booking_product']) {
|
||||
if ($roomsBookingDetails = $objHtlCartBookingData->getOnlyCartBookingData(
|
||||
$this->id,
|
||||
$this->id_guest,
|
||||
$product['id_product']
|
||||
)) {
|
||||
$productInfo = $objRoomType->getRoomTypeInfoByIdProduct($product['id_product']);
|
||||
$idHotel = $productInfo['id_hotel'] ? $productInfo['id_hotel'] : 0;
|
||||
$cartRoomInfo = array();
|
||||
foreach ($roomsBookingDetails as $roomBooking) {
|
||||
$dateJoinKey = $idHotel.'-'.strtotime($roomBooking['date_from']).strtotime($roomBooking['date_to']);
|
||||
$roomTotalPrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
|
||||
$product['id_product'],
|
||||
$roomBooking['date_from'],
|
||||
$roomBooking['date_to'],
|
||||
0,
|
||||
Group::getCurrent()->id,
|
||||
$this->id,
|
||||
$this->id_guest,
|
||||
0,
|
||||
0
|
||||
);
|
||||
$newQty = HotelHelper::getNumberOfDays(
|
||||
$roomBooking['date_from'],
|
||||
$roomBooking['date_to']
|
||||
);
|
||||
if (isset($cartRoomInfo[$dateJoinKey])) {
|
||||
$cartRoomInfo[$dateJoinKey]['cart_quantity'] += $newQty;
|
||||
$cartRoomInfo[$dateJoinKey]['total_price_tax_incl'] += $roomTotalPrice['total_price_tax_incl'];
|
||||
$cartRoomInfo[$dateJoinKey]['total_price_tax_excl'] += $roomTotalPrice['total_price_tax_excl'];
|
||||
} else {
|
||||
$cartRoomInfo[$dateJoinKey] = array(
|
||||
'cart_quantity' => $newQty,
|
||||
'total_price_tax_incl' => $roomTotalPrice['total_price_tax_incl'],
|
||||
'total_price_tax_excl' => $roomTotalPrice['total_price_tax_excl'],
|
||||
'date_from' => $roomBooking['date_from'],
|
||||
'date_to' => $roomBooking['date_to'],
|
||||
);
|
||||
}
|
||||
}
|
||||
foreach ($cartRoomInfo as $dateJoinKey => $cartRoom) {
|
||||
if (!isset($orderPackage[$id_address][$dateJoinKey])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['product_list'] = array();
|
||||
$productInfo = $objRoomType->getRoomTypeInfoByIdProduct($product['id_product']);
|
||||
$idHotel = $productInfo['id_hotel'] ? $productInfo['id_hotel'] : 0;
|
||||
|
||||
$orderPackage[$id_address][$dateJoinKey]['id_hotel'] = $idHotel;
|
||||
if (!isset($orderPackage[$id_address][$dateJoinKey]['id_hotel'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['id_hotel'] = $productInfo['id_hotel'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$dateJoinKey]['carrier_list'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['carrier_list'] = $product['carrier_list'];
|
||||
} else {
|
||||
$orderPackage[$id_address][$dateJoinKey]['carrier_list'] = array_intersect($orderPackage[$id_address][$dateJoinKey]['carrier_list'], $product['carrier_list']);
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$dateJoinKey]['warehouse_list'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['warehouse_list'] = $package['warehouse_list'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$dateJoinKey]['id_warehouse'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['id_warehouse'] = $package['id_warehouse'];
|
||||
}
|
||||
if (isset($package['id_carrier'])) {
|
||||
if (!isset($orderPackage[$id_address][$dateJoinKey]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['id_carrier'] = $package['id_carrier'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$product['date_from'] = $cartRoom['date_from'];
|
||||
$product['date_to'] = $cartRoom['date_to'];
|
||||
$product['total_wt'] = $cartRoom['total_price_tax_incl'];
|
||||
$product['total'] = $cartRoom['total_price_tax_excl'];
|
||||
$product['cart_quantity'] = $cartRoom['cart_quantity'];
|
||||
$product['price_wt'] = $cartRoom['total_price_tax_incl'] / $cartRoom['cart_quantity'];
|
||||
$product['price'] = $cartRoom['total_price_tax_excl'] / $cartRoom['cart_quantity'];
|
||||
$orderPackage[$id_address][$dateJoinKey]['product_list'][] = $product;
|
||||
$orderPackage[$id_address][$idHotel]['product_list'][] = $product;
|
||||
$orderPackage[$id_address][$idHotel]['id_hotel'] = $idHotel;
|
||||
if (!isset($orderPackage[$id_address][$idHotel]['id_hotel'])) {
|
||||
$orderPackage[$id_address][$idHotel]['id_hotel'] = $productInfo['id_hotel'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$idHotel]['carrier_list'])) {
|
||||
$orderPackage[$id_address][$idHotel]['carrier_list'] = $product['carrier_list'];
|
||||
} else {
|
||||
$orderPackage[$id_address][$idHotel]['carrier_list'] = array_intersect($orderPackage[$id_address][$idHotel]['carrier_list'], $product['carrier_list']);
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$idHotel]['warehouse_list'])) {
|
||||
$orderPackage[$id_address][$idHotel]['warehouse_list'] = $package['warehouse_list'];
|
||||
}
|
||||
if (!isset($orderPackage[$id_address][$idHotel]['id_warehouse'])) {
|
||||
$orderPackage[$id_address][$idHotel]['id_warehouse'] = $package['id_warehouse'];
|
||||
}
|
||||
if (isset($package['id_carrier'])) {
|
||||
if (!isset($orderPackage[$id_address][$idHotel]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$idHotel]['id_carrier'] = $package['id_carrier'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2434,16 +2379,14 @@ class CartCore extends ObjectModel
|
||||
if ($selectedServiceProducts = $objRoomTypeServiceProductCartDetail->getServiceProductsInCart($this->id, $product['id_product'], 0, 0, 0, 0, 0, 0, null, null)) {
|
||||
$array = array();
|
||||
foreach($selectedServiceProducts as $selectedProduct) {
|
||||
$dateJoinKey = $selectedProduct['id_hotel'].'-'.strtotime($selectedProduct['date_from']).strtotime($selectedProduct['date_to']);
|
||||
if (isset($array[$dateJoinKey])) {
|
||||
$array[$dateJoinKey]['total_price_tax_excl'] += $selectedProduct['total_price_tax_excl'];
|
||||
$array[$dateJoinKey]['total_price_tax_incl'] += $selectedProduct['total_price_tax_incl'];
|
||||
if (isset($array[$selectedProduct['id_hotel']])) {
|
||||
$array[$selectedProduct['id_hotel']]['quantity'] += $selectedProduct['quantity'];
|
||||
$array[$selectedProduct['id_hotel']]['total_price_tax_excl'] += $selectedProduct['total_price_tax_excl'];
|
||||
$array[$selectedProduct['id_hotel']]['total_price_tax_incl'] += $selectedProduct['total_price_tax_incl'];
|
||||
} else {
|
||||
$array[$dateJoinKey] = array(
|
||||
'id_hotel' => $selectedProduct['id_hotel'],
|
||||
$array[$selectedProduct['id_hotel']] = array(
|
||||
'quantity' => 0,
|
||||
'date_from' => $selectedProduct['date_from'],
|
||||
'date_to' => $selectedProduct['date_to'],
|
||||
'id_hotel' => $selectedProduct['id_hotel'],
|
||||
'total_price_tax_excl' => $selectedProduct['total_price_tax_excl'],
|
||||
'total_price_tax_incl' => $selectedProduct['total_price_tax_incl'],
|
||||
);
|
||||
@@ -2453,40 +2396,37 @@ class CartCore extends ObjectModel
|
||||
$selectedProduct['date_from'],
|
||||
$selectedProduct['date_to']
|
||||
);
|
||||
$array[$dateJoinKey]['quantity'] += ($selectedProduct['quantity'] * $numDays);
|
||||
$array[$selectedProduct['id_hotel']]['quantity'] += ($selectedProduct['quantity'] * $numDays);
|
||||
} else {
|
||||
$array[$dateJoinKey]['quantity'] += $selectedProduct['quantity'];
|
||||
$array[$selectedProduct['id_hotel']]['quantity'] += $selectedProduct['quantity'];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach($array as $dateJoinKey => $selectedProduct) {
|
||||
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'] / $product['cart_quantity'];
|
||||
$product['price'] = $selectedProduct['total_price_tax_excl'] / $product['cart_quantity'];
|
||||
$product['price_wt'] = $selectedProduct['unit_price_tax_incl'];
|
||||
$product['id_hotel'] = $selectedProduct['id_hotel'];
|
||||
$product['date_from'] = $selectedProduct['date_from'];
|
||||
$product['date_to'] = $selectedProduct['date_to'];
|
||||
$orderPackage[$id_address][$dateJoinKey]['product_list'][] = $product;
|
||||
if (!isset($orderPackage[$id_address][$dateJoinKey]['id_hotel'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['id_hotel'] = $selectedProduct['id_hotel'];
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['product_list'][] = $product;
|
||||
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][$dateJoinKey]['carrier_list'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['carrier_list'] = $product['carrier_list'];
|
||||
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][$dateJoinKey]['carrier_list'] = array_intersect($orderPackage[$id_address][$dateJoinKey]['carrier_list'], $product['carrier_list']);
|
||||
$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][$dateJoinKey]['warehouse_list'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['warehouse_list'] = $package['warehouse_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][$dateJoinKey]['id_warehouse'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['id_warehouse'] = $package['id_warehouse'];
|
||||
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][$dateJoinKey]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$dateJoinKey]['id_carrier'] = $package['id_carrier'];
|
||||
if (!isset($orderPackage[$id_address][$selectedProduct['id_hotel']]['id_carrier'])) {
|
||||
$orderPackage[$id_address][$selectedProduct['id_hotel']]['id_carrier'] = $package['id_carrier'];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2525,28 +2465,28 @@ class CartCore extends ObjectModel
|
||||
}
|
||||
}
|
||||
|
||||
$hotelAndDateWisePackageList = array();
|
||||
$hotelWisePackageList = array();
|
||||
$numHotels = 0;
|
||||
|
||||
|
||||
if (!empty($serviceProducts)) {
|
||||
foreach ($serviceProducts as $id_address => $packagesByHotels) {
|
||||
foreach ($packagesByHotels as $packageByHotel) {
|
||||
$hotelAndDateWisePackageList[$id_address][] = $packageByHotel;
|
||||
$hotelWisePackageList[$id_address][] = $packageByHotel;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($orderPackage as $id_address => $packageByAddress) {
|
||||
$numHotels += count($packageByAddress);
|
||||
foreach ($packageByAddress as $id_package => $package) {
|
||||
$hotelAndDateWisePackageList[$id_address][] = $package;
|
||||
$hotelWisePackageList[$id_address][] = $package;
|
||||
}
|
||||
}
|
||||
// add sevice products as new package if there are multiple hotels in cart
|
||||
// if ($numHotels > 1 || count($serviceProducts) > 1) {
|
||||
// foreach ($serviceProducts as $productsByAddress) {
|
||||
// if (isset($orderPackage[$id_address])) {
|
||||
// $hotelAndDateWisePackageList[$id_address][] = array(
|
||||
// $hotelWisePackageList[$id_address][] = array(
|
||||
// 'product_list' => $productsByAddress['products'],
|
||||
// 'carrier_list' => $productsByAddress['carrier_list'],
|
||||
// 'warehouse_list' => $productsByAddress['warehouse_list'],
|
||||
@@ -2559,13 +2499,13 @@ class CartCore extends ObjectModel
|
||||
// } else if (!empty($serviceProducts)) {
|
||||
// $serviceProductsIdAddress = array_keys($serviceProducts)[0];
|
||||
// $productsByAddress = array_shift($serviceProducts);
|
||||
// if (isset($hotelAndDateWisePackageList[$serviceProductsIdAddress])) {
|
||||
// $hotelAndDateWisePackageList[$serviceProductsIdAddress][0]['product_list'] = array_merge(
|
||||
// $hotelAndDateWisePackageList[$serviceProductsIdAddress][0]['product_list'],
|
||||
// if (isset($hotelWisePackageList[$serviceProductsIdAddress])) {
|
||||
// $hotelWisePackageList[$serviceProductsIdAddress][0]['product_list'] = array_merge(
|
||||
// $hotelWisePackageList[$serviceProductsIdAddress][0]['product_list'],
|
||||
// $productsByAddress['products']
|
||||
// );
|
||||
// } else {
|
||||
// $hotelAndDateWisePackageList[$id_address][] = array(
|
||||
// $hotelWisePackageList[$id_address][] = array(
|
||||
// 'product_list' => $productsByAddress['products'],
|
||||
// 'carrier_list' => $productsByAddress['carrier_list'],
|
||||
// 'warehouse_list' => $productsByAddress['warehouse_list'],
|
||||
@@ -2575,7 +2515,7 @@ class CartCore extends ObjectModel
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
$final_package_list = $hotelAndDateWisePackageList;
|
||||
$final_package_list = $hotelWisePackageList;
|
||||
// END $package_list hotel wise
|
||||
$cache[$cache_key] = $final_package_list;
|
||||
return $final_package_list;
|
||||
|
||||
@@ -772,9 +772,8 @@ abstract class PaymentModuleCore extends Module
|
||||
$maxOverbookingCount = 0;
|
||||
foreach ($order->product_list as $product) {
|
||||
$idProduct = $product['id_product'];
|
||||
if ($product['booking_product']
|
||||
&& $cartBookingData = $objCartBookingData->getCartInfoIdCartIdProduct($this->context->cart->id, $idProduct, $product['date_from'], $product['date_to'])
|
||||
) {
|
||||
$cartBookingData = $objCartBookingData->getOnlyCartBookingData($this->context->cart->id, $this->context->cart->id_guest, $idProduct);
|
||||
if ($cartBookingData) {
|
||||
foreach ($cartBookingData as $bookingInfo) {
|
||||
$objCartBookingData = new HotelCartBookingData($bookingInfo['id']);
|
||||
$objCartBookingData->id_order = $order->id;
|
||||
@@ -987,8 +986,8 @@ abstract class PaymentModuleCore extends Module
|
||||
$product['id_product'],
|
||||
isset($product['id_hotel']) ? $product['id_hotel'] : 0,
|
||||
0,
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
|
||||
373
classes/cache/Cache.php
vendored
373
classes/cache/Cache.php
vendored
@@ -41,6 +41,27 @@ abstract class CacheCore
|
||||
*/
|
||||
protected static $instance;
|
||||
|
||||
/**
|
||||
* Store the number of time a query is fetched from the cache.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $queryCounter = array();
|
||||
|
||||
/**
|
||||
* Max number of queries cached in memcached, for each SQL table.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $maxCachedObjectsByTable = 10000;
|
||||
|
||||
/**
|
||||
* If a cache set this variable to true, we need to adjust the size of the table cache object.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $adjustTableCacheSize = false;
|
||||
|
||||
/**
|
||||
* @var array List all keys of cached data and their associated ttl
|
||||
*/
|
||||
@@ -49,7 +70,7 @@ abstract class CacheCore
|
||||
/**
|
||||
* @var array Store list of tables and their associated keys for SQL cache (warning: this var must not be initialized here !)
|
||||
*/
|
||||
protected $sql_tables_cached;
|
||||
protected $sql_tables_cached = array();
|
||||
|
||||
/**
|
||||
* @var array List of blacklisted tables for SQL cache, these tables won't be indexed
|
||||
@@ -67,6 +88,8 @@ abstract class CacheCore
|
||||
'guest',
|
||||
'pagenotfound',
|
||||
'page_viewed',
|
||||
'employee',
|
||||
'log',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -120,6 +143,33 @@ abstract class CacheCore
|
||||
*/
|
||||
abstract public function flush();
|
||||
|
||||
/**
|
||||
* Delete multiple keys from the cache
|
||||
* @param array $keyArray
|
||||
*/
|
||||
protected function _deleteMulti(array $keyArray)
|
||||
{
|
||||
foreach ($keyArray as $key) {
|
||||
$this->delete($key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxCachedObjectsByTable()
|
||||
{
|
||||
return $this->maxCachedObjectsByTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $maxCachedObjectsByTable
|
||||
*/
|
||||
public function setMaxCachedObjectsByTable($maxCachedObjectsByTable)
|
||||
{
|
||||
$this->maxCachedObjectsByTable = $maxCachedObjectsByTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Cache
|
||||
*/
|
||||
@@ -127,20 +177,36 @@ abstract class CacheCore
|
||||
{
|
||||
if (!self::$instance) {
|
||||
$caching_system = _PS_CACHING_SYSTEM_;
|
||||
self::$instance = new $caching_system();
|
||||
if (class_exists($caching_system)) {
|
||||
/** @var Cache $cache */
|
||||
$cache = new $caching_system();
|
||||
self::$instance = $cache;
|
||||
}
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unit testing purpose only
|
||||
* @param $test_instance Cache
|
||||
* @param Cache $test_instance
|
||||
*/
|
||||
public static function setInstanceForTesting($test_instance)
|
||||
{
|
||||
self::$instance = $test_instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* If a cache set this variable to true, we need to adjust the size of the table cache object
|
||||
* Useful when the cache is reported to be full (e.g. memcached::RES_E2BIG error message).
|
||||
*
|
||||
* @param bool $value
|
||||
*/
|
||||
protected function setAdjustTableCacheSize($value)
|
||||
{
|
||||
$this->adjustTableCacheSize = (bool) $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unit testing purpose only
|
||||
*/
|
||||
@@ -201,12 +267,22 @@ abstract class CacheCore
|
||||
return $this->_exists($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete several keys at once from the cache
|
||||
*
|
||||
* @param array $keyArray
|
||||
*/
|
||||
public function deleteMulti(array $keyArray)
|
||||
{
|
||||
$this->_deleteMulti($keyArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete one or several data from cache (* joker can be used)
|
||||
* E.g.: delete('*'); delete('my_prefix_*'); delete('my_key_name');
|
||||
*
|
||||
* @param string $key
|
||||
* @return array List of deleted keys
|
||||
* @return bool
|
||||
*/
|
||||
public function delete($key)
|
||||
{
|
||||
@@ -237,7 +313,22 @@ abstract class CacheCore
|
||||
}
|
||||
|
||||
$this->_writeKeys();
|
||||
return $keys;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment the query counter for the given query
|
||||
*
|
||||
* @param string $query
|
||||
*/
|
||||
public function incrementQueryCounter($query)
|
||||
{
|
||||
if (isset($this->queryCounter[$query])) {
|
||||
++$this->queryCounter[$query];
|
||||
} else {
|
||||
$this->queryCounter[$query] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -256,51 +347,175 @@ abstract class CacheCore
|
||||
$result = array();
|
||||
}
|
||||
|
||||
if (is_null($this->sql_tables_cached)) {
|
||||
$this->sql_tables_cached = $this->get(Tools::encryptIV(self::SQL_TABLES_NAME));
|
||||
if (!is_array($this->sql_tables_cached)) {
|
||||
$this->sql_tables_cached = array();
|
||||
}
|
||||
}
|
||||
// use the query counter to update the cache statistics
|
||||
$this->updateQueryCacheStatistics();
|
||||
|
||||
$key = $this->updateTableToQueryMap($query);
|
||||
|
||||
// Store query results in cache
|
||||
$key = Tools::encryptIV($query);
|
||||
// no need to check the key existence before the set : if the query is already
|
||||
// in the cache, setQuery is not invoked
|
||||
$this->set($key, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the hash associated with a query, used to store data into the cache
|
||||
*
|
||||
* @param string $query
|
||||
* @return string
|
||||
*/
|
||||
public function getQueryHash($query)
|
||||
{
|
||||
return Tools::encryptIV($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the hash associated with a table name, used to store the "table to query hash" map
|
||||
*
|
||||
* @param string $table
|
||||
* @return string
|
||||
*/
|
||||
public function getTableMapCacheKey($table)
|
||||
{
|
||||
return Tools::encryptIV(self::SQL_TABLES_NAME . '_' . $table);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function extract all the tables involded in a query, and in the each table map the query hash
|
||||
*
|
||||
* @param string $query
|
||||
* @return string
|
||||
*/
|
||||
private function updateTableToQueryMap($query)
|
||||
{
|
||||
$key = $this->getQueryHash($query);
|
||||
|
||||
// Get all table from the query and save them in cache
|
||||
if ($tables = $this->getTables($query)) {
|
||||
foreach ($tables as $table) {
|
||||
if (!isset($this->sql_tables_cached[$table][$key])) {
|
||||
$this->adjustTableCacheSize($table);
|
||||
$this->sql_tables_cached[$table][$key] = true;
|
||||
}
|
||||
$this->addQueryKeyToTableMap($key, $table, $tables);
|
||||
}
|
||||
}
|
||||
$this->set(Tools::encryptIV(self::SQL_TABLES_NAME), $this->sql_tables_cached);
|
||||
|
||||
return $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Autoadjust the table cache size to avoid storing too big elements in the cache
|
||||
* Add the given query hash to the table to query key map
|
||||
*
|
||||
* @param $table
|
||||
* @param string $key query hash
|
||||
* @param string $table table name
|
||||
* @param array $otherTables the tables associated with the query
|
||||
*/
|
||||
protected function adjustTableCacheSize($table)
|
||||
private function addQueryKeyToTableMap($key, $table, $otherTables)
|
||||
{
|
||||
if (isset($this->sql_tables_cached[$table])
|
||||
&& count($this->sql_tables_cached[$table]) > 5000) {
|
||||
// make sure the cache doesn't contains too many elements : delete the first 1000
|
||||
$table_buffer = array_slice($this->sql_tables_cached[$table], 0, 1000, true);
|
||||
foreach ($table_buffer as $fs_key => $value) {
|
||||
$this->delete($fs_key);
|
||||
$this->delete($fs_key.'_nrows');
|
||||
unset($this->sql_tables_cached[$table][$fs_key]);
|
||||
// the name of the cache entry which cache the table map
|
||||
$cacheKey = $this->getTableMapCacheKey($table);
|
||||
|
||||
$this->initializeTableCache($table);
|
||||
|
||||
if (!isset($this->sql_tables_cached[$table][$key])) {
|
||||
if (count($this->sql_tables_cached[$table]) >= $this->maxCachedObjectsByTable) {
|
||||
$this->adjustTableCacheSize($table);
|
||||
}
|
||||
|
||||
unset($otherTables[array_search($table, $otherTables)]);
|
||||
$this->sql_tables_cached[$table][$key] = [
|
||||
'count' => 1,
|
||||
'otherTables' => $otherTables,
|
||||
];
|
||||
$this->set($cacheKey, $this->sql_tables_cached[$table]);
|
||||
// if the set fails because the object is too big, the adjustTableCacheSize flag is set
|
||||
if ($this->adjustTableCacheSize) {
|
||||
$this->adjustTableCacheSize($table, $key);
|
||||
$this->set($cacheKey, $this->sql_tables_cached[$table]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTables($string)
|
||||
/**
|
||||
* Use the query counter to update the query cache statistics
|
||||
* So far its only called during a set operation to avoid overloading / slowing down the cache server
|
||||
*/
|
||||
protected function updateQueryCacheStatistics()
|
||||
{
|
||||
$changedTables = array();
|
||||
|
||||
foreach ($this->queryCounter as $query => $count) {
|
||||
$key = $this->getQueryHash($query);
|
||||
|
||||
if ($tables = $this->getTables($query)) {
|
||||
foreach ($tables as $table) {
|
||||
$this->initializeTableCache($table);
|
||||
|
||||
if (isset($this->sql_tables_cached[$table][$key])) {
|
||||
$this->sql_tables_cached[$table][$key]['count'] += $count;
|
||||
$changedTables[$table] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (array_keys($changedTables) as $table) {
|
||||
$this->set($this->getTableMapCacheKey($table), $this->sql_tables_cached[$table]);
|
||||
}
|
||||
|
||||
$this->queryCounter = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the first less used query results from the cache
|
||||
*
|
||||
* @param string $table
|
||||
* @param string|null $keyToKeep the key we want to keep inside the table cache
|
||||
*/
|
||||
protected function adjustTableCacheSize($table, $keyToKeep = null)
|
||||
{
|
||||
$invalidKeys = array();
|
||||
if (isset($this->sql_tables_cached[$table])) {
|
||||
if ($keyToKeep && isset($this->sql_tables_cached[$table][$keyToKeep])) {
|
||||
$toKeep = $this->sql_tables_cached[$table][$keyToKeep];
|
||||
// remove the key we plan to keep before adjusting the table cache size
|
||||
unset($this->sql_tables_cached[$table][$keyToKeep]);
|
||||
}
|
||||
|
||||
// sort the array with the query with the lowest count first
|
||||
uasort($this->sql_tables_cached[$table], function ($a, $b) {
|
||||
if ($a['count'] == $b['count']) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ($a['count'] < $b['count']) ? -1 : 1;
|
||||
});
|
||||
// reduce the size of the cache : delete the first entries (those with the lowest count)
|
||||
$tableBuffer = array_slice(
|
||||
$this->sql_tables_cached[$table],
|
||||
0,
|
||||
(int) ceil($this->maxCachedObjectsByTable / 3),
|
||||
true
|
||||
);
|
||||
foreach (array_keys($tableBuffer) as $fs_key) {
|
||||
$invalidKeys[] = $fs_key;
|
||||
$invalidKeys[] = $fs_key . '_nrows';
|
||||
unset($this->sql_tables_cached[$table][$fs_key]);
|
||||
}
|
||||
$this->_deleteMulti($invalidKeys);
|
||||
|
||||
if ($keyToKeep) {
|
||||
$this->sql_tables_cached[$table][$keyToKeep] = $toKeep ?? null;
|
||||
}
|
||||
}
|
||||
$this->adjustTableCacheSize = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tables used in a SQL query.
|
||||
*
|
||||
* @param string $string
|
||||
*
|
||||
* @return array|bool
|
||||
*/
|
||||
public function getTables($string)
|
||||
{
|
||||
if (preg_match_all('/(?:from|join|update|into)\s+`?('._DB_PREFIX_.'[0-9a-z_-]+)(?:`?\s{0,},\s{0,}`?('._DB_PREFIX_.'[0-9a-z_-]+)`?)?(?:`|\s+|\Z)(?!\s*,)/Umsi', $string, $res)) {
|
||||
foreach ($res[2] as $table) {
|
||||
@@ -321,25 +536,90 @@ abstract class CacheCore
|
||||
*/
|
||||
public function deleteQuery($query)
|
||||
{
|
||||
if (is_null($this->sql_tables_cached)) {
|
||||
$this->sql_tables_cached = $this->get(Tools::encryptIV(self::SQL_TABLES_NAME));
|
||||
if (!is_array($this->sql_tables_cached)) {
|
||||
$this->sql_tables_cached = array();
|
||||
if ($this->isBlacklist($query)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$invalidKeys = array();
|
||||
$tableKeysToUpdate = array();
|
||||
if ($tables = $this->getTables($query)) {
|
||||
foreach ($tables as $table) {
|
||||
$cacheKey = $this->initializeTableCache($table);
|
||||
|
||||
if (!empty($this->sql_tables_cached[$table])) {
|
||||
foreach ($this->sql_tables_cached[$table] as $fs_key => $tableMapInfos) {
|
||||
$invalidKeys[] = $fs_key;
|
||||
$invalidKeys[] = $fs_key . '_nrows';
|
||||
|
||||
foreach ($tableMapInfos['otherTables'] as $otherTable) {
|
||||
if ($this->removeEntryInTableMapCache($fs_key, $otherTable)) {
|
||||
$tableKeysToUpdate[$otherTable] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($this->sql_tables_cached[$table]);
|
||||
$this->deleteMulti($invalidKeys);
|
||||
$this->delete($cacheKey);
|
||||
}
|
||||
}
|
||||
$this->flushUpdatedTableKeyEntries($tableKeysToUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush into the cache the updated entries from the sql_tables_caches.
|
||||
*
|
||||
* @param array $tableKeysToUpdate
|
||||
*/
|
||||
private function flushUpdatedTableKeyEntries($tableKeysToUpdate)
|
||||
{
|
||||
foreach (array_keys($tableKeysToUpdate) as $tableKeyToUpdate) {
|
||||
$cacheKey = $this->getTableMapCacheKey($tableKeyToUpdate);
|
||||
if (empty($this->sql_tables_cached[$tableKeyToUpdate])) {
|
||||
$this->delete($cacheKey);
|
||||
} else {
|
||||
$this->set($cacheKey, $this->sql_tables_cached[$tableKeyToUpdate]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the table cache entry associated with $table.
|
||||
*
|
||||
* @param string $table
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function initializeTableCache($table)
|
||||
{
|
||||
$cacheKey = $this->getTableMapCacheKey($table);
|
||||
|
||||
if (!array_key_exists($table, $this->sql_tables_cached)) {
|
||||
$this->sql_tables_cached[$table] = $this->get($cacheKey);
|
||||
if (!is_array($this->sql_tables_cached[$table])) {
|
||||
$this->sql_tables_cached[$table] = [];
|
||||
}
|
||||
}
|
||||
|
||||
if ($tables = $this->getTables($query)) {
|
||||
foreach ($tables as $table) {
|
||||
if (isset($this->sql_tables_cached[$table])) {
|
||||
foreach (array_keys($this->sql_tables_cached[$table]) as $fs_key) {
|
||||
$this->delete($fs_key);
|
||||
$this->delete($fs_key.'_nrows');
|
||||
}
|
||||
unset($this->sql_tables_cached[$table]);
|
||||
}
|
||||
}
|
||||
return $cacheKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove $key from the tableMap
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $table
|
||||
* @return bool True is the key exists in the table
|
||||
*/
|
||||
private function removeEntryInTableMapCache($key, $table)
|
||||
{
|
||||
if (isset($this->sql_tables_cached[$table][$key])) {
|
||||
unset($this->sql_tables_cached[$table][$key]);
|
||||
|
||||
return true;
|
||||
}
|
||||
$this->set(Tools::encryptIV(self::SQL_TABLES_NAME), $this->sql_tables_cached);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -369,6 +649,11 @@ abstract class CacheCore
|
||||
Cache::$local[$key] = $value;
|
||||
}
|
||||
|
||||
public static function clear()
|
||||
{
|
||||
Cache::$local = array();
|
||||
}
|
||||
|
||||
public static function retrieve($key)
|
||||
{
|
||||
return isset(Cache::$local[$key]) ? Cache::$local[$key] : null;
|
||||
|
||||
8
classes/cache/CacheApc.php
vendored
8
classes/cache/CacheApc.php
vendored
@@ -81,7 +81,13 @@ class CacheApcCore extends Cache
|
||||
*/
|
||||
protected function _set($key, $value, $ttl = 0)
|
||||
{
|
||||
return (($this->apcu) ? apcu_store($key, $value, $ttl) : apc_store($key, $value, $ttl));
|
||||
|
||||
$result = (($this->apcu) ? apcu_store($key, $value, $ttl) : apc_store($key, $value, $ttl));
|
||||
if ($result === false) {
|
||||
$this->setAdjustTableCacheSize(true);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
8
classes/cache/CacheMemcache.php
vendored
8
classes/cache/CacheMemcache.php
vendored
@@ -80,7 +80,13 @@ class CacheMemcacheCore extends Cache
|
||||
if (!$this->is_connected) {
|
||||
return false;
|
||||
}
|
||||
return $this->memcache->set($key, $value, 0, $ttl);
|
||||
$result = $this->memcache->set($key, $value, 0, $ttl);
|
||||
|
||||
if ($result === false) {
|
||||
$this->setAdjustTableCacheSize(true);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
13
classes/cache/CacheMemcached.php
vendored
13
classes/cache/CacheMemcached.php
vendored
@@ -64,7 +64,7 @@ class CacheMemcachedCore extends Cache
|
||||
$this->memcached = new Memcached();
|
||||
else
|
||||
return;
|
||||
|
||||
|
||||
$servers = self::getMemcachedServers();
|
||||
if (!$servers)
|
||||
return;
|
||||
@@ -81,7 +81,16 @@ class CacheMemcachedCore extends Cache
|
||||
{
|
||||
if (!$this->is_connected)
|
||||
return false;
|
||||
return $this->memcached->set($key, $value, $ttl);
|
||||
|
||||
$result = $this->memcached->set($key, $value, $ttl);
|
||||
|
||||
if ($result === false) {
|
||||
if ($this->memcached->getResultCode() === memcached::RES_E2BIG) {
|
||||
$this->setAdjustTableCacheSize(true);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
8
classes/cache/CacheXcache.php
vendored
8
classes/cache/CacheXcache.php
vendored
@@ -43,7 +43,13 @@ class CacheXcacheCore extends Cache
|
||||
*/
|
||||
protected function _set($key, $value, $ttl = 0)
|
||||
{
|
||||
return xcache_set($key, $value, $ttl);
|
||||
$result = xcache_set($key, $value, $ttl);
|
||||
|
||||
if ($result === false) {
|
||||
$this->setAdjustTableCacheSize(true);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -629,8 +629,9 @@ abstract class DbCore
|
||||
$this->last_query = $sql;
|
||||
|
||||
if ($use_cache && $this->is_cache_enabled && $array) {
|
||||
$this->last_query_hash = Tools::encryptIV($sql);
|
||||
$this->last_query_hash = Cache::getInstance()->getQueryHash($sql);
|
||||
if (($result = Cache::getInstance()->get($this->last_query_hash)) !== false) {
|
||||
Cache::getInstance()->incrementQueryCounter($sql);
|
||||
$this->last_cached = true;
|
||||
return $result;
|
||||
}
|
||||
@@ -684,8 +685,9 @@ abstract class DbCore
|
||||
$this->last_query = $sql;
|
||||
|
||||
if ($use_cache && $this->is_cache_enabled) {
|
||||
$this->last_query_hash = Tools::encryptIV($sql);
|
||||
$this->last_query_hash = Cache::getInstance()->getQueryHash($sql);
|
||||
if (($result = Cache::getInstance()->get($this->last_query_hash)) !== false) {
|
||||
Cache::getInstance()->incrementQueryCounter($sql);
|
||||
$this->last_cached = true;
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -154,13 +154,12 @@ abstract class ModuleGridCore extends Module
|
||||
{
|
||||
$this->_sort = $datas['defaultSortColumn'];
|
||||
$this->setLang(Context::getContext()->language->id);
|
||||
$this->getData();
|
||||
|
||||
$layers = isset($datas['layers']) ? $datas['layers'] : 1;
|
||||
|
||||
if (isset($datas['option'])) {
|
||||
$this->setOption($datas['option'], $layers);
|
||||
}
|
||||
$this->getData();
|
||||
|
||||
$layers = isset($datas['layers']) ? $datas['layers'] : 1;
|
||||
|
||||
if (count($datas['columns'])) {
|
||||
foreach ($datas['columns'] as $column) {
|
||||
|
||||
@@ -271,7 +271,7 @@ class OrderReturnCore extends ObjectModel
|
||||
$context = Context::getContext();
|
||||
}
|
||||
$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.`id_return_type`, orr.`return_type`, ors.`id_cart_rule`, orr.`date_add`, orr.`date_upd`, orr.`refunded_amount`,
|
||||
hbd.`is_cancelled`, COUNT(ord.`id_order_return_detail`) AS total_rooms
|
||||
FROM `'._DB_PREFIX_.'order_return` orr
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_return_detail` ord
|
||||
|
||||
@@ -333,6 +333,11 @@ class AdminCartsControllerCore extends AdminController
|
||||
public function ajaxPreProcess()
|
||||
{
|
||||
if ($this->tabAccess['edit'] === '1') {
|
||||
// prevent cart creation when kpi visibility or kpi view is updated.
|
||||
// @todo: move the below cart creation process required function.
|
||||
if (in_array(Tools::getValue('action'), array('changeKpiVisibility', 'saveKpiView'))) {
|
||||
return;
|
||||
}
|
||||
$id_customer = (int)Tools::getValue('id_customer');
|
||||
$customer = new Customer((int)$id_customer);
|
||||
$this->context->customer = $customer;
|
||||
|
||||
@@ -121,13 +121,6 @@ class AdminCustomerPreferencesControllerCore extends AdminController
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
),
|
||||
'PS_CUSTOMER_ADDRESS_CREATION' => array(
|
||||
'title' => $this->l('Address creation during checkout'),
|
||||
'hint' => $this->l('If disabled, Address form will not appear to user during checkout process. So by default hotel address, which rooms guest has in his cart will be considered as user address. Else user has to fill adress details.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
),
|
||||
'PS_KPI_FREQUENT_CUSTOMER_NB_ORDERS' => array(
|
||||
'title' => $this->l('Number of orders to use to calculate frequent customers'),
|
||||
'hint' => $this->l('Set the number of orders to use to calculate frequent customers.'),
|
||||
|
||||
@@ -487,55 +487,46 @@ class AdminOrdersControllerCore extends AdminController
|
||||
if ($this->display == 'view') {
|
||||
/** @var Order $order */
|
||||
$order = $this->loadObject();
|
||||
$customer = $this->context->customer;
|
||||
|
||||
if (!Validate::isLoadedObject($order)) {
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminOrders'));
|
||||
}
|
||||
|
||||
// hotel link in header
|
||||
if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id)) {
|
||||
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
|
||||
$this->toolbar_title[] = sprintf($this->l('Order %1$s - %2$s'), $order->reference, $objHotelBranchInformation->hotel_name);
|
||||
} else {
|
||||
$this->toolbar_title[] = sprintf($this->l('Order %1$s'), $order->reference);
|
||||
}
|
||||
$this->addMetaTitle($this->toolbar_title[count($this->toolbar_title) - 1]);
|
||||
|
||||
if ($order->hasBeenShipped()) {
|
||||
$type = $this->l('Return products');
|
||||
} elseif ($order->hasBeenPaid()) {
|
||||
$type = $this->l('Standard refund');
|
||||
} else {
|
||||
$type = $this->l('Cancel products');
|
||||
}
|
||||
|
||||
if (!$order->hasBeenShipped() && !$this->lite_display) {
|
||||
$this->toolbar_btn['new'] = array(
|
||||
'short' => 'Create',
|
||||
'href' => '#',
|
||||
'desc' => $this->l('Add a product'),
|
||||
'class' => 'add_product'
|
||||
$this->toolbar_btn['hotel'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminAddHotel').'&id='.$idHotel.'&updatehtl_branch_info',
|
||||
'desc' => $this->l('View Hotel'),
|
||||
'class' => 'icon-building',
|
||||
'target' => true,
|
||||
);
|
||||
}
|
||||
|
||||
if (Configuration::get('PS_ORDER_RETURN') && !$this->lite_display) {
|
||||
$this->toolbar_btn['standard_refund'] = array(
|
||||
'short' => 'Create',
|
||||
'href' => '',
|
||||
'desc' => $type,
|
||||
'class' => 'process-icon-standardRefund'
|
||||
if (Configuration::get('PS_INVOICE') && $order->hasInvoice() && !$this->lite_display) {
|
||||
$this->toolbar_btn['file'] = array(
|
||||
'short' => $this->l('Invoice'),
|
||||
'href' => $this->context->link->getAdminLink('AdminPdf').'&submitAction=generateInvoicePDF&id_order='.$order->id,
|
||||
'desc' => $this->l('View invoice'),
|
||||
'class' => 'icon-file-text',
|
||||
'target' => true,
|
||||
);
|
||||
}
|
||||
|
||||
if ($order->hasInvoice() && !$this->lite_display) {
|
||||
$this->toolbar_btn['partial_refund'] = array(
|
||||
'short' => 'Create',
|
||||
'href' => '',
|
||||
'desc' => $this->l('Partial refund'),
|
||||
'class' => 'process-icon-partialRefund'
|
||||
$this->toolbar_btn['print'] = array(
|
||||
'short' => $this->l('Print'),
|
||||
'href' => 'javascript:window.print()',
|
||||
'desc' => $this->l('Print order'),
|
||||
'class' => 'icon-print',
|
||||
);
|
||||
|
||||
if (((int) $order->isReturnable()) && !$order->hasCompletelyRefunded(Order::ORDER_COMPLETE_CANCELLATION_OR_REFUND_REQUEST_FLAG)) {
|
||||
$this->toolbar_btn['cancel'] = array(
|
||||
'short' => ((float) $order->getTotalPaid()) ? $this->l('Refund') : $this->l('Cancel'),
|
||||
'href' => '#refundForm',
|
||||
'id' => 'desc-order-standard_refund',
|
||||
'desc' => ((float) $order->getTotalPaid()) ? $this->l('Initiate refund') : $this->l('Cancel bookings'),
|
||||
'class' => 'icon-exchange',
|
||||
'target' => true,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$res = parent::initToolbar();
|
||||
if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP && isset($this->toolbar_btn['new']) && Shop::isFeatureActive()) {
|
||||
unset($this->toolbar_btn['new']);
|
||||
@@ -543,10 +534,463 @@ class AdminOrdersControllerCore extends AdminController
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function initModal()
|
||||
public function ajaxProcessInitBookingDocumentsModal()
|
||||
{
|
||||
parent::initModal();
|
||||
$this->modals[] = $this->getBookingDocumentsModal();
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
// set modal details
|
||||
$modal = array(
|
||||
'modal_id' => 'booking-documents-modal',
|
||||
'modal_class' => 'modal-md order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-file-text"></i>  '.$this->l('Documents'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_booking_documents.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitDocument',
|
||||
'class' => 'btn-primary pull-right submitDocument',
|
||||
'label' => '<i class="icon-cloud-upload"></i> '.$this->l('Upload'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitOrderDocumentNoteModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'current_index' => self::$currentIndex,
|
||||
'order' => $objOrder,
|
||||
)
|
||||
);
|
||||
|
||||
$modal = array(
|
||||
'modal_id' => 'document-note-modal',
|
||||
'modal_class' => 'order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-file"></i>  '.$this->l('Note'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_document_note.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitDocumentNote',
|
||||
'class' => 'submitDocumentNote btn-primary pull-right',
|
||||
'label' => '<i class="icon-file"></i> '.$this->l('Save Note'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitVoucherModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'current_index' => self::$currentIndex,
|
||||
'order' => $objOrder,
|
||||
'currency' => new Currency($objOrder->id_currency),
|
||||
'invoices_collection' => $objOrder->getInvoicesCollection(),
|
||||
)
|
||||
);
|
||||
|
||||
$modal = array(
|
||||
'modal_id' => 'voucher-modal',
|
||||
'modal_class' => 'order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-tag"></i>  '.$this->l('Voucher'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_discount_form.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitVoucher',
|
||||
'class' => 'submitVoucher btn-primary pull-right',
|
||||
'label' => '<i class="icon-tag"></i> '.$this->l('Add Voucher'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitOrderPaymentModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
$payment_methods = array();
|
||||
foreach (PaymentModule::getInstalledPaymentModules() as $payment) {
|
||||
$module = Module::getInstanceByName($payment['name']);
|
||||
if (Validate::isLoadedObject($module) && $module->active) {
|
||||
$payment_methods[] = $module->displayName;
|
||||
}
|
||||
}
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'current_index' => self::$currentIndex,
|
||||
'order' => $objOrder,
|
||||
'currencies' => Currency::getCurrenciesByIdShop($objOrder->id_shop),
|
||||
'payment_methods' => $payment_methods,
|
||||
'payment_types' => $this->getPaymentsTypes(),
|
||||
'invoices_collection' => $objOrder->getInvoicesCollection(),
|
||||
)
|
||||
);
|
||||
$modal = array(
|
||||
'modal_id' => 'order-payment-modal',
|
||||
'modal_class' => 'order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-credit-card"></i>  '.$this->l('Order Payment'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_order_payment_form.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitOrderPayment',
|
||||
'class' => 'submitOrderPayment btn-primary pull-right',
|
||||
'label' => '<i class="icon-credit-card"></i> '.$this->l('Add Payment'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitTravellerModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
// get details if booking is done for some other guest
|
||||
$customerGuestDetail = false;
|
||||
if ($id_customer_guest_detail = OrderCustomerGuestDetail::isCustomerGuestBooking($objOrder->id)) {
|
||||
$customerGuestDetail = new OrderCustomerGuestDetail($id_customer_guest_detail);
|
||||
$customerGuestDetail->gender = new Gender($customerGuestDetail->id_gender, $this->context->language->id);
|
||||
}
|
||||
|
||||
if ($customerGuestDetail) {
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'genders' => Gender::getGenders(),
|
||||
'customerGuestDetail' => $customerGuestDetail,
|
||||
)
|
||||
);
|
||||
$modal = array(
|
||||
'modal_id' => 'traveller-modal',
|
||||
'modal_class' => 'order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-user"></i>  '.$this->l('Traveller'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_traveller_form.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitTravellerInfo',
|
||||
'class' => 'submitTravellerInfo btn-primary pull-right',
|
||||
'label' => '<i class="icon-user"></i> '.$this->l('Save Traveller'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitOrderPaymentDetailModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
$modal = array(
|
||||
'modal_id' => 'payment-detail-modal',
|
||||
'modal_class' => 'order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-credit-card"></i>  '.$this->l('Payment Detail'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_order_payment_detail.tpl'),
|
||||
'modal_actions' => array(),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitRoomStatusModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
$htlOrderStatus = HotelBookingDetail::getAllHotelOrderStatus();
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'order' => $objOrder,
|
||||
'current_index' => self::$currentIndex,
|
||||
'hotel_order_status' => $htlOrderStatus,
|
||||
)
|
||||
);
|
||||
$modal = array(
|
||||
'modal_id' => 'room-status-modal',
|
||||
'modal_class' => 'order_detail_modal',
|
||||
'modal_title' => '<i class="icon-bed"></i>  '.$this->l('Guest CheckIn - Checkout'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_room_status_form.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitRoomStatus',
|
||||
'class' => 'submitRoomStatus btn-primary pull-right',
|
||||
'label' => '<i class="icon-bed"></i> '.$this->l('Update Status'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
|
||||
$response['hasError'] = 0;
|
||||
$response['STATUS_ALLOTED'] = HotelBookingDetail::STATUS_ALLOTED;
|
||||
$response['STATUS_CHECKED_IN'] = HotelBookingDetail::STATUS_CHECKED_IN;
|
||||
$response['STATUS_CHECKED_OUT'] = HotelBookingDetail::STATUS_CHECKED_OUT;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitRoomReallocationModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
$htlOrderStatus = HotelBookingDetail::getAllHotelOrderStatus();
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'order' => $objOrder,
|
||||
'currency' => new Currency($objOrder->id_currency),
|
||||
'current_index' => self::$currentIndex,
|
||||
)
|
||||
);
|
||||
$modal = array(
|
||||
'modal_id' => 'room-reallocation-modal',
|
||||
'modal_class' => 'modal-md order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-refresh"></i>  '.$this->l('Room Reallocation / Swap'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_room_reallocation.tpl'),
|
||||
'modal_actions' => null,
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitAddRoomBookingModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'order' => $objOrder,
|
||||
'currency' => new Currency($objOrder->id_currency),
|
||||
'max_child_age' => Configuration::get('WK_GLOBAL_CHILD_MAX_AGE'),
|
||||
)
|
||||
);
|
||||
$modal = array(
|
||||
'modal_id' => 'add-room-booking-modal',
|
||||
'modal_class' => 'modal-md order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-bed"></i>  '.$this->l('Add Room'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_add_room_booking.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitAddRoom',
|
||||
'class' => 'submitAddRoom btn-primary pull-right',
|
||||
'label' => '<i class="icon-bed"></i> '.$this->l('Add Room'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitEditRoomBookingModal()
|
||||
{
|
||||
// set modal details
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))
|
||||
&& ($idProduct = Tools::getValue('id_product'))
|
||||
&& ($idOrder = Tools::getValue('id_order'))
|
||||
&& ($idRoom = Tools::getValue('id_room'))
|
||||
&& ($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
) {
|
||||
$productLineData = json_decode(Tools::getValue('product_line_data'), true);
|
||||
|
||||
$smartyVars = array(
|
||||
'order' => $objOrder,
|
||||
'data' => $productLineData,
|
||||
'currency' => new Currency($objOrder->id_currency),
|
||||
'max_child_age' => Configuration::get('WK_GLOBAL_CHILD_MAX_AGE'),
|
||||
'orderEdit' => 1,
|
||||
);
|
||||
|
||||
$objCurrency = new Currency($objOrder->id_currency);
|
||||
$smartyVars['orderCurrency'] = $objOrder->id_currency;
|
||||
$smartyVars['currencySign'] = $objCurrency->sign;
|
||||
$smartyVars['link'] = $this->context->link;
|
||||
|
||||
$objBookingDemand = new HotelBookingDetail();
|
||||
$htlBookingDetail = $objBookingDemand->getRowByIdOrderIdProductInDateRange(
|
||||
$idOrder,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
$idRoom
|
||||
);
|
||||
|
||||
$smartyVars['id_booking_detail'] = $htlBookingDetail['id'];
|
||||
|
||||
$objBookingDemand = new HotelBookingDemands();
|
||||
|
||||
// set context currency So that we can get prices in the order currency
|
||||
$this->context->currency = $objCurrency;
|
||||
|
||||
if ($extraDemands = $objBookingDemand->getRoomTypeBookingExtraDemands(
|
||||
$idOrder,
|
||||
$idProduct,
|
||||
$idRoom,
|
||||
$dateFrom,
|
||||
$dateTo
|
||||
)) {
|
||||
$smartyVars['extraDemands'] = $extraDemands;
|
||||
}
|
||||
|
||||
// get room type additional demands
|
||||
$objRoomDemands = new HotelRoomTypeDemand();
|
||||
if ($roomTypeDemands = $objRoomDemands->getRoomTypeDemands($idProduct)) {
|
||||
foreach ($roomTypeDemands as &$demand) {
|
||||
// if demand has advance options then set demand price as first advance option price.
|
||||
if (isset($demand['adv_option']) && $demand['adv_option']) {
|
||||
$demand['price'] = current($demand['adv_option'])['price'];
|
||||
}
|
||||
}
|
||||
$smartyVars['roomTypeDemands'] = $roomTypeDemands;
|
||||
}
|
||||
|
||||
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
|
||||
if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getSelectedServicesForRoom(
|
||||
$htlBookingDetail['id']
|
||||
)) {
|
||||
$smartyVars['additionalServices'] = $additionalServices;
|
||||
}
|
||||
|
||||
// get room type additional demands
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
if ($roomTypeServiceProducts = $objRoomTypeServiceProduct->getServiceProductsData($idProduct, 1, 0, false, 2, null)) {
|
||||
if ($additionalServices) {
|
||||
foreach ($roomTypeServiceProducts as $key => $product) {
|
||||
if (in_array($product['id_product'], array_column($additionalServices['additional_services'], 'id_product'))) {
|
||||
unset($roomTypeServiceProducts[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$smartyVars['roomTypeServiceProducts'] = $roomTypeServiceProducts;
|
||||
}
|
||||
|
||||
$this->context->smarty->assign($smartyVars);
|
||||
|
||||
$modal = array(
|
||||
'modal_id' => 'edit-room-booking-modal',
|
||||
'modal_class' => 'modal-lg order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-bed"></i>  '.$this->l('Edit Room'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_edit_room_booking.tpl'),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitCancelRoomBookingModal()
|
||||
{
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objOrder = new Order(Tools::getValue('id_order')))) {
|
||||
// get booking information by order
|
||||
$objBookingDetail = new HotelBookingDetail();
|
||||
$objOrderReturn = new OrderReturn();
|
||||
$refundReqBookings = $objOrderReturn->getOrderRefundRequestedBookings($objOrder->id, 0, 1);
|
||||
if ($bookingOrderInfo = $objBookingDetail->getBookingDataByOrderId($objOrder->id)) {
|
||||
foreach($bookingOrderInfo as $key => $booking) {
|
||||
if ((in_array($booking['id'], $refundReqBookings)) || $booking['is_refunded']) {
|
||||
unset($bookingOrderInfo[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'order' => $objOrder,
|
||||
'current_index' => self::$currentIndex,
|
||||
'bookingOrderInfo' => $bookingOrderInfo,
|
||||
)
|
||||
);
|
||||
$modal = array(
|
||||
'modal_id' => 'cancel-room-booking-modal',
|
||||
'modal_class' => 'modal-md order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-exchange"></i>  '.$this->l('Cancel Bookings'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_cancel_room_bookings.tpl'),
|
||||
'modal_actions' => array(
|
||||
array(
|
||||
'type' => 'button',
|
||||
'value' => 'submitCancelBooking',
|
||||
'class' => 'submitCancelBooking btn-primary pull-right',
|
||||
'label' => '<i class="icon-exchange"></i> '.$this->l('Cancel Bookings'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
@@ -1023,7 +1467,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$customer_message->id_customer_thread = $customer_thread->id;
|
||||
$customer_message->id_employee = (int)$this->context->employee->id;
|
||||
$customer_message->message = $message;
|
||||
$customer_message->private = Tools::getValue('visibility');
|
||||
$customer_message->private = !Tools::getValue('visibility');
|
||||
|
||||
if (!$customer_message->add()) {
|
||||
$this->errors[] = Tools::displayError('An error occurred while saving the message.');
|
||||
@@ -1337,41 +1781,30 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$extraVars = null;
|
||||
}
|
||||
|
||||
$bad_delivery = false;
|
||||
if (($bad_delivery = (bool)!Address::isCountryActiveById((int)$objCart->id_address_delivery))
|
||||
|| !Address::isCountryActiveById((int)$objCart->id_address_invoice)
|
||||
) {
|
||||
if ($bad_delivery) {
|
||||
$this->errors[] = Tools::displayError('This booking address country is not active.');
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('This invoice address country is not active.');
|
||||
}
|
||||
} else {
|
||||
$amountPaid = Tools::ps_round($amountPaid, 6);
|
||||
$objEmployee = new Employee($this->context->cookie->id_employee);
|
||||
$amountPaid = Tools::ps_round($amountPaid, 6);
|
||||
$objEmployee = new Employee($this->context->cookie->id_employee);
|
||||
|
||||
$objPaymentModule->validateOrder(
|
||||
$objCart->id,
|
||||
$idOrderState,
|
||||
$amountPaid,
|
||||
$objPaymentModule->displayName,
|
||||
$this->l('Manual order -- Employee:').' '.substr($objEmployee->firstname, 0, 1).'. '.$objEmployee->lastname,
|
||||
$extraVars,
|
||||
null,
|
||||
false,
|
||||
$objCart->secure_key
|
||||
);
|
||||
$objPaymentModule->validateOrder(
|
||||
$objCart->id,
|
||||
$idOrderState,
|
||||
$amountPaid,
|
||||
$objPaymentModule->displayName,
|
||||
$this->l('Manual order -- Employee:').' '.substr($objEmployee->firstname, 0, 1).'. '.$objEmployee->lastname,
|
||||
$extraVars,
|
||||
null,
|
||||
false,
|
||||
$objCart->secure_key
|
||||
);
|
||||
|
||||
if (isset($this->context->cookie->id_cart)) {
|
||||
unset($this->context->cookie->id_cart);
|
||||
}
|
||||
if (isset($this->context->cookie->id_guest)) {
|
||||
unset($this->context->cookie->id_guest);
|
||||
}
|
||||
if (isset($this->context->cookie->id_cart)) {
|
||||
unset($this->context->cookie->id_cart);
|
||||
}
|
||||
if (isset($this->context->cookie->id_guest)) {
|
||||
unset($this->context->cookie->id_guest);
|
||||
}
|
||||
|
||||
if ($objPaymentModule->currentOrder) {
|
||||
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$objPaymentModule->currentOrder.'&vieworder'.'&token='.$this->token.'&conf=3');
|
||||
}
|
||||
if ($objPaymentModule->currentOrder) {
|
||||
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$objPaymentModule->currentOrder.'&vieworder'.'&token='.$this->token.'&conf=3');
|
||||
}
|
||||
} else {
|
||||
// if errors render add order form
|
||||
@@ -1872,6 +2305,9 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
// Sending loader image for the modals to be used for all the modals ajax processes
|
||||
$this->context->smarty->assign('loaderImg', $this->context->link->getMediaLink(_PS_IMG_.'admin/ajax-loader.gif'));
|
||||
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
@@ -2079,7 +2515,12 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
$this->toolbar_title = sprintf($this->l('Order #%1$d (%2$s) - %3$s %4$s'), $order->id, $order->reference, $customer->firstname, $customer->lastname);
|
||||
if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id)) {
|
||||
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
|
||||
$this->toolbar_title = sprintf($this->l('Order %1$s - %2$s'), $order->reference, $objHotelBranchInformation->hotel_name);
|
||||
} else {
|
||||
$this->toolbar_title = sprintf($this->l('Order %1$s'), $order->reference);
|
||||
}
|
||||
if (Shop::isFeatureActive()) {
|
||||
$shop = new Shop((int)$order->id_shop);
|
||||
$this->toolbar_title .= ' - '.sprintf($this->l('Shop: %s'), $shop->name);
|
||||
@@ -2496,26 +2937,15 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'customer' => $customer)
|
||||
),
|
||||
'isCancelledRoom' => $isCancelledRoom,
|
||||
'orderDocuments' => $order->getDocuments(),
|
||||
'ROOM_STATUS_ALLOTED' => HotelBookingDetail::STATUS_ALLOTED,
|
||||
'ROOM_STATUS_CHECKED_IN' => HotelBookingDetail::STATUS_CHECKED_IN,
|
||||
'ROOM_STATUS_CHECKED_OUT' => HotelBookingDetail::STATUS_CHECKED_OUT,
|
||||
);
|
||||
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function getBookingDocumentsModal()
|
||||
{
|
||||
$modalContent = $this->context->smarty->fetch('controllers/orders/_booking_documents_modal.tpl');
|
||||
|
||||
// set modal details
|
||||
$modal = array(
|
||||
'modal_id' => 'booking-documents-modal',
|
||||
'modal_class' => 'modal-md',
|
||||
'modal_title' => $this->l('Documents'),
|
||||
'modal_content' => $modalContent,
|
||||
'modal_actions' => array(), // required to show Close button
|
||||
);
|
||||
|
||||
return $modal;
|
||||
}
|
||||
|
||||
public function ajaxProcessGetHotelRoomTypes()
|
||||
{
|
||||
@@ -2712,7 +3142,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
if ($objCustomerGuestDetail->save()) {
|
||||
$response['success'] = true;
|
||||
$gender = new Gender($objCustomerGuestDetail->id_gender, $this->context->language->id);
|
||||
$response['data']['guest_name'] = $gender->name.' '.$objCustomerGuestDetail->firstname.' '.$objCustomerGuestDetail->lastname ;
|
||||
$response['data']['gender_name'] = $gender->name;
|
||||
$response['data']['guest_name'] = $objCustomerGuestDetail->firstname.' '.$objCustomerGuestDetail->lastname ;
|
||||
$response['data']['guest_email'] = $objCustomerGuestDetail->email;
|
||||
$response['data']['guest_phone'] = $objCustomerGuestDetail->phone;
|
||||
$response['msg'] = $this->l('Guest details are updated.');
|
||||
@@ -3311,7 +3742,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'invoices' => $invoice_array,
|
||||
'documents_html' => $this->createTemplate('_documents.tpl')->fetch(),
|
||||
'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch(),
|
||||
'discount_form_html' => $this->createTemplate('_discount_form.tpl')->fetch(),
|
||||
'refresh' => $refresh
|
||||
)));
|
||||
}
|
||||
@@ -3430,6 +3860,17 @@ class AdminOrdersControllerCore extends AdminController
|
||||
)));
|
||||
}
|
||||
|
||||
if (!Validate::isPrice($product_informations['product_price_tax_incl'])) {
|
||||
die(json_encode(array(
|
||||
'result' => false,
|
||||
'error' => Tools::displayError('Please enter a valid tax included price.'),
|
||||
)));
|
||||
} elseif (!Validate::isPrice($product_informations['product_price_tax_excl'])) {
|
||||
die(json_encode(array(
|
||||
'result' => false,
|
||||
'error' => Tools::displayError('Please enter a valid tax excluded price.'),
|
||||
)));
|
||||
}
|
||||
|
||||
if ($order->with_occupancy) {
|
||||
$req_rm = count($occupancy);
|
||||
@@ -3996,7 +4437,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'invoices' => $invoice_array,
|
||||
'documents_html' => $this->createTemplate('_documents.tpl')->fetch(),
|
||||
'shipping_html' => $this->createTemplate('_shipping.tpl')->fetch(),
|
||||
'discount_form_html' => $this->createTemplate('_discount_form.tpl')->fetch(),
|
||||
'refresh' => $refresh
|
||||
)));
|
||||
}
|
||||
@@ -4057,14 +4497,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'error' => Tools::displayError('The OrderDetail object cannot be loaded.')
|
||||
)));
|
||||
|
||||
$address = new Address(Tools::getValue('id_address'));
|
||||
if (!Validate::isLoadedObject($address)) {
|
||||
die(json_encode(array(
|
||||
'result' => false,
|
||||
'error' => Tools::displayError('The address object cannot be loaded.')
|
||||
)));
|
||||
}
|
||||
|
||||
die(json_encode(array(
|
||||
'result' => true,
|
||||
'reduction_percent' => $order_detail->reduction_percent
|
||||
@@ -5585,6 +6017,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
// To show rooms extra demands in the modal box in order details view page
|
||||
public function ajaxProcessGetRoomTypeBookingDemands()
|
||||
{
|
||||
$orderEdit = Tools::getValue('orderEdit');
|
||||
if (($idProduct = Tools::getValue('id_product'))
|
||||
&& ($idOrder = Tools::getValue('id_order'))
|
||||
&& ($idRoom = Tools::getValue('id_room'))
|
||||
@@ -5624,23 +6057,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$smartyVars['extraDemands'] = $extraDemands;
|
||||
}
|
||||
|
||||
// if admin is editing order
|
||||
if ($orderEdit = Tools::getValue('orderEdit')) {
|
||||
$smartyVars['orderEdit'] = $orderEdit;
|
||||
|
||||
// get room type additional demands
|
||||
$objRoomDemands = new HotelRoomTypeDemand();
|
||||
if ($roomTypeDemands = $objRoomDemands->getRoomTypeDemands($idProduct)) {
|
||||
foreach ($roomTypeDemands as &$demand) {
|
||||
// if demand has advance options then set demand price as first advance option price.
|
||||
if (isset($demand['adv_option']) && $demand['adv_option']) {
|
||||
$demand['price'] = current($demand['adv_option'])['price'];
|
||||
}
|
||||
}
|
||||
$smartyVars['roomTypeDemands'] = $roomTypeDemands;
|
||||
}
|
||||
}
|
||||
|
||||
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
|
||||
if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getSelectedServicesForRoom(
|
||||
$htlBookingDetail['id']
|
||||
@@ -5648,29 +6064,27 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$smartyVars['additionalServices'] = $additionalServices;
|
||||
}
|
||||
|
||||
if ($orderEdit = Tools::getValue('orderEdit')) {
|
||||
$smartyVars['orderEdit'] = $orderEdit;
|
||||
$smartyVars['orderEdit'] = $orderEdit;
|
||||
|
||||
// get room type additional demands
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
if ($roomTypeServiceProducts = $objRoomTypeServiceProduct->getServiceProductsData($idProduct, 1, 0, false, 2, null)) {
|
||||
if ($additionalServices) {
|
||||
foreach ($roomTypeServiceProducts as $key => $product) {
|
||||
if (in_array($product['id_product'], array_column($additionalServices['additional_services'], 'id_product'))) {
|
||||
unset($roomTypeServiceProducts[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$smartyVars['roomTypeServiceProducts'] = $roomTypeServiceProducts;
|
||||
}
|
||||
}
|
||||
$this->context->smarty->assign($smartyVars);
|
||||
|
||||
$modal = array(
|
||||
'modal_id' => 'room-extra-demands',
|
||||
'modal_class' => 'modal-md order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-file-text"></i>  '.$this->l('Extra Services'),
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_extra_services.tpl'),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
$response['hasError'] = 0;
|
||||
} else {
|
||||
$response['hasError'] = 1;
|
||||
}
|
||||
|
||||
$extraDemandsTpl = $this->context->smarty->fetch(
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/_room_extra_services_modal.tpl'
|
||||
);
|
||||
die($extraDemandsTpl);
|
||||
$response = Tools::jsonEncode($response);
|
||||
die($response);
|
||||
}
|
||||
|
||||
public function processRenderServicesPanel($idOrder, $idProduct, $dateFrom, $dateTo, $idRoom, $orderEdit)
|
||||
@@ -5720,7 +6134,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->context->smarty->assign($smartyVars);
|
||||
|
||||
$servicesTpl = $this->context->smarty->fetch(
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/_room_services_block.tpl'
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl'
|
||||
);
|
||||
return $servicesTpl;
|
||||
}
|
||||
@@ -5776,10 +6190,12 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$smartyVars['roomTypeDemands'] = $roomTypeDemands;
|
||||
}
|
||||
}
|
||||
|
||||
$smartyVars['show_active'] = true;
|
||||
$this->context->smarty->assign($smartyVars);
|
||||
|
||||
$servicesTpl = $this->context->smarty->fetch(
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/_room_facilities_block.tpl'
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl'
|
||||
);
|
||||
return $servicesTpl;
|
||||
}
|
||||
@@ -5839,8 +6255,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$objOrderDetail->product_quantity += $quantityDiff;
|
||||
$objOrderDetail->total_price_tax_excl += $priceDiffTaxExcl;
|
||||
$objOrderDetail->total_price_tax_incl += $priceDiffTaxIncl;
|
||||
$objOrderDetail->unit_price_tax_excl = ($objOrderDetail->total_price_tax_excl / $objOrderDetail->product_quantity);
|
||||
$objOrderDetail->unit_price_tax_incl = ($objOrderDetail->total_price_tax_incl / $objOrderDetail->product_quantity);
|
||||
$objOrderDetail->unit_price_tax_excl = Tools::ps_round(($objOrderDetail->total_price_tax_excl / $objOrderDetail->product_quantity), 6);
|
||||
$objOrderDetail->unit_price_tax_incl = Tools::ps_round(($objOrderDetail->total_price_tax_incl / $objOrderDetail->product_quantity), 6);
|
||||
$res &= $objOrderDetail->updateTaxAmount($order);
|
||||
|
||||
$res &= $objOrderDetail->update();
|
||||
|
||||
@@ -237,18 +237,18 @@ class AdminSearchControllerCore extends AdminController
|
||||
&& ($this->_list['products'] = Product::searchByName($this->context->language->id, $this->query))
|
||||
) {
|
||||
$objRoomType = new HotelRoomType();
|
||||
$accessableHotels = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 1);
|
||||
$accessibleHotels = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 1);
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
foreach ($this->_list['products'] as $key => $product) {
|
||||
if ($roomInfo = $objRoomType->getRoomTypeInfoByIdProduct($product['id_product'])) {
|
||||
if (!in_array($roomInfo['id_hotel'], $accessableHotels)) {
|
||||
if (!in_array($roomInfo['id_hotel'], $accessibleHotels)) {
|
||||
unset($this->_list['products'][$key]);
|
||||
}
|
||||
} else if ($associatedData = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product['id_product'])) {
|
||||
$count = 0;
|
||||
foreach ($associatedData['room_types'] as $id_room_type) {
|
||||
$objRoomType = new HotelRoomType($id_room_type);
|
||||
if (in_array($objRoomType->id_hotel, $accessableHotels)) {
|
||||
if (in_array($objRoomType->id_hotel, $accessibleHotels)) {
|
||||
$count += 1;
|
||||
}
|
||||
}
|
||||
@@ -261,14 +261,14 @@ class AdminSearchControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->controllerAccess['AdminProducts'])
|
||||
&& $this->controllerAccess['AdminProducts']
|
||||
if (!isset($this->controllerAccess['AdminProducts'])
|
||||
|| !$this->controllerAccess['AdminProducts']
|
||||
) {
|
||||
unset($this->_list['products']);
|
||||
}
|
||||
|
||||
if (isset($this->controllerAccess['AdminNormalProducts'])
|
||||
&& $this->controllerAccess['AdminNormalProducts']
|
||||
if (!isset($this->controllerAccess['AdminNormalProducts'])
|
||||
|| !$this->controllerAccess['AdminNormalProducts']
|
||||
) {
|
||||
unset($this->_list['service_products']);
|
||||
}
|
||||
|
||||
@@ -105,6 +105,63 @@ class GuestTrackingControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
public function displayAjaxGetRoomTypeBookingDemands()
|
||||
{
|
||||
$response = array('extra_demands' => false);
|
||||
|
||||
if (($idProduct = Tools::getValue('id_product'))
|
||||
&& ($idOrder = Tools::getValue('id_order'))
|
||||
&& ($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
) {
|
||||
$objHotelBookingDemands = new HotelBookingDemands();
|
||||
$useTax = 0;
|
||||
if (Group::getPriceDisplayMethod($this->context->customer->id_default_group) == PS_TAX_INC) {
|
||||
$useTax = 1;
|
||||
}
|
||||
if ($extraDemands = $objHotelBookingDemands->getRoomTypeBookingExtraDemands(
|
||||
$idOrder,
|
||||
$idProduct,
|
||||
0,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
1,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(array(
|
||||
'useTax' => $useTax,
|
||||
'extraDemands' => $extraDemands,
|
||||
));
|
||||
}
|
||||
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
|
||||
if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
|
||||
$idOrder,
|
||||
0,
|
||||
0,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
0,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(array(
|
||||
'useTax' => $useTax,
|
||||
'additionalServices' => $additionalServices,
|
||||
));
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'objOrder' => new Order($idOrder),
|
||||
));
|
||||
|
||||
$response['extra_demands'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order-extra-services.tpl');
|
||||
}
|
||||
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign template vars related to page content
|
||||
* @see FrontController::initContent()
|
||||
@@ -113,60 +170,6 @@ class GuestTrackingControllerCore extends FrontController
|
||||
{
|
||||
parent::initContent();
|
||||
|
||||
$method = Tools::getValue('method');
|
||||
if ($method == 'getRoomTypeBookingDemands') {
|
||||
$response = array('reload' => false);
|
||||
$extraDemandsTpl = '';
|
||||
if (($idProduct = Tools::getValue('id_product'))
|
||||
&& ($idOrder = Tools::getValue('id_order'))
|
||||
&& ($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
) {
|
||||
$objBookingDemand = new HotelBookingDemands();
|
||||
$customer = new Customer((int)$order->id_customer);
|
||||
$useTax = 0;
|
||||
if (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC) {
|
||||
$useTax = 1;
|
||||
}
|
||||
if ($extraDemands = $objBookingDemand->getRoomTypeBookingExtraDemands(
|
||||
$idOrder,
|
||||
$idProduct,
|
||||
0,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
1,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'useTax' => $useTax,
|
||||
'extraDemands' => $extraDemands,
|
||||
)
|
||||
);
|
||||
}
|
||||
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
|
||||
if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
|
||||
$idOrder,
|
||||
0,
|
||||
0,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
0,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(array(
|
||||
'useTax' => $useTax,
|
||||
'additionalServices' => $additionalServices,
|
||||
));
|
||||
}
|
||||
$response['extra_demands'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order_booking_demands.tpl');
|
||||
}
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
/* Handle brute force attacks */
|
||||
if (count($this->errors)) {
|
||||
sleep(1);
|
||||
@@ -216,6 +219,7 @@ class GuestTrackingControllerCore extends FrontController
|
||||
$order->id_order_state = (int)$order->getCurrentState();
|
||||
$order->invoice = (OrderState::invoiceAvailable((int)$order->id_order_state) && $order->invoice_number);
|
||||
$order->order_history = $order->getHistory((int)$this->context->language->id, false, true);
|
||||
$order->overbooking_order_states = OrderState::getOverBookingStates();
|
||||
$order->carrier = new Carrier((int)$order->id_carrier, (int)$order->id_lang);
|
||||
$order->address_invoice = new Address((int)$order->id_address_invoice);
|
||||
$order->address_delivery = new Address((int)$order->id_address_delivery);
|
||||
@@ -554,6 +558,13 @@ class GuestTrackingControllerCore extends FrontController
|
||||
$customerGuestDetail = new OrderCustomerGuestDetail($id_customer_guest_detail);
|
||||
}
|
||||
|
||||
$idHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id);
|
||||
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
|
||||
$hotelAddressInfo = HotelBranchInformation::getAddress($idHotel);
|
||||
|
||||
$objHotelBranchRefundRules = new HotelBranchRefundRules();
|
||||
$hotelRefundRules = $objHotelBranchRefundRules->getHotelRefundRules($idHotel, 0, 1);
|
||||
|
||||
// set order specific values
|
||||
$order->total_convenience_fee_ti = $total_convenience_fee_ti;
|
||||
$order->total_convenience_fee_te = $total_convenience_fee_te;
|
||||
@@ -564,11 +575,14 @@ class GuestTrackingControllerCore extends FrontController
|
||||
$order->back_ord_msg = Configuration::get('WK_BO_MESSAGE');
|
||||
$order->order_has_invoice = $order->hasInvoice();
|
||||
$order->cart_htl_data = $cartHotelData;
|
||||
$order->non_requested_rooms = $nonRequestedRooms;
|
||||
$order->customerGuestDetail = $customerGuestDetail;
|
||||
$order->obj_hotel_branch_information = $objHotelBranchInformation;
|
||||
$order->hotel_address_info = $hotelAddressInfo;
|
||||
$order->hotel_refund_rules = $hotelRefundRules;
|
||||
//end
|
||||
|
||||
Hook::exec('actionOrderDetail', array('carrier' => $order->carrier, 'order' => $order));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,9 +610,48 @@ class GuestTrackingControllerCore extends FrontController
|
||||
)
|
||||
);
|
||||
|
||||
$this->addJS(_THEME_JS_DIR_.'history.js');
|
||||
$this->addCSS(_THEME_CSS_DIR_.'history.css');
|
||||
$this->addCSS(_THEME_CSS_DIR_.'addresses.css');
|
||||
if (Tools::getValue('ajax') != 'true') {
|
||||
$this->addCSS(_THEME_CSS_DIR_.'order-detail.css');
|
||||
|
||||
$this->addJS(array(
|
||||
_THEME_JS_DIR_.'order-detail.js',
|
||||
_THEME_JS_DIR_.'tools.js',
|
||||
));
|
||||
|
||||
$this->addJqueryPlugin(array('fancybox', 'scrollTo', 'footable', 'footable-sort'));
|
||||
$this->addJqueryUI(array('ui.tooltip'), 'base', true);
|
||||
|
||||
// load Google Maps library if configured
|
||||
if (!count($this->errors)) {
|
||||
$ordersCollection = Order::getByReference(Tools::getValue('order_reference'));
|
||||
if ($objOrder = $ordersCollection->getFirst()) {
|
||||
if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder($objOrder->id)) {
|
||||
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
|
||||
if (Validate::isLoadedObject($objHotelBranchInformation)) {
|
||||
if ($apiKey = Configuration::get('PS_API_KEY')) {
|
||||
if (floatval($objHotelBranchInformation->latitude) != 0
|
||||
&& floatval($objHotelBranchInformation->longitude) != 0
|
||||
) {
|
||||
Media::addJsDef(array(
|
||||
'hotel_location' => array(
|
||||
'latitude' => $objHotelBranchInformation->latitude,
|
||||
'longitude' => $objHotelBranchInformation->longitude,
|
||||
'map_input_text' => $objHotelBranchInformation->map_input_text,
|
||||
),
|
||||
'hotel_name' => $objHotelBranchInformation->hotel_name,
|
||||
));
|
||||
|
||||
$this->addJS(
|
||||
'https://maps.googleapis.com/maps/api/js?key='.$apiKey.'&libraries=places&language='.
|
||||
$this->context->language->iso_code.'®ion='.$this->context->country->iso_code
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function processAddressFormat(Address $delivery, Address $invoice)
|
||||
|
||||
@@ -36,15 +36,9 @@ class HistoryControllerCore extends FrontController
|
||||
parent::setMedia();
|
||||
$this->addCSS(array(
|
||||
_THEME_CSS_DIR_.'history.css',
|
||||
_THEME_CSS_DIR_.'addresses.css'
|
||||
));
|
||||
$this->addJS(array(
|
||||
_THEME_JS_DIR_.'history.js',
|
||||
_THEME_JS_DIR_.'tools.js' // retro compat themes 1.5
|
||||
));
|
||||
$this->addJqueryPlugin(array('fancybox')); //fancybox not found for some client theme
|
||||
$this->addJqueryPlugin(array('scrollTo', 'footable', 'footable-sort'));
|
||||
$this->addJqueryUI('ui.tooltip', 'base', true);
|
||||
|
||||
$this->addJqueryPlugin(array('footable', 'footable-sort'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -154,6 +154,9 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
|
||||
if (!empty($orderProducts)) {
|
||||
foreach ($orderProducts as $type_key => $type_value) {
|
||||
if (in_array($type_value['product_id'], $processed_product)) {
|
||||
continue;
|
||||
}
|
||||
$processed_product[] = $type_value['product_id'];
|
||||
|
||||
$product = new Product($type_value['product_id'], false, $this->context->language->id);
|
||||
@@ -362,6 +365,13 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($cart_htl_data)) {
|
||||
$this->context->smarty->assign('cart_htl_data', $cart_htl_data);
|
||||
}
|
||||
if (!empty($cart_service_products)) {
|
||||
$this->context->smarty->assign('cart_service_products', $cart_service_products);
|
||||
}
|
||||
}
|
||||
if (!$objCartOrder->hasInvoice()) {
|
||||
$orders_has_invoice = 0;
|
||||
@@ -385,13 +395,6 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($cart_htl_data)) {
|
||||
$this->context->smarty->assign('cart_htl_data', $cart_htl_data);
|
||||
}
|
||||
if (!empty($cart_service_products)) {
|
||||
$this->context->smarty->assign('cart_service_products', $cart_service_products);
|
||||
}
|
||||
|
||||
$this->context->smarty->assign('orderTotalInfo', $orderTotalInfo);
|
||||
$this->context->smarty->assign('orders_has_invoice', $orders_has_invoice);
|
||||
}
|
||||
|
||||
@@ -43,283 +43,19 @@ class OrderDetailControllerCore extends FrontController
|
||||
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
|
||||
}
|
||||
|
||||
/**
|
||||
* Start forms process
|
||||
* @see FrontController::postProcess()
|
||||
*/
|
||||
public function postProcess()
|
||||
{
|
||||
if (Tools::isSubmit('submitMessage')) {
|
||||
$idOrder = (int)Tools::getValue('id_order');
|
||||
$msgText = Tools::getValue('msgText');
|
||||
|
||||
if (!$idOrder || !Validate::isUnsignedId($idOrder)) {
|
||||
$this->errors[] = Tools::displayError('The order is no longer valid.');
|
||||
} elseif (empty($msgText)) {
|
||||
$this->errors[] = Tools::displayError('The message cannot be blank.');
|
||||
} elseif (!Validate::isMessage($msgText)) {
|
||||
$this->errors[] = Tools::displayError('This message is invalid (HTML is not allowed).');
|
||||
}
|
||||
if (!count($this->errors)) {
|
||||
$order = new Order($idOrder);
|
||||
if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) {
|
||||
//check if a thread already exist
|
||||
$id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($this->context->customer->email, $order->id);
|
||||
$id_product = (int)Tools::getValue('id_product');
|
||||
$cm = new CustomerMessage();
|
||||
if (!$id_customer_thread) {
|
||||
$ct = new CustomerThread();
|
||||
$ct->id_contact = 0;
|
||||
$ct->id_customer = (int)$order->id_customer;
|
||||
$ct->id_shop = (int)$this->context->shop->id;
|
||||
if ($id_product && $order->orderContainProduct($id_product)) {
|
||||
$ct->id_product = $id_product;
|
||||
}
|
||||
$ct->id_order = (int)$order->id;
|
||||
$ct->id_lang = (int)$this->context->language->id;
|
||||
$ct->email = $this->context->customer->email;
|
||||
$ct->status = 'open';
|
||||
$ct->token = Tools::passwdGen(12);
|
||||
$ct->add();
|
||||
} else {
|
||||
$ct = new CustomerThread((int)$id_customer_thread);
|
||||
$ct->status = 'open';
|
||||
$ct->update();
|
||||
}
|
||||
|
||||
$cm->id_customer_thread = $ct->id;
|
||||
$cm->message = $msgText;
|
||||
$cm->ip_address = (int)ip2long($_SERVER['REMOTE_ADDR']);
|
||||
$cm->add();
|
||||
|
||||
if (!Configuration::get('PS_MAIL_EMAIL_MESSAGE')) {
|
||||
$to = strval(Configuration::get('PS_SHOP_EMAIL'));
|
||||
} else {
|
||||
$to = new Contact((int)Configuration::get('PS_MAIL_EMAIL_MESSAGE'));
|
||||
$to = strval($to->email);
|
||||
}
|
||||
$toName = strval(Configuration::get('PS_SHOP_NAME'));
|
||||
$customer = $this->context->customer;
|
||||
|
||||
$product = new Product($id_product);
|
||||
$product_name = '';
|
||||
if (Validate::isLoadedObject($product) && isset($product->name[(int)$this->context->language->id])) {
|
||||
$product_name = $product->name[(int)$this->context->language->id];
|
||||
}
|
||||
|
||||
if (Validate::isLoadedObject($customer)) {
|
||||
Mail::Send(
|
||||
$this->context->language->id,
|
||||
'order_customer_comment',
|
||||
Mail::l('Message from a customer'),
|
||||
array(
|
||||
'{lastname}' => $customer->lastname,
|
||||
'{firstname}' => $customer->firstname,
|
||||
'{email}' => $customer->email,
|
||||
'{id_order}' => (int)$order->id,
|
||||
'{order_name}' => $order->getUniqReference(),
|
||||
'{message}' => Tools::nl2br($msgText),
|
||||
'{product_name}' => $product_name
|
||||
),
|
||||
$to,
|
||||
$toName,
|
||||
strval(Configuration::get('PS_SHOP_EMAIL')),
|
||||
$customer->firstname.' '.$customer->lastname,
|
||||
null,
|
||||
null,
|
||||
_PS_MAIL_DIR_,
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
$customer->email
|
||||
);
|
||||
}
|
||||
|
||||
if (Tools::getValue('ajax') != 'true') {
|
||||
Tools::redirect('index.php?controller=order-detail&id_order='.(int)$idOrder);
|
||||
}
|
||||
|
||||
$this->context->smarty->assign('message_confirmation', true);
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Order not found');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function displayAjax()
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign template vars related to page content
|
||||
* @see FrontController::initContent()
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->show_breadcrump = true;
|
||||
|
||||
parent::initContent();
|
||||
if (!($id_order = (int) Tools::getValue('id_order')) || !Validate::isUnsignedId($id_order)) {
|
||||
$this->errors[] = Tools::displayError('Order ID required');
|
||||
Tools::redirect($this->context->link->getPageLink('history'));
|
||||
} else {
|
||||
$order = new Order($id_order);
|
||||
if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) {
|
||||
// Here handle request from the ajax on order details page i.e refund, additional qty etc
|
||||
$method = Tools::getValue('method');
|
||||
// extra demands popup ajax
|
||||
if ($method == 'getRoomTypeBookingDemands') {
|
||||
$response = array('reload' => false);
|
||||
if (($idProduct = Tools::getValue('id_product'))
|
||||
&& ($idOrder = Tools::getValue('id_order'))
|
||||
&& ($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
) {
|
||||
$objBookingDemand = new HotelBookingDemands();
|
||||
$useTax = 0;
|
||||
$customer = Context::getContext()->customer;
|
||||
if (Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC) {
|
||||
$useTax = 1;
|
||||
}
|
||||
if ($extraDemands = $objBookingDemand->getRoomTypeBookingExtraDemands(
|
||||
$idOrder,
|
||||
$idProduct,
|
||||
0,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
1,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'useTax' => $useTax,
|
||||
'extraDemands' => $extraDemands,
|
||||
)
|
||||
);
|
||||
}
|
||||
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
|
||||
if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
|
||||
$idOrder,
|
||||
0,
|
||||
0,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
0,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(array(
|
||||
'useTax' => $useTax,
|
||||
'additionalServices' => $additionalServices,
|
||||
));
|
||||
}
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'objOrder' => new Order($idOrder)
|
||||
)
|
||||
);
|
||||
$response['extra_demands'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order_booking_demands.tpl');
|
||||
}
|
||||
|
||||
die(json_encode($response));
|
||||
} elseif ($method == 'submitRefundRequest') { // room cancellation ajax
|
||||
$hasError = 0;
|
||||
if (!$refundReason = Tools::getValue('cancellation_reason')) {
|
||||
$hasError = 1;
|
||||
} elseif (!Validate::isCleanHtml($refundReason)) {
|
||||
$hasError = 1;
|
||||
}
|
||||
if ($bookingRefunds = Tools::getValue('bookings_to_refund')) {
|
||||
if (!count($bookingRefunds = json_decode($bookingRefunds, true))) {
|
||||
$hasError = 1;
|
||||
} else {
|
||||
foreach ($bookingRefunds as $idHtlBooking) {
|
||||
$objHotelBookingDetail = new HotelBookingDetail($idHtlBooking);
|
||||
if ($objHotelBookingDetail->id_customer != $order->id_customer
|
||||
|| OrderReturn::getOrdersReturnDetail($order->id, 0, $idHtlBooking)
|
||||
) {
|
||||
$hasError = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$hasError = 1;
|
||||
}
|
||||
$res = true;
|
||||
if (!$hasError) {
|
||||
$hasCancelled = 0;
|
||||
// if amount paid is > 0 then create refund request else cancel the booking directly
|
||||
if ($order->getTotalPaid() > 0) {
|
||||
$objOrderReturn = new OrderReturn();
|
||||
$objOrderReturn->id_customer = $order->id_customer;
|
||||
$objOrderReturn->id_order = $order->id;
|
||||
$objOrderReturn->state = 0;
|
||||
$objOrderReturn->by_admin = 0;
|
||||
$objOrderReturn->question = $refundReason;
|
||||
$objOrderReturn->save();
|
||||
if ($objOrderReturn->id) {
|
||||
foreach ($bookingRefunds as $idHtlBooking) {
|
||||
$objHtlBooking = new HotelBookingDetail($idHtlBooking);
|
||||
$numDays = $objHtlBooking->getNumberOfDays(
|
||||
$objHtlBooking->date_from,
|
||||
$objHtlBooking->date_to
|
||||
);
|
||||
|
||||
$objOrderReturnDetail = new OrderReturnDetail();
|
||||
$objOrderReturnDetail->id_order_return = $objOrderReturn->id;
|
||||
$objOrderReturnDetail->id_order_detail = $objHtlBooking->id_order_detail;
|
||||
$objOrderReturnDetail->product_quantity = $numDays;
|
||||
$objOrderReturnDetail->id_htl_booking = $idHtlBooking;
|
||||
$objOrderReturnDetail->save();
|
||||
}
|
||||
}
|
||||
// Emails to customer, admin on refund request state change
|
||||
$objOrderReturn->changeIdOrderReturnState(Configuration::get('PS_ORS_PENDING'));
|
||||
} else {
|
||||
$hasCancelled = 1;
|
||||
// cancel the booking directly
|
||||
foreach ($bookingRefunds as $idHtlBooking) {
|
||||
$objHtlBooking = new HotelBookingDetail($idHtlBooking);
|
||||
if (!$objHtlBooking->processRefundInBookingTables()) {
|
||||
die(json_encode(array('status' => 0)));
|
||||
} else {
|
||||
// set the message for the cancellation
|
||||
$message = Tools::displayError('1 Room from').' '.', '.$objHtlBooking->room_type_name.' '.Tools::displayError('has been cancelled by the hotel.');
|
||||
$message .= PHP_EOL.Tools::displayError('Reason').': '.$refundReason;
|
||||
|
||||
$objHtlBooking->setBookingCancellationMessage($refundReason);
|
||||
}
|
||||
}
|
||||
|
||||
// if all bookings are getting cancelled then cancel the order also
|
||||
if ($order->hasCompletelyRefunded(Order::ORDER_COMPLETE_CANCELLATION_FLAG)) {
|
||||
$objOrderHistory = new OrderHistory();
|
||||
$objOrderHistory->id_order = (int)$order->id;
|
||||
|
||||
$idOrderState = Configuration::get('PS_OS_CANCELED');
|
||||
|
||||
$useExistingPayment = false;
|
||||
if (!$order->hasInvoice()) {
|
||||
$useExistingPayment = true;
|
||||
}
|
||||
|
||||
$objOrderHistory->changeIdOrderState($idOrderState, $order, $useExistingPayment);
|
||||
$objOrderHistory->addWithemail();
|
||||
}
|
||||
}
|
||||
|
||||
die(json_encode(array('status' => 1, 'has_cancelled' => $hasCancelled)));
|
||||
}
|
||||
|
||||
die(json_encode(array('status' => 0)));
|
||||
}
|
||||
} else {
|
||||
die(json_encode(array('status' => 0)));
|
||||
}
|
||||
// END ajax request handle
|
||||
|
||||
if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) {
|
||||
$id_order_state = (int)$order->getCurrentState();
|
||||
$carrier = new Carrier((int)$order->id_carrier, (int)$order->id_lang);
|
||||
@@ -376,9 +112,9 @@ class OrderDetailControllerCore extends FrontController
|
||||
$cover_image_arr = $product->getCover($type_value['product_id']);
|
||||
|
||||
if (!empty($cover_image_arr)) {
|
||||
$cover_img = $this->context->link->getImageLink($product->link_rewrite, $product->id.'-'.$cover_image_arr['id_image'], 'small_default');
|
||||
$cover_img = $this->context->link->getImageLink($product->link_rewrite, $product->id.'-'.$cover_image_arr['id_image'], 'home_default');
|
||||
} else {
|
||||
$cover_img = $this->context->link->getImageLink($product->link_rewrite, $this->context->language->iso_code.'-default', 'small_default');
|
||||
$cover_img = $this->context->link->getImageLink($product->link_rewrite, $this->context->language->iso_code.'-default', 'home_default');
|
||||
}
|
||||
|
||||
if (isset($customer->id)) {
|
||||
@@ -459,9 +195,18 @@ class OrderDetailControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['hotel_booking_details'][$data_v['id']]['id_htl_booking'] = $data_v['id'];
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['hotel_booking_details'][$data_v['id']]['id_room'] = $data_v['id_room'];
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['hotel_booking_details'][$data_v['id']]['adults'] = $data_v['adults'];
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['hotel_booking_details'][$data_v['id']]['children'] = $data_v['children'];
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['hotel_booking_details'][$data_v['id']]['child_ages'] = $data_v['child_ages'];
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['hotel_booking_details'][$data_v['id']]['is_refunded'] = $data_v['is_refunded'];
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['hotel_booking_details'][$data_v['id']]['is_cancelled'] = $data_v['is_cancelled'];
|
||||
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['is_refunded'] = $data_v['is_refunded'];
|
||||
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['ids_htl_booking_detail'][] = $data_v['id'];
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['ids_rooms'][] = $data_v['id_room'];
|
||||
|
||||
$cartHotelData[$type_key]['date_diff'][$date_join]['extra_demands'] = $objBookingDemand->getRoomTypeBookingExtraDemands(
|
||||
$id_order,
|
||||
@@ -637,6 +382,13 @@ class OrderDetailControllerCore extends FrontController
|
||||
|
||||
$objHotelBookingDetail = new HotelBookingDetail();
|
||||
$htlBookingDetail = $objHotelBookingDetail->getOrderCurrentDataByOrderId($order->id);
|
||||
$idHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id);
|
||||
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
|
||||
$hotelAddressInfo = HotelBranchInformation::getAddress($idHotel);
|
||||
|
||||
$objHotelBranchRefundRules = new HotelBranchRefundRules();
|
||||
$hotelRefundRules = $objHotelBranchRefundRules->getHotelRefundRules($idHotel, 0, 1);
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'id_cms_refund_policy' => Configuration::get('WK_GLOBAL_REFUND_POLICY_CMS'),
|
||||
@@ -651,6 +403,9 @@ class OrderDetailControllerCore extends FrontController
|
||||
'order_has_invoice' => $order->hasInvoice(),
|
||||
'cart_htl_data' => $cartHotelData,
|
||||
'cart_service_products' => $cartServiceProducts,
|
||||
'obj_hotel_branch_information' => $objHotelBranchInformation,
|
||||
'hotel_address_info' => $hotelAddressInfo,
|
||||
'hotel_refund_rules' => $hotelRefundRules,
|
||||
)
|
||||
);
|
||||
// }
|
||||
@@ -660,6 +415,7 @@ class OrderDetailControllerCore extends FrontController
|
||||
if ($refundReqBookings = $objOrderReturn->getOrderRefundRequestedBookings($order->id, 0, 1)) {
|
||||
$refundedAmount = $objOrderReturn->getRefundedAmount($order->id);
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'hasOrderPaid' => $order->hasBeenPaid(),
|
||||
@@ -710,7 +466,7 @@ class OrderDetailControllerCore extends FrontController
|
||||
|
||||
unset($carrier, $addressInvoice, $addressDelivery);
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('This order cannot be found.');
|
||||
$this->errors[] = Tools::displayError('The booking cannot be found.');
|
||||
}
|
||||
unset($order);
|
||||
}
|
||||
@@ -718,12 +474,335 @@ class OrderDetailControllerCore extends FrontController
|
||||
$this->setTemplate(_PS_THEME_DIR_.'order-detail.tpl');
|
||||
}
|
||||
|
||||
public function displayAjaxGetRoomTypeBookingDemands()
|
||||
{
|
||||
$response = array('extra_demands' => false);
|
||||
|
||||
if (($idProduct = Tools::getValue('id_product'))
|
||||
&& ($idOrder = Tools::getValue('id_order'))
|
||||
&& ($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
) {
|
||||
$objHotelBookingDemands = new HotelBookingDemands();
|
||||
$useTax = 0;
|
||||
if (Group::getPriceDisplayMethod($this->context->customer->id_default_group) == PS_TAX_INC) {
|
||||
$useTax = 1;
|
||||
}
|
||||
if ($extraDemands = $objHotelBookingDemands->getRoomTypeBookingExtraDemands(
|
||||
$idOrder,
|
||||
$idProduct,
|
||||
0,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
1,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(array(
|
||||
'useTax' => $useTax,
|
||||
'extraDemands' => $extraDemands,
|
||||
));
|
||||
}
|
||||
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
|
||||
if ($additionalServices = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
|
||||
$idOrder,
|
||||
0,
|
||||
0,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
0,
|
||||
0,
|
||||
$useTax
|
||||
)) {
|
||||
$this->context->smarty->assign(array(
|
||||
'useTax' => $useTax,
|
||||
'additionalServices' => $additionalServices,
|
||||
));
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'objOrder' => new Order($idOrder),
|
||||
));
|
||||
|
||||
$response['extra_demands'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order-extra-services.tpl');
|
||||
}
|
||||
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
public function displayAjaxSubmitRefundRequest()
|
||||
{
|
||||
$response = array('has_errors' => false);
|
||||
|
||||
$idOrder = Tools::getValue('id_order');
|
||||
$idsHtlBooking = Tools::getValue('bookings_to_refund');
|
||||
$cancellationReason = trim(Tools::getValue('cancellation_reason'));
|
||||
|
||||
if (!$idsHtlBooking) {
|
||||
$this->errors[] = Tools::displayError('Please select at least on room for cancellation.');
|
||||
}
|
||||
|
||||
if (!$cancellationReason) {
|
||||
$this->errors[] = Tools::displayError('Please mention a reason for cancellation.');
|
||||
} elseif ($cancellationReason && !Validate::isCleanHtml($cancellationReason)) {
|
||||
$this->errors[] = Tools::displayError('Reason of cancellation is invalid. Please enter valid data.');
|
||||
}
|
||||
|
||||
if (!count($this->errors)) {
|
||||
$objOrder = new Order($idOrder);
|
||||
if (!(Validate::isLoadedObject($objOrder) && $objOrder->id_customer == $this->context->customer->id)) {
|
||||
$this->errors[] = Tools::displayError('Something went wrong. Please try later.');
|
||||
} elseif ($idsHtlBooking) {
|
||||
foreach ($idsHtlBooking as $idHtlBooking) {
|
||||
$objHotelBookingDetail = new HotelBookingDetail($idHtlBooking);
|
||||
if ($objHotelBookingDetail->id_customer != $objOrder->id_customer) {
|
||||
$this->errors[] = Tools::displayError('Something went wrong. Please try later.');
|
||||
break;
|
||||
}
|
||||
|
||||
if (OrderReturn::getOrdersReturnDetail($objOrder->id, 0, $idHtlBooking)) {
|
||||
$this->errors[] = Tools::displayError('Some selected rooms have already been requested for cancellation.');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!count($this->errors)) {
|
||||
if ((int) $objOrder->total_paid_real == 0) {
|
||||
foreach ($idsHtlBooking as $idHtlBooking) {
|
||||
$objHtlBooking = new HotelBookingDetail($idHtlBooking);
|
||||
$objHtlBooking->save();
|
||||
}
|
||||
}
|
||||
|
||||
// if amount paid is > 0 then create refund request else cancel the booking directly
|
||||
if ($objOrder->getTotalPaid() > 0) {
|
||||
$objOrderReturn = new OrderReturn();
|
||||
$objOrderReturn->id_customer = $objOrder->id_customer;
|
||||
$objOrderReturn->id_order = $objOrder->id;
|
||||
$objOrderReturn->state = 0;
|
||||
$objOrderReturn->by_admin = 0;
|
||||
$objOrderReturn->question = $cancellationReason;
|
||||
$objOrderReturn->save();
|
||||
if ($objOrderReturn->id) {
|
||||
foreach ($idsHtlBooking as $idHtlBooking) {
|
||||
$objHotelBookingDetail = new HotelBookingDetail($idHtlBooking);
|
||||
$numDays = $objHotelBookingDetail->getNumberOfDays(
|
||||
$objHotelBookingDetail->date_from,
|
||||
$objHotelBookingDetail->date_to
|
||||
);
|
||||
|
||||
$objOrderReturnDetail = new OrderReturnDetail();
|
||||
$objOrderReturnDetail->id_order_return = $objOrderReturn->id;
|
||||
$objOrderReturnDetail->id_order_detail = $objHotelBookingDetail->id_order_detail;
|
||||
$objOrderReturnDetail->product_quantity = $numDays;
|
||||
$objOrderReturnDetail->id_htl_booking = $idHtlBooking;
|
||||
$objOrderReturnDetail->save();
|
||||
}
|
||||
}
|
||||
|
||||
// Emails to customer, superadmin and employees on refund request state change
|
||||
$objOrderReturn->changeIdOrderReturnState(Configuration::get('PS_ORS_PENDING'));
|
||||
} else {
|
||||
// cancel the booking directly
|
||||
foreach ($idsHtlBooking as $idHtlBooking) {
|
||||
$objHotelBookingDetail = new HotelBookingDetail($idHtlBooking);
|
||||
if (!$objHotelBookingDetail->processRefundInBookingTables()) {
|
||||
$this->errors[] = Tools::displayError('Something went wrong. Please try later.');
|
||||
} else {
|
||||
// set the message for the cancellation
|
||||
$message = Tools::displayError(sprintf(
|
||||
"1 room from %s has been cancelled by hotel.\nReason: %s",
|
||||
$objHotelBookingDetail->room_type_name,
|
||||
$cancellationReason
|
||||
));
|
||||
|
||||
$objHotelBookingDetail->setBookingCancellationMessage($message);
|
||||
}
|
||||
}
|
||||
|
||||
// if all bookings are getting cancelled then cancel the order also
|
||||
if ($objOrder->hasCompletelyRefunded(Order::ORDER_COMPLETE_CANCELLATION_FLAG)) {
|
||||
$objOrderHistory = new OrderHistory();
|
||||
$objOrderHistory->id_order = (int)$objOrder->id;
|
||||
|
||||
$idOrderState = Configuration::get('PS_OS_CANCELED');
|
||||
|
||||
$useExistingPayment = false;
|
||||
if (!$objOrder->hasInvoice()) {
|
||||
$useExistingPayment = true;
|
||||
}
|
||||
|
||||
$objOrderHistory->changeIdOrderState($idOrderState, $objOrder, $useExistingPayment);
|
||||
$objOrderHistory->addWithemail();
|
||||
|
||||
$response['order_cancelled'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($this->errors)) {
|
||||
$this->context->smarty->assign(array('errors' => $this->errors));
|
||||
$response['errors_html'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'errors.tpl');
|
||||
}
|
||||
|
||||
$response['has_errors'] = (bool) count($this->errors);
|
||||
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
public function displayAjaxSubmitMessage()
|
||||
{
|
||||
$response = array('status' => false);
|
||||
|
||||
$idOrder = (int) Tools::getValue('id_order');
|
||||
$msgText = Tools::getValue('msgText');
|
||||
|
||||
if (!$idOrder || !Validate::isUnsignedId($idOrder)) {
|
||||
$this->errors[] = Tools::displayError('The order is no longer valid.');
|
||||
} elseif (empty($msgText)) {
|
||||
$this->errors[] = Tools::displayError('The message cannot be blank.');
|
||||
} elseif (!Validate::isMessage($msgText)) {
|
||||
$this->errors[] = Tools::displayError('This message is invalid (HTML is not allowed).');
|
||||
}
|
||||
if (!count($this->errors)) {
|
||||
$order = new Order($idOrder);
|
||||
if (Validate::isLoadedObject($order) && $order->id_customer == $this->context->customer->id) {
|
||||
//check if a thread already exist
|
||||
$id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($this->context->customer->email, $order->id);
|
||||
$id_product = (int)Tools::getValue('id_product');
|
||||
$cm = new CustomerMessage();
|
||||
if (!$id_customer_thread) {
|
||||
$ct = new CustomerThread();
|
||||
$ct->id_contact = 0;
|
||||
$ct->id_customer = (int)$order->id_customer;
|
||||
$ct->id_shop = (int)$this->context->shop->id;
|
||||
if ($id_product && $order->orderContainProduct($id_product)) {
|
||||
$ct->id_product = $id_product;
|
||||
}
|
||||
$ct->id_order = (int)$order->id;
|
||||
$ct->id_lang = (int)$this->context->language->id;
|
||||
$ct->email = $this->context->customer->email;
|
||||
$ct->status = 'open';
|
||||
$ct->token = Tools::passwdGen(12);
|
||||
$ct->add();
|
||||
} else {
|
||||
$ct = new CustomerThread((int)$id_customer_thread);
|
||||
$ct->status = 'open';
|
||||
$ct->update();
|
||||
}
|
||||
|
||||
$cm->id_customer_thread = $ct->id;
|
||||
$cm->message = $msgText;
|
||||
$cm->ip_address = (int)ip2long($_SERVER['REMOTE_ADDR']);
|
||||
$cm->add();
|
||||
|
||||
if (!Configuration::get('PS_MAIL_EMAIL_MESSAGE')) {
|
||||
$to = strval(Configuration::get('PS_SHOP_EMAIL'));
|
||||
} else {
|
||||
$to = new Contact((int)Configuration::get('PS_MAIL_EMAIL_MESSAGE'));
|
||||
$to = strval($to->email);
|
||||
}
|
||||
$toName = strval(Configuration::get('PS_SHOP_NAME'));
|
||||
$customer = $this->context->customer;
|
||||
|
||||
$product = new Product($id_product);
|
||||
$product_name = '';
|
||||
if (Validate::isLoadedObject($product) && isset($product->name[(int)$this->context->language->id])) {
|
||||
$product_name = $product->name[(int)$this->context->language->id];
|
||||
}
|
||||
|
||||
if (Validate::isLoadedObject($customer)) {
|
||||
Mail::Send(
|
||||
$this->context->language->id,
|
||||
'order_customer_comment',
|
||||
Mail::l('Message from a customer'),
|
||||
array(
|
||||
'{lastname}' => $customer->lastname,
|
||||
'{firstname}' => $customer->firstname,
|
||||
'{email}' => $customer->email,
|
||||
'{id_order}' => (int)$order->id,
|
||||
'{order_name}' => $order->getUniqReference(),
|
||||
'{message}' => Tools::nl2br($msgText),
|
||||
'{product_name}' => $product_name
|
||||
),
|
||||
$to,
|
||||
$toName,
|
||||
strval(Configuration::get('PS_SHOP_EMAIL')),
|
||||
$customer->firstname.' '.$customer->lastname,
|
||||
null,
|
||||
null,
|
||||
_PS_MAIL_DIR_,
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
$customer->email
|
||||
);
|
||||
}
|
||||
|
||||
// send message html in json
|
||||
$response['status'] = true;
|
||||
|
||||
$message = CustomerMessage::getMessagesByOrderId($order->id, false)[0];
|
||||
$this->context->smarty->assign(array('message' => $message));
|
||||
$response['message_html'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order-message.tpl');
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Order not found');
|
||||
}
|
||||
}
|
||||
|
||||
if (count($this->errors)) {
|
||||
$this->context->smarty->assign(array('errors' => $this->errors));
|
||||
$response['errors_html'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'errors.tpl');
|
||||
}
|
||||
|
||||
$response['has_errors'] = (bool) count($this->errors);
|
||||
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
if (Tools::getValue('ajax') != 'true') {
|
||||
parent::setMedia();
|
||||
$this->addCSS(_THEME_CSS_DIR_.'history.css');
|
||||
$this->addCSS(_THEME_CSS_DIR_.'addresses.css');
|
||||
|
||||
$this->addCSS(_THEME_CSS_DIR_.'order-detail.css');
|
||||
|
||||
$this->addJS(array(
|
||||
_THEME_JS_DIR_.'order-detail.js',
|
||||
_THEME_JS_DIR_.'tools.js',
|
||||
));
|
||||
|
||||
$this->addJqueryPlugin(array('fancybox', 'scrollTo', 'footable', 'footable-sort'));
|
||||
$this->addJqueryUI(array('ui.tooltip'), 'base', true);
|
||||
|
||||
// load Google Maps library if configured
|
||||
if ($idHotel = HotelBookingDetail::getIdHotelByIdOrder(Tools::getValue('id_order'))) {
|
||||
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
|
||||
if (Validate::isLoadedObject($objHotelBranchInformation)) {
|
||||
if ($apiKey = Configuration::get('PS_API_KEY')) {
|
||||
if (floatval($objHotelBranchInformation->latitude) != 0
|
||||
&& floatval($objHotelBranchInformation->longitude) != 0
|
||||
) {
|
||||
Media::addJsDef(array(
|
||||
'hotel_location' => array(
|
||||
'latitude' => $objHotelBranchInformation->latitude,
|
||||
'longitude' => $objHotelBranchInformation->longitude,
|
||||
'map_input_text' => $objHotelBranchInformation->map_input_text,
|
||||
),
|
||||
'hotel_name' => $objHotelBranchInformation->hotel_name,
|
||||
));
|
||||
|
||||
$this->addJS(
|
||||
'https://maps.googleapis.com/maps/api/js?key='.$apiKey.'&libraries=places&language='.
|
||||
$this->context->language->iso_code.'®ion='.$this->context->country->iso_code
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,10 @@
|
||||
<page>history</page>
|
||||
<configurable>1</configurable>
|
||||
</meta>
|
||||
<meta id="order-detail">
|
||||
<page>order-detail</page>
|
||||
<configurable>1</configurable>
|
||||
</meta>
|
||||
<meta id="identity">
|
||||
<page>identity</page>
|
||||
<configurable>1</configurable>
|
||||
|
||||
@@ -15,31 +15,32 @@
|
||||
<theme_meta id="theme_meta_6" id_theme="1" id_meta="6" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_7" id_theme="1" id_meta="7" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_8" id_theme="1" id_meta="8" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_10" id_theme="1" id_meta="9" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_11" id_theme="1" id_meta="10" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_12" id_theme="1" id_meta="11" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_13" id_theme="1" id_meta="12" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_14" id_theme="1" id_meta="13" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_15" id_theme="1" id_meta="14" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_16" id_theme="1" id_meta="15" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_17" id_theme="1" id_meta="16" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_18" id_theme="1" id_meta="17" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_19" id_theme="1" id_meta="18" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_20" id_theme="1" id_meta="19" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_21" id_theme="1" id_meta="20" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_22" id_theme="1" id_meta="21" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_23" id_theme="1" id_meta="22" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_24" id_theme="1" id_meta="23" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_25" id_theme="1" id_meta="24" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_26" id_theme="1" id_meta="25" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_27" id_theme="1" id_meta="26" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_28" id_theme="1" id_meta="28" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_29" id_theme="1" id_meta="29" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_30" id_theme="1" id_meta="27" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_31" id_theme="1" id_meta="30" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_32" id_theme="1" id_meta="31" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_33" id_theme="1" id_meta="32" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_34" id_theme="1" id_meta="33" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_35" id_theme="1" id_meta="34" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_9" id_theme="1" id_meta="9" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_10" id_theme="1" id_meta="10" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_11" id_theme="1" id_meta="11" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_12" id_theme="1" id_meta="12" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_13" id_theme="1" id_meta="13" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_14" id_theme="1" id_meta="14" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_15" id_theme="1" id_meta="15" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_16" id_theme="1" id_meta="16" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_17" id_theme="1" id_meta="17" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_18" id_theme="1" id_meta="18" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_19" id_theme="1" id_meta="19" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_20" id_theme="1" id_meta="20" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_21" id_theme="1" id_meta="21" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_22" id_theme="1" id_meta="22" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_23" id_theme="1" id_meta="23" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_24" id_theme="1" id_meta="24" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_25" id_theme="1" id_meta="25" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_26" id_theme="1" id_meta="26" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_27" id_theme="1" id_meta="27" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_28" id_theme="1" id_meta="28" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_29" id_theme="1" id_meta="29" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_30" id_theme="1" id_meta="30" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_31" id_theme="1" id_meta="31" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_32" id_theme="1" id_meta="32" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_33" id_theme="1" id_meta="33" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_34" id_theme="1" id_meta="34" left_column="0" right_column="0"/>
|
||||
<theme_meta id="theme_meta_35" id_theme="1" id_meta="35" left_column="0" right_column="0"/>
|
||||
</entities>
|
||||
</entity_theme_meta>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Детайл за резервацията</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detal-za-rezervaciata</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>বুকিং বিবরণ</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>booking-biborn</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>পরিচয় </title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>histórico-de-pedidos</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Devezh bemdez</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>devezh-bemdez</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>Identificação</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>historie-objednavek</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Detail rezervace</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detail-rezervace</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>bestellungsverlauf</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Buchungsdetails</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>buchungsdetails</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Kennung</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Booking details</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>order-detail</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>historial-compra</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Detalle de reserva</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detalle-de-reserva</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>Datos personales</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>جزئیات رزرو</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>jazayiat-rezrv</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>مشخصات</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>historique-commandes</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Détails de réservation</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>details-de-reservation</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>Identité</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>הסטוריית-הזמנות</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>פרטי ההזמנה</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>partei-hahazmana</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>זהות</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Detalji rezervacije</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detalji-rezervacije</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Foglalás részletei</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>foglalas-reszletei</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>riwayat-pembelian</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Detail Pemesanan</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detail-pemesanan</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>Identitas</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>cronologia-ordini</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Dettaglio prenotazione</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>dettaglio-prenotazione</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>Identità</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Užsakymo informacija</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>uzsakymo-informacija</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Детали за резервацијата</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detali-za-rezervacijata</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>bestel-overzicht</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Boekingsdetails</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>boekingsdetails</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>Identiteit</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Bestillingsdetaljer</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>bestillingsdetaljer</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>historia-zamowien</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Szczegóły rezerwacji</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>szczegoly-rezerwacji</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Dane osobiste</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>historico-de-encomendas</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Detalhe da reserva</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detalhe-da-reserva</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identidade</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>historique-commandes</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Détail de la réservation</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detail-de-la-reservation</url_rewrite>
|
||||
</meta>
|
||||
<meta id='identity' id_shop='1'>
|
||||
<title>Identité</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>istoric-comenzi</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Detalii rezervare</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detalii-rezervare</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identitate</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Детали бронирования</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detali-bronirovaniya</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Идентификация</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>ගිතේරිම් විස්තර</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>githerims-wisthara</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Detalji rezervacije</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>detalji-rezervacije</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Bokningsinformation</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>bokningsinformation</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>預訂明細</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>yùdìng-míngxi</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>識別</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>Chi tiết đặt phòng</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>chi-tiet-dat-phong</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-history</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-detail" id_shop="1">
|
||||
<title>预订详情</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>yùdìng-xiángqíng</url_rewrite>
|
||||
</meta>
|
||||
<meta id="identity" id_shop="1">
|
||||
<title>Identity</title>
|
||||
<description/>
|
||||
|
||||
@@ -697,6 +697,7 @@ class InstallModelInstall extends InstallAbstractModel
|
||||
'statsbestvouchers',
|
||||
'statsbestcustomers',
|
||||
'statsequipment',
|
||||
'qlostatsserviceproducts',
|
||||
'blockcart',
|
||||
'blockuserinfo',
|
||||
'qlochannelmanagerconnector',
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@
|
||||
|
||||
<ul id="footer">
|
||||
<li><a href="<?php echo $this->getForumLink() ?>" title="<?php echo $this->l('Official forum'); ?>" target="_blank"><?php echo $this->l('Official forum'); ?></a> | </li>
|
||||
<li><a href="https://qloapps.com/" title="qloapps.com" target="_blank">QloApps.com</a> | </li>
|
||||
<li><a href="https://qloapps.com/" title="qloapps.com" target="_blank">QloApps</a> | </li>
|
||||
<li><a href="<?php echo $this->getSupportLink() ?>" title="<?php echo $this->l('Support'); ?>" target="_blank"><?php echo $this->l('Support'); ?></a> | </li>
|
||||
<li><a href="<?php echo $this->getDocumentationLink() ?>" title="<?php echo $this->l('Documentation'); ?>" target="_blank"><?php echo $this->l('Documentation'); ?></a> | </li>
|
||||
<li><a href="<?php echo $this->getContactLink() ?>" title="<?php echo $this->l('Contact us'); ?>" target="_blank"><?php echo $this->l('Contact us'); ?></a> | </li>
|
||||
|
||||
@@ -119,9 +119,9 @@ var admin = '<?php echo(file_exists('../admin-dev') ? '../admin-dev' : '../admin
|
||||
<button type="button" class="btn-facebook" onclick="psinstall_facebook_click();">
|
||||
<i></i> <?php echo $this->l('Share'); ?>
|
||||
</button>
|
||||
<button type="button" class="btn-google-plus" onclick="psinstall_google_click();">
|
||||
<!-- <button type="button" class="btn-google-plus" onclick="psinstall_google_click();">
|
||||
<i></i> <?php echo $this->l('Google+'); ?>
|
||||
</button>
|
||||
</button> -->
|
||||
<!-- <button type="button" class="btn-pinterest" onclick="psinstall_pinterest_click();">
|
||||
<i></i> <?php echo $this->l('Pinterest'); ?>
|
||||
</button> -->
|
||||
|
||||
2343
js/admin/orders.js
2343
js/admin/orders.js
File diff suppressed because it is too large
Load Diff
@@ -482,7 +482,7 @@ var ajaxCart = {
|
||||
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
if (XMLHttpRequest.readyState == 0) {
|
||||
if (!onlineFlag) {
|
||||
showErrorMessage(no_internet_txt);
|
||||
} else {
|
||||
var error = "Impossible to add the room to the cart.<br/>textStatus: '" + textStatus + "'<br/>errorThrown: '" + errorThrown + "'<br/>responseText:<br/>" + XMLHttpRequest.responseText;
|
||||
@@ -620,7 +620,7 @@ var ajaxCart = {
|
||||
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
if (XMLHttpRequest.readyState == 0) {
|
||||
if (!onlineFlag) {
|
||||
showErrorMessage(no_internet_txt);
|
||||
} else {
|
||||
var error = "Impossible to add the room to the cart.<br/>textStatus: '" + textStatus + "'<br/>errorThrown: '" + errorThrown + "'<br/>responseText:<br/>" + XMLHttpRequest.responseText;
|
||||
@@ -694,8 +694,8 @@ var ajaxCart = {
|
||||
deleteProductFromSummary(idProduct + '_' + idCombination + '_' + customizationId + '_' + idAddressDelivery);
|
||||
}*/
|
||||
},
|
||||
error: function(jqXHR) {
|
||||
if (jqXHR.readyState == 0) {
|
||||
error: function() {
|
||||
if (!onlineFlag) {
|
||||
showErrorMessage(no_internet_txt);
|
||||
} else {
|
||||
var error = 'ERROR: unable to delete the product';
|
||||
|
||||
@@ -17,8 +17,8 @@ $(document).on('click', '#blocknewsletter .newsletter-btn', function (e) {
|
||||
let messageBlock = $('#blocknewsletter .message-block');
|
||||
$(messageBlock).html(response.message_html).stop(true, true).fadeIn('fast');
|
||||
},
|
||||
error: function (jqXHR) {
|
||||
if (jqXHR.readyState == 0) {
|
||||
error: function () {
|
||||
if (!onlineFlag) {
|
||||
showErrorMessage(no_internet_txt);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -58,6 +58,8 @@ class GridHtml extends ModuleGridEngine
|
||||
|
||||
public static function hookGridEngine($params, $grider)
|
||||
{
|
||||
static $divid = 1;
|
||||
|
||||
$objModule = Module::getInstanceByName('gridhtml');
|
||||
self::$_columns = $params['columns'];
|
||||
if (!isset($params['emptyMsg']))
|
||||
@@ -71,32 +73,32 @@ class GridHtml extends ModuleGridEngine
|
||||
}
|
||||
|
||||
$html = '
|
||||
<table class="table" id="grid_1">
|
||||
<table class="table" id="grid_'.$divid.'">
|
||||
<thead>
|
||||
<tr>';
|
||||
foreach ($params['columns'] as $column)
|
||||
$html .= '<th class="center" '.((isset($column['tooltip']) && $column['tooltip']) ? ('data-toggle="tooltip" title="'.$column['tooltip'].'"') : '').'><span class="title_box active">'.$column['header'].'</span></th>';
|
||||
$html .= '<th class="'.((isset($column['align']) && $column['align']) ? $column['align'] : 'center').'" '.((isset($column['tooltip']) && $column['tooltip']) ? ('data-toggle="tooltip" title="'.$column['tooltip'].'"') : '').'><span class="title_box active">'.$column['header'].'</span></th>';
|
||||
$html .= '</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
<tfoot><tr><th colspan="'.count($params['columns']).'"></th></tr></tfoot>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
function getGridData(url)
|
||||
function getGridData'.$divid.'(url)
|
||||
{
|
||||
$("#grid_1 tbody").html("<tr><td style=\"text-align:center\" colspan=\"" + '.count($params['columns']).' + "\"><img src=\"../img/loadingAnimation.gif\" /></td></tr>");
|
||||
$("#grid_'.$divid.' tbody").html("<tr><td style=\"text-align:center\" colspan=\"" + '.count($params['columns']).' + "\"><img src=\"../img/loadingAnimation.gif\" /></td></tr>");
|
||||
$.get(url, "", function(json) {
|
||||
$("#grid_1 tbody").html("");
|
||||
$("#grid_'.$divid.' tbody").html("");
|
||||
var array = $.parseJSON(json);
|
||||
$("#grid_1 tfoot tr th").html("'.addslashes($params['pagingMessage']).'");
|
||||
$("#grid_1 tfoot tr th").html($("#grid_1 tfoot tr th").html().replace("{0}", array["from"]));
|
||||
$("#grid_1 tfoot tr th").html($("#grid_1 tfoot tr th").html().replace("{1}", array["to"]));
|
||||
$("#grid_1 tfoot tr th").html($("#grid_1 tfoot tr th").html().replace("{2}", array["total"]));
|
||||
$("#grid_'.$divid.' tfoot tr th").html("'.addslashes($params['pagingMessage']).'");
|
||||
$("#grid_'.$divid.' tfoot tr th").html($("#grid_'.$divid.' tfoot tr th").html().replace("{0}", array["from"]));
|
||||
$("#grid_'.$divid.' tfoot tr th").html($("#grid_'.$divid.' tfoot tr th").html().replace("{1}", array["to"]));
|
||||
$("#grid_'.$divid.' tfoot tr th").html($("#grid_'.$divid.' tfoot tr th").html().replace("{2}", array["total"]));
|
||||
|
||||
if (array["from"] > 1)
|
||||
$("#grid_1 tfoot tr th").html($("#grid_1 tfoot tr th").html() + " <a style=\\"cursor:pointer;text-decoration:none\\" onclick=\\"gridPrevPage(\'"+ url +"\');\\"><<</a>");
|
||||
$("#grid_'.$divid.' tfoot tr th").html($("#grid_'.$divid.' tfoot tr th").html() + " <a style=\\"cursor:pointer;text-decoration:none\\" onclick=\\"gridPrevPage(\'"+ url +"\');\\"><<</a>");
|
||||
if (array["to"] < array["total"])
|
||||
$("#grid_1 tfoot tr th").html($("#grid_1 tfoot tr th").html() + " | <a style=\\"cursor:pointer;text-decoration:none\\" onclick=\\"gridNextPage(\'"+ url +"\');\\">>></a>");
|
||||
$("#grid_'.$divid.' tfoot tr th").html($("#grid_'.$divid.' tfoot tr th").html() + " | <a style=\\"cursor:pointer;text-decoration:none\\" onclick=\\"gridNextPage(\'"+ url +"\');\\">>></a>");
|
||||
var values = array["values"];
|
||||
if (values.length > 0)
|
||||
$.each(values, function(index, row){
|
||||
@@ -107,10 +109,10 @@ class GridHtml extends ModuleGridEngine
|
||||
$params['defaultSortColumn'] = false;
|
||||
if (!isset($params['defaultSortDirection']))
|
||||
$params['defaultSortDirection'] = false;
|
||||
$html .= ' $("#grid_1 tbody").append(newLine);
|
||||
$html .= ' $("#grid_'.$divid.' tbody").append(newLine);
|
||||
});
|
||||
else
|
||||
$("#grid_1 tbody").append("<tr><td class=\"center\" colspan=\"" + '.count($params['columns']).' + "\">'.$params['emptyMsg'].'</td></tr>");
|
||||
$("#grid_'.$divid.' tbody").append("<tr><td class=\"center\" colspan=\"" + '.count($params['columns']).' + "\">'.$params['emptyMsg'].'</td></tr>");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -142,8 +144,9 @@ class GridHtml extends ModuleGridEngine
|
||||
getGridData(url);
|
||||
}
|
||||
|
||||
$(document).ready(function(){getGridData("'.$grider.'&sort='.urlencode($params['defaultSortColumn']).'&dir='.urlencode($params['defaultSortDirection']).$customParams.'");});
|
||||
$(document).ready(function(){getGridData'.$divid.'("'.$grider.'&sort='.urlencode($params['defaultSortColumn']).'&dir='.urlencode($params['defaultSortDirection']).$customParams.'");});
|
||||
</script>';
|
||||
$divid++;
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
@@ -825,6 +825,22 @@ class HotelBranchInformation extends ObjectModel
|
||||
return true;
|
||||
}
|
||||
|
||||
public function updateRoomTypeCategories()
|
||||
{
|
||||
if (!Validate::isLoadedObject($this)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$hotelCategories = $this->getAllHotelCategories();
|
||||
$objHotelRoomType = new HotelRoomType();
|
||||
if ($roomTypes = $objHotelRoomType->getRoomTypeByHotelId($this->id, Context::getContext()->language->id)) {
|
||||
foreach ($roomTypes as $roomType) {
|
||||
$objProduct = new Product($roomType['id_product']);
|
||||
$objProduct->updateCategories($hotelCategories);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function isRefundable()
|
||||
{
|
||||
return (Configuration::get('WK_ORDER_REFUND_ALLOWED') && $this->active_refund);
|
||||
|
||||
@@ -555,14 +555,22 @@ class HotelHelper
|
||||
|
||||
// create service categories
|
||||
$categories = array(
|
||||
'meals' => array(
|
||||
'name' => 'Meals',
|
||||
'restaurant' => array(
|
||||
'name' => 'Restaurant',
|
||||
'id_category' => 'to_be_set_below',
|
||||
),
|
||||
'transfers' => array(
|
||||
'name' => 'Transfers',
|
||||
'id_category' => 'to_be_set_below',
|
||||
)
|
||||
),
|
||||
'activities' => array(
|
||||
'name' => 'Activities',
|
||||
'id_category' => 'to_be_set_below',
|
||||
),
|
||||
'charges' => array(
|
||||
'name' => 'Operational charges',
|
||||
'id_category' => 'to_be_set_below',
|
||||
),
|
||||
);
|
||||
|
||||
foreach ($categories as &$category) {
|
||||
@@ -574,7 +582,7 @@ class HotelHelper
|
||||
$serviceProducts = array(
|
||||
array(
|
||||
'name' => 'Room Maintenance Fees',
|
||||
'id_category_default' => $idCategoryServices,
|
||||
'id_category_default' => $categories['charges']['id_category'],
|
||||
'description' => 'Ensure a comfortable stay with our room maintenance service, keeping your accommodation pristine and hassle-free throughout your visit.',
|
||||
'price' => '250',
|
||||
'auto_add_to_cart' => 1,
|
||||
@@ -584,7 +592,7 @@ class HotelHelper
|
||||
),
|
||||
array(
|
||||
'name' => 'Internet Handling Charges',
|
||||
'id_category_default' => $idCategoryServices,
|
||||
'id_category_default' => $categories['charges']['id_category'],
|
||||
'description' => 'Navigate our website effortlessly with seamless handling, ensuring reliable, high-speed access for an enjoyable browsing experience throughout your online journey.',
|
||||
'price' => '250',
|
||||
'auto_add_to_cart' => 1,
|
||||
@@ -614,7 +622,7 @@ class HotelHelper
|
||||
),
|
||||
array(
|
||||
'name' => 'Breakfast',
|
||||
'id_category_default' => $categories['meals']['id_category'],
|
||||
'id_category_default' => $categories['restaurant']['id_category'],
|
||||
'description' => 'Start your day right with a delicious and hearty breakfast, thoughtfully prepared to fuel your adventures and make your mornings exceptional.',
|
||||
'price' => '350',
|
||||
'auto_add_to_cart' => 0,
|
||||
@@ -624,7 +632,7 @@ class HotelHelper
|
||||
),
|
||||
array(
|
||||
'name' => 'Dinner',
|
||||
'id_category_default' => $categories['meals']['id_category'],
|
||||
'id_category_default' => $categories['restaurant']['id_category'],
|
||||
'description' => 'Wind down in the evening with a delectable dinner spread, offering a culinary journey that delights your taste buds and completes your day with satisfaction.',
|
||||
'price' => '450',
|
||||
'auto_add_to_cart' => 0,
|
||||
|
||||
@@ -534,7 +534,9 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
if ($objHotelBranch->id_category) {
|
||||
$objCategory = new Category($objHotelBranch->id_category);
|
||||
$objCategory->name = $objHotelBranch->hotel_name;
|
||||
$objCategory->id_parent = $catCity;
|
||||
$objCategory->save();
|
||||
Category::regenerateEntireNtree();
|
||||
} else {
|
||||
if ($catHotel = $objHotelBranch->addCategory(
|
||||
$hotelCatName, $catCity, $groupIds, 1, $newIdHotel, $linkRewriteArray
|
||||
@@ -566,6 +568,9 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
}
|
||||
}
|
||||
|
||||
// update room types association after category update
|
||||
$objHotelBranch->updateRoomTypeCategories();
|
||||
|
||||
if ($idHotel) {
|
||||
// save maximum booking date and preparation time
|
||||
$objHotelOrderRestrictDate = new HotelOrderRestrictDate();
|
||||
|
||||
@@ -107,14 +107,14 @@ class QloHotelReview extends Module
|
||||
|
||||
public function reviewPopupResources()
|
||||
{
|
||||
$controllers = array('history', 'guesttracking');
|
||||
$controllers = array('orderdetail', 'guesttracking');
|
||||
$controller = Tools::getValue('controller');
|
||||
if (!in_array($controller, $controllers)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$idOrder = 0;
|
||||
if ($controller == 'history') {
|
||||
if ($controller == 'orderdetail') {
|
||||
$idOrder = (int) Tools::getValue('id_order');
|
||||
}
|
||||
|
||||
@@ -162,8 +162,6 @@ class QloHotelReview extends Module
|
||||
public function loadMedia($idOrder)
|
||||
{
|
||||
Media::addJsDef(array('qlo_hotel_review_js_vars' => array(
|
||||
'id_order' => (int) $idOrder, // 0 for guesttracking
|
||||
'link' => $this->context->link->getPageLink('order-detail', true),
|
||||
'review_ajax_link' => $this->context->link->getModuleLink($this->name),
|
||||
'review_ajax_token' => $this->secure_key,
|
||||
'raty_img_path' => $this->getPathUri().'views/img/raty',
|
||||
@@ -201,7 +199,7 @@ class QloHotelReview extends Module
|
||||
|
||||
public function hookDisplayFooterBefore()
|
||||
{
|
||||
$controllers = array('history', 'guesttracking');
|
||||
$controllers = array('orderdetail', 'guesttracking');
|
||||
$controller = Tools::getValue('controller');
|
||||
if (in_array($controller, $controllers)) {
|
||||
$categories = QhrCategory::getAll();
|
||||
|
||||
@@ -31,34 +31,22 @@
|
||||
}
|
||||
|
||||
#add-review-popup {
|
||||
width: 650px;
|
||||
width: 600px;
|
||||
margin: 0 auto;
|
||||
padding-right: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
#add-review-popup .card-body {
|
||||
padding: 18px 15px;
|
||||
}
|
||||
|
||||
#add-review-popup .form-group {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
#add-review-popup label {
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#add-review-popup .form-control {
|
||||
padding: 18px 10px;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#add-review-popup .hotel-name {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#add-review-popup .form-control.description {
|
||||
padding: 10px 10px;
|
||||
font-weight: normal;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
#add-review-popup .review-error {
|
||||
@@ -74,28 +62,18 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#add-review-popup .review-actions-wrap .btn-review {
|
||||
font-size: 14px;
|
||||
padding: 12px 30px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#add-review-popup .review-actions-wrap .btn-review.disabled {
|
||||
#add-review-popup .review-actions-wrap .btn.disabled {
|
||||
background-color: #1292FF;
|
||||
border: 1px solid #1292FF;
|
||||
}
|
||||
|
||||
#add-review-popup .image-input-btn {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 4px;
|
||||
border: 1px dashed #999;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#add-review-popup .image-input-btn .img-camera-plus {
|
||||
@@ -109,7 +87,8 @@
|
||||
}
|
||||
|
||||
#add-review-popup .previews-wrap {
|
||||
margin-bottom: 15px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#add-review-popup .previews-wrap span {
|
||||
@@ -120,9 +99,10 @@
|
||||
#add-review-popup .previews-wrap span i {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 14px;
|
||||
font-size: 21px;
|
||||
color: #7f7f7f;
|
||||
right: 16px;
|
||||
font-size: 30px;
|
||||
font-weight: 100;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -135,14 +115,6 @@
|
||||
}
|
||||
|
||||
/* success popup */
|
||||
.fancybox-add-review-success {
|
||||
top: 80px !important;
|
||||
.fancybox-order-detail.feedback .add-review-success-popup i.text-info {
|
||||
color: #1292FF;
|
||||
}
|
||||
|
||||
.add-review-success-popup {
|
||||
width: 650px;
|
||||
}
|
||||
|
||||
.add-review-success-popup i {
|
||||
font-size: 40px;
|
||||
}
|
||||
@@ -205,10 +205,6 @@ $(document).on('shown.bs.tab', 'a[href="#hotel-reviews"]', function(e) {
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
if (typeof qlo_hotel_review_js_vars === 'object' && qlo_hotel_review_js_vars.id_order) {
|
||||
showOrder(1, qlo_hotel_review_js_vars.id_order, qlo_hotel_review_js_vars.link);
|
||||
}
|
||||
|
||||
// init raty
|
||||
if (typeof qlo_hotel_review_js_vars === 'object' && qlo_hotel_review_js_vars.raty_img_path) {
|
||||
initRaty(qlo_hotel_review_js_vars.raty_img_path);
|
||||
|
||||
@@ -21,14 +21,14 @@ var QhrReviewForm = {
|
||||
init: function(idOrder, idHotel, hotelName) {
|
||||
$('#add-review-form').find('[name="id_order"]').val(idOrder);
|
||||
$('#add-review-form').find('[name="id_hotel"]').val(idHotel);
|
||||
$('#add-review-form').find('.hotel-name').html(hotelName);
|
||||
$('#add-review-popup').find('.hotel-name').html(hotelName);
|
||||
QhrReviewImages.init();
|
||||
},
|
||||
show: function() {
|
||||
$.fancybox.open({
|
||||
href: '#add-review-popup',
|
||||
wrapCSS: 'fancybox-add-review',
|
||||
padding: 20,
|
||||
wrapCSS: 'fancybox-add-review fancybox-order-detail',
|
||||
padding: 0,
|
||||
});
|
||||
},
|
||||
close: function() {
|
||||
@@ -95,8 +95,8 @@ var QhrReviewForm = {
|
||||
|
||||
$.fancybox.open({
|
||||
href: href,
|
||||
wrapCSS: 'fancybox-add-review-success',
|
||||
padding: 20,
|
||||
wrapCSS: 'fancybox-order-detail feedback',
|
||||
padding: 0,
|
||||
});
|
||||
},
|
||||
reset: function() {
|
||||
@@ -139,7 +139,7 @@ var QhrReviewImages = {
|
||||
addFileToPreview: function(file, iInput, iFile) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
$('.previews-wrap').append('<span><img data-i-input="'+iInput+'" data-i-file="'+iFile+'" src="'+e.target.result+'" class="img-preview"><i class="icon icon-times-circle-o"></i></span>');
|
||||
$('.previews-wrap').append('<span><img data-i-input="'+iInput+'" data-i-file="'+iFile+'" src="'+e.target.result+'" class="img-preview"><i>×</i></span>');
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
},
|
||||
@@ -249,10 +249,6 @@ $(document).on('change', 'input.input-images', function(e) {
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
if (typeof qlo_hotel_review_js_vars === 'object' && qlo_hotel_review_js_vars.id_order) {
|
||||
showOrder(1, qlo_hotel_review_js_vars.id_order, qlo_hotel_review_js_vars.link);
|
||||
}
|
||||
|
||||
// init raty
|
||||
if (typeof qlo_hotel_review_js_vars === 'object' && qlo_hotel_review_js_vars.raty_img_path) {
|
||||
initRaty(qlo_hotel_review_js_vars.raty_img_path);
|
||||
|
||||
@@ -18,98 +18,103 @@
|
||||
*}
|
||||
|
||||
<div id="qlohotelreview" style="display: none;">
|
||||
<div id="add-review-popup">
|
||||
<div id="add-review-popup" class="card">
|
||||
<div class="card-header">
|
||||
<span class="hotel-name"></span>
|
||||
</div>
|
||||
<form action="{$action}" id="add-review-form" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="id_order" value="0"/>
|
||||
<input type="hidden" name="id_hotel" value="0"/>
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="id_order" value="0"/>
|
||||
<input type="hidden" name="id_hotel" value="0"/>
|
||||
|
||||
<div class="alert alert-danger" id="review-general-errors" style="display:none;"></div>
|
||||
<div class="form-group">
|
||||
<label>{l s='Hotel Name' mod='qlohotelreview'}</label>
|
||||
<p class="hotel-name" type="text" name=""></p>
|
||||
</div>
|
||||
<div class="alert alert-danger" id="review-general-errors" style="display:none;"></div>
|
||||
<div class="form-group images-field">
|
||||
<label>{l s='Images' mod='qlohotelreview'}</label>
|
||||
<div class="inputs-wrap"></div>
|
||||
|
||||
<div class="form-group images-field">
|
||||
<label>{l s='Images' mod='qlohotelreview'}</label>
|
||||
<div class="previews-wrap"></div>
|
||||
<div class="inputs-wrap"></div>
|
||||
|
||||
<div class="image-input-btn">
|
||||
<img class="img-camera-plus">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Tell us about your Overall experience' mod='qlohotelreview'}
|
||||
</label>
|
||||
<div class="stars-wrap">
|
||||
<div class="raty" data-score-name="rating_overall" data-score="0"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($categories) && count($categories)}
|
||||
<div class="categories-wrap">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Tell us more what went well?' mod='qlohotelreview'}
|
||||
</label>
|
||||
<div class="image-input-btn">
|
||||
<img class="img-camera-plus">
|
||||
</div>
|
||||
{foreach $categories as $category}
|
||||
<div class="form-group">
|
||||
<label class="label-category">
|
||||
{$category.name|escape:'html':'UTF-8'}
|
||||
</label>
|
||||
<div class="stars-wrap">
|
||||
<div class="raty" data-score-name="rating_categories[{$category.id_category}]" data-score="0"></div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
<div class="previews-wrap"></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Sumup your review' mod='qlohotelreview'}
|
||||
</label>
|
||||
<input class="form-control" type="text" name="subject" />
|
||||
<p class="review-error subject"></p>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Tell us about your Overall experience' mod='qlohotelreview'}
|
||||
</label>
|
||||
<div class="stars-wrap">
|
||||
<div class="raty" data-score-name="rating_overall" data-score="0"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($categories) && count($categories)}
|
||||
<div class="categories-wrap">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Tell us more what went well?' mod='qlohotelreview'}
|
||||
</label>
|
||||
</div>
|
||||
{foreach $categories as $category}
|
||||
<div class="form-group">
|
||||
<label class="label-category">
|
||||
{$category.name|escape:'html':'UTF-8'}
|
||||
</label>
|
||||
<div class="stars-wrap">
|
||||
<div class="raty" data-score-name="rating_categories[{$category.id_category}]" data-score="0"></div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Sum up your review' mod='qlohotelreview'}
|
||||
</label>
|
||||
<input class="form-control" type="text" name="subject" placeholder="{l s='Type here...' mod='qlohotelreview'}"/>
|
||||
<p class="review-error subject"></p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Write in detail' mod='qlohotelreview'}
|
||||
</label>
|
||||
<textarea class="form-control description" type="text" rows="5" name="description" placeholder="{l s='Type here...' mod='qlohotelreview'}"></textarea>
|
||||
<p class="review-error description"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{l s='Write in detail' mod='qlohotelreview'}
|
||||
</label>
|
||||
<textarea class="form-control description" type="text" rows="5" name="description"></textarea>
|
||||
<p class="review-error description"></p>
|
||||
</div>
|
||||
|
||||
<div class="review-actions-wrap text-right">
|
||||
<a class="btn btn-default btn-review" id="btn-submit-review">
|
||||
{l s='Make Review' mod='qlohotelreview'}
|
||||
</a>
|
||||
<a class="btn btn-default btn-review" id="btn-cancel-review">
|
||||
{l s='Cancel' mod='qlohotelreview'}
|
||||
</a>
|
||||
<div class="card-footer clearfix review-actions-wrap">
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-secondary" id="btn-cancel-review">
|
||||
{l s='Cancel' mod='qlohotelreview'}
|
||||
</button>
|
||||
<button class="btn btn-primary" id="btn-submit-review">
|
||||
{l s='Make Review' mod='qlohotelreview'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="popup-review-submit-success-no-approval"
|
||||
class="add-review-success-popup">
|
||||
<div class="text-center">
|
||||
<div><i class="icon icon-check-circle text-success"></i></div>
|
||||
<h3>{l s='Review added successfully.' mod='qlohotelreview'}</h3>
|
||||
<p>{l s='Your review has been added successfully.' mod='qlohotelreview'}</p>
|
||||
<div id="popup-review-submit-success-no-approval" class="add-review-success-popup">
|
||||
<div class="card">
|
||||
<div class="text-center">
|
||||
<div><i class="icon icon-check-circle text-info"></i></div>
|
||||
<h3>{l s='Review added successfully.' mod='qlohotelreview'}</h3>
|
||||
<p>{l s='Your review has been added successfully.' mod='qlohotelreview'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="popup-review-submit-success-with-approval"
|
||||
class="add-review-success-popup">
|
||||
<div class="text-center">
|
||||
<div><i class="icon icon-check-circle text-success"></i></div>
|
||||
<h3>{l s='Review submitted successfully.' mod='qlohotelreview'}</h3>
|
||||
<p>{l s='Your review has been submitted for approval.' mod='qlohotelreview'}</p>
|
||||
<div id="popup-review-submit-success-with-approval" class="add-review-success-popup">
|
||||
<div class="card">
|
||||
<div class="text-center">
|
||||
<div><i class="icon icon-check-circle text-info"></i></div>
|
||||
<h3>{l s='Review submitted successfully.' mod='qlohotelreview'}</h3>
|
||||
<p>{l s='Your review has been submitted for approval.' mod='qlohotelreview'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
4
modules/qlostatsserviceproducts/CHANGELOG.txt
Normal file
4
modules/qlostatsserviceproducts/CHANGELOG.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Changelog
|
||||
|
||||
v1.0.0
|
||||
- first release
|
||||
29
modules/qlostatsserviceproducts/index.php
Normal file
29
modules/qlostatsserviceproducts/index.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user