Added feature for adding standard product in cart
This commit is contained in:
@@ -79,8 +79,9 @@
|
||||
var product_type_virtual = {Product::PTYPE_VIRTUAL|intval};
|
||||
var product_type_simple = {Product::PTYPE_SIMPLE|intval};
|
||||
|
||||
var with_room_type = {Product::SERVICE_PRODUCT_WITH_ROOMTYPE|intval};
|
||||
var without_room_type = {Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE|intval};
|
||||
var SERVICE_PRODUCT_WITH_ROOMTYPE = {Product::SERVICE_PRODUCT_WITH_ROOMTYPE|intval};
|
||||
var SERVICE_PRODUCT_STANDALONE = {Product::SERVICE_PRODUCT_STANDALONE|intval};
|
||||
var SERVICE_PRODUCT_lINKED_WITH_HOTEL = {Product::SERVICE_PRODUCT_lINKED_WITH_HOTEL|intval};
|
||||
|
||||
var price_addition_type_with_room = {Product::PRICE_ADDITION_TYPE_WITH_ROOM|intval};
|
||||
var price_addition_type_independent = {Product::PRICE_ADDITION_TYPE_INDEPENDENT|intval};
|
||||
|
||||
@@ -232,20 +232,47 @@
|
||||
var product_name_redirected = '{$product_name_redirected|escape:'html':'UTF-8'}';
|
||||
</script>
|
||||
</div>
|
||||
<div class="form-group" id="associated_hotel_rooms_tree" {if $product->service_product_type == Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE}style="display:none;"{/if}>
|
||||
<div class="form-group" id="global_product_type_container">
|
||||
<label class="control-label col-lg-3" for="service_product_type">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select whether this product will be sold with room type or as an standalone product'}">
|
||||
{l s='Product selling preference'}
|
||||
<span>
|
||||
</label>
|
||||
<div class="col-lg-4">
|
||||
<select name="service_product_type" id="service_product_type">
|
||||
<option value="{Product::SERVICE_PRODUCT_WITH_ROOMTYPE}" {if $product->service_product_type == Product::SERVICE_PRODUCT_WITH_ROOMTYPE}selected="selected"{/if} >{l s='sell with room type'}</option>
|
||||
<option value="{Product::SERVICE_PRODUCT_STANDALONE}" {if $product->service_product_type == Product::SERVICE_PRODUCT_STANDALONE}selected="selected"{/if} >{l s='Sell as standalone product'}</option>
|
||||
<option value="{Product::SERVICE_PRODUCT_lINKED_WITH_HOTEL}" {if $product->service_product_type == Product::SERVICE_PRODUCT_lINKED_WITH_HOTEL}selected="selected"{/if} >{l s='Sell as independert product linked with hotel'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="associated_hotel_rooms_tree" {if $product->service_product_type != Product::SERVICE_PRODUCT_WITH_ROOMTYPE && $product->service_product_type != 0}style="display:none;"{/if}>
|
||||
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}</span></div>
|
||||
<label class="control-label col-lg-2" for="hotel_block">
|
||||
<label class="control-label col-lg-2" for="hotel_room_block">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select room type and hotels for which this service will be available.'}">
|
||||
{l s='Associated Hotels and Room Types'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div id="hotel_room_block">
|
||||
{$hotel_room_tree}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="associated_hotel_tree" {if $product->service_product_type != Product::SERVICE_PRODUCT_lINKED_WITH_HOTEL}style="display:none;"{/if}>
|
||||
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}</span></div>
|
||||
<label class="control-label col-lg-2" for="hotel_block">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select hotels for which this service will be available.'}">
|
||||
{l s='Associated Hotels'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div id="hotel_block">
|
||||
{$hotel_tree}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="auto_add_to_cart_container">
|
||||
<div class="form-group" id="auto_add_to_cart_container" {if $product->service_product_type != Product::SERVICE_PRODUCT_WITH_ROOMTYPE && $product->service_product_type != 0}style="display:none;"{/if}>
|
||||
<label class="control-label col-lg-3" for="">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='When enabled, this service will be added in cart for each associated Room type or Hotel when they are added in cart. Also auto added services will not be visible to customers.'}">
|
||||
{l s='Auto add to cart this product'}
|
||||
@@ -294,27 +321,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* <div class="form-group" id="global_product_type_container">
|
||||
<label class="control-label col-lg-3" for="service_product_type">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select whether this product will be sold with room type or as an independent product'}">
|
||||
{l s='Product selling preference'}
|
||||
<span>
|
||||
</label>
|
||||
<div class="col-lg-4">
|
||||
<select name="service_product_type" id="service_product_type">
|
||||
<option value="{Product::SERVICE_PRODUCT_WITH_ROOMTYPE}" {if $product->service_product_type == Product::SERVICE_PRODUCT_WITH_ROOMTYPE}selected="selected"{/if} >{l s='sell with room type'}</option>
|
||||
<option value="{Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE}" {if $product->service_product_type == Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE}selected="selected"{/if} >{l s='Sell as independent product'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> *}
|
||||
{* <div class="form-group" id="independent_product_info" {if $product->service_product_type != Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE}style="display:none"{/if}>
|
||||
<div class="col-lg-6 col-lg-offset-3">
|
||||
<div class="alert alert-info">
|
||||
{l s='Independent products can only be bought from backoffice.'}
|
||||
</div>
|
||||
</div>
|
||||
</div> *}
|
||||
<div class="form-group" id="show_at_front_container" {if $product->auto_add_to_cart}style="display:none;"{/if}>
|
||||
<label class="control-label col-lg-3" for="">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Enable if you want this product to be visible at front office of your website.'}">
|
||||
|
||||
@@ -0,0 +1,301 @@
|
||||
{*
|
||||
* 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 isset($product->id)}
|
||||
<div id="product-quantities" class="panel product-tab">
|
||||
<input type="hidden" name="submitted_tabs[]" value="Quantities" />
|
||||
<h3>{l s='Available quantities for sale'}</h3>
|
||||
{if !$ps_stock_management}
|
||||
<div class="alert alert-info">{l s='The stock management is disabled'}</div>
|
||||
{else}
|
||||
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"}
|
||||
{* <div class="alert alert-info">
|
||||
{l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}<br/>
|
||||
{l s='You can choose whether or not to use the advanced stock management system for this product.'}<br/>
|
||||
{l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}<br/>
|
||||
{l s='In this case, quantities correspond to the real-stock quantities in the warehouses connected with the current shop, or current group of shops.'}<br/>
|
||||
{l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}<br/>
|
||||
{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}
|
||||
</div> *}
|
||||
|
||||
{if $show_quantities == true}
|
||||
<div class="form-group" {if $product->is_virtual}style="display:none;"{/if} class="row stockForVirtualProduct">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<p class="checkbox">
|
||||
<label for="advanced_stock_management">
|
||||
<input type="checkbox" id="advanced_stock_management" name="advanced_stock_management" class="advanced_stock_management"
|
||||
{if $product->advanced_stock_management == 1 && $stock_management_active == 1}
|
||||
value="1" checked="checked"
|
||||
{else}
|
||||
value="0"
|
||||
{/if}
|
||||
{if $stock_management_active == 0}
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
{l s='I want to use the advanced stock management system for this product.'}
|
||||
</label>
|
||||
</p>
|
||||
{if $stock_management_active == 0 && !$product->cache_is_pack}
|
||||
<p class="help-block"><i class="icon-warning-sign"></i> {l s='This requires you to enable advanced stock management.'}</p>
|
||||
{elseif $product->cache_is_pack}
|
||||
<p class="help-block">{l s='When enabling advanced stock management for a pack, please make sure it is also enabled for its product(s) – if you choose to decrement product quantities.'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div {if $product->is_virtual}style="display:none;"{/if} class="form-group stockForVirtualProduct">
|
||||
<label class="control-label col-lg-3" for="depends_on_stock_1">{l s='Available quantities'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="radio">
|
||||
<label for="depends_on_stock_1">
|
||||
<input type="radio" id="depends_on_stock_1" name="depends_on_stock" class="depends_on_stock" value="1"
|
||||
{if $product->depends_on_stock == 1 && $stock_management_active == 1}
|
||||
checked="checked"
|
||||
{/if}
|
||||
{if $stock_management_active == 0 || $product->advanced_stock_management == 0}
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
{l s='The available quantities for the current product and its combinations are based on the stock in your warehouse (using the advanced stock management system). '}
|
||||
{if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack} - {l s='This requires you to enable advanced stock management globally or for this product.'}
|
||||
{/if}
|
||||
</label>
|
||||
</p>
|
||||
{if $product->cache_is_pack}
|
||||
<p class="help-block">
|
||||
{l s='You cannot use advanced stock management for this pack if'}<br />
|
||||
{l s='- advanced stock management is not enabled for these products'}<br />
|
||||
{l s='- you have chosen to decrement products quantities.'}
|
||||
</p>
|
||||
{/if}
|
||||
<p class="radio">
|
||||
<label for="depends_on_stock_0" for="depends_on_stock_0">
|
||||
<input type="radio" id="depends_on_stock_0" name="depends_on_stock" class="depends_on_stock" value="0"
|
||||
{if $product->depends_on_stock == 0 || $stock_management_active == 0}
|
||||
checked="checked"
|
||||
{/if}
|
||||
/>
|
||||
{l s='I want to specify available quantities manually.'}
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" {if !$product->cache_is_pack}style="display:none"{/if}>
|
||||
<label class="control-label col-lg-3">{l s='Pack quantities'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="radio">
|
||||
<label id="label_pack_stock_1" for="pack_stock_type_1">
|
||||
<input type="radio" class="pack_stock_type" value="0" name="pack_stock_type" id="pack_stock_type_1" {if isset($product->pack_stock_type) && $product->pack_stock_type == 0} checked="checked" {/if}/>
|
||||
{l s='Decrement pack only.'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="radio">
|
||||
<label id="label_pack_stock_2" for="pack_stock_type_2">
|
||||
<input type="radio" class="pack_stock_type" value="1" name="pack_stock_type" id="pack_stock_type_2" {if isset($product->pack_stock_type) && $product->pack_stock_type == 1} checked="checked" {/if}/>
|
||||
{l s='Decrement products in pack only.'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="radio">
|
||||
<label id="label_pack_stock_3" for="pack_stock_type_3">
|
||||
<input type="radio" class="pack_stock_type" value="2" name="pack_stock_type" id="pack_stock_type_3" {if isset($product->pack_stock_type) && $product->pack_stock_type == 2} checked="checked" {/if}/>
|
||||
{l s='Decrement both.'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="radio">
|
||||
<label id="label_pack_stock_4" for="pack_stock_type_4">
|
||||
<input type="radio" class="pack_stock_type" value="3" name="pack_stock_type" id="pack_stock_type_4" {if !isset($product->pack_stock_type) || $product->pack_stock_type == 3} checked="checked" {/if}/>
|
||||
{l s='Default'}:
|
||||
{if $pack_stock_type == 0}
|
||||
{l s='Decrement pack only.'}
|
||||
{elseif $pack_stock_type == 1}
|
||||
{l s='Decrement products in pack only.'}
|
||||
{else}
|
||||
{l s='Decrement both.'}
|
||||
{/if}
|
||||
<a class="confirm_leave" href="index.php?tab=AdminPPreferences&token={$token_preferences}">
|
||||
{l s='as set in the Products Preferences page'}
|
||||
</a>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{if isset($pack_quantity)}
|
||||
<div class="alert alert-info">
|
||||
<p>{l s='When a product has combinations, quantities will be based on the default combination.'}</p>
|
||||
<p>{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}</p>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="title_box">{l s='Quantity'}</span></th>
|
||||
<th><span class="title_box">{l s='Designation'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$attributes item=attribute}
|
||||
<tr{if isset($attribute['default_on']) && $attribute['default_on']} class="highlighted"{/if}>
|
||||
<td class="available_quantity" id="qty_{$attribute['id_product_attribute']}">
|
||||
<span>{$available_quantity[$attribute['id_product_attribute']]}</span>
|
||||
<input type="text" name="qty_{$attribute['id_product_attribute']}" class="fixed-width-sm" value="{$available_quantity[$attribute['id_product_attribute']]|htmlentities}"/>
|
||||
</td>
|
||||
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="when_out_of_stock" class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='When out of stock'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="radio">
|
||||
<label id="label_out_of_stock_1" for="out_of_stock_1">
|
||||
<input type="radio" id="out_of_stock_1" name="out_of_stock" checked="checked" value="0" class="out_of_stock" {if $product->out_of_stock == 0} checked="checked" {/if}>
|
||||
{l s='Deny orders'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="radio">
|
||||
<label id="label_out_of_stock_2" for="out_of_stock_2">
|
||||
<input type="radio" id="out_of_stock_2" name="out_of_stock" value="1" class="out_of_stock" {if $product->out_of_stock == 1} checked="checked" {/if}>
|
||||
{l s='Allow orders'}
|
||||
</label>
|
||||
</p>
|
||||
<p class="radio">
|
||||
<label id="label_out_of_stock_3" for="out_of_stock_3">
|
||||
<input type="radio" id="out_of_stock_3" name="out_of_stock" value="2" class="out_of_stock" {if $product->out_of_stock == 2} checked="checked" {/if}>
|
||||
{l s='Default'}:
|
||||
{if $order_out_of_stock == 1}
|
||||
{l s='Allow orders'}
|
||||
{else}
|
||||
{l s='Deny orders'}
|
||||
{/if}
|
||||
<a class="confirm_leave" href="index.php?tab=AdminPPreferences&token={$token_preferences}">
|
||||
{l s='as set in the Products Preferences page'}
|
||||
</a>
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{else}
|
||||
<div class="alert alert-warning">
|
||||
<p>{l s='It is not possible to manage quantities when:'}</p>
|
||||
<ul>
|
||||
<li>{l s='You are currently managing all of your shops.'}</li>
|
||||
<li>{l s='You are currently managing a group of shops where quantities are not shared between every shop in this group.'}</li>
|
||||
<li>{l s='You are currently managing a shop that is in a group where quantities are shared between every shop in this group.'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="panel-footer">
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel'}</a>
|
||||
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i></i> {l s='Save'}</button>
|
||||
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save and stay'}</button>
|
||||
</div>
|
||||
</div>
|
||||
{* <div class="panel">
|
||||
<h3>{l s='Availability settings'}</h3>
|
||||
|
||||
{if !$has_attribute}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="minimal_quantity" type="default"}</span></div>
|
||||
<label class="control-label col-lg-2" for="minimal_quantity">
|
||||
{l s='Minimum quantity'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" id="minimal_quantity" name="minimal_quantity" class="form-control fixed-width-sm" maxlength="6" value="{$product->minimal_quantity|default:1}" />
|
||||
<p class="help-block">{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $ps_stock_management}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}</span></div>
|
||||
<label class="control-label col-lg-2" for="available_now_{$default_language}">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Forbidden characters:'} <>;=#{}">
|
||||
{l s='Displayed text when in-stock'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_value=$product->available_now
|
||||
input_name='available_now'}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}</span></div>
|
||||
<label class="control-label col-lg-2" for="available_later_{$default_language}">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='If empty, the message "in stock" will be displayed.'} {l s='Forbidden characters:'} <>;=#{}">
|
||||
{l s='Displayed text when backordering is allowed'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
{include file="controllers/products/input_text_lang.tpl"
|
||||
languages=$languages
|
||||
input_value=$product->available_later
|
||||
input_name='available_later'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if !$countAttributes}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="available_date" type="default"}</span></div>
|
||||
<label class="control-label col-lg-2" for="available_date">
|
||||
{l s='Availability date:'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group fixed-width-md">
|
||||
<input id="available_date" name="available_date" value="{$product->available_date}" class="datepicker" type="text" />
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-calendar-empty"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<p class="help-block">{l s='The next date of availability for this product when it is out of stock.'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="panel-footer">
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel'}</a>
|
||||
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save'}</button>
|
||||
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> {l s='Save and stay'}</button>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var quantities_ajax_success = '{l s='Data saved' js=1}';
|
||||
var quantities_ajax_waiting = '{l s='Saving data...' js=1}';
|
||||
</script>
|
||||
</div> *}
|
||||
<script type="text/javascript">
|
||||
if (tabs_manager.allow_hide_other_languages)
|
||||
hideOtherLanguage({$default_form_language});
|
||||
</script>
|
||||
{/if}
|
||||
@@ -154,7 +154,7 @@
|
||||
{/foreach}
|
||||
</tbody>
|
||||
{/if}
|
||||
{if isset($cart_normal_data) && $cart_normal_data}
|
||||
{if isset($cart_hotel_product_data) && $cart_hotel_product_data}
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="title_box">{l s='Image'}</th>
|
||||
@@ -167,13 +167,20 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $cart_normal_data as $product}
|
||||
<tr>
|
||||
{foreach $cart_hotel_product_data as $product}
|
||||
<tr data-id-product="{$product.id_product}" data-id_hotel_service_product_cart_detail="{$product.id_hotel_service_product_cart_detail}" >
|
||||
<td><img src="{$product['cover_img']|escape:'html':'UTF-8'}" class="img-responsive" /></td>
|
||||
<td><p>{$product['name']|escape:'html':'UTF-8'}</p></td>
|
||||
<td><p>{$product['name']|escape:'html':'UTF-8'}{if $product.option_name} : {$product.option_name|escape:'html':'UTF-8'}{/if}</p></td>
|
||||
<td colspan="2">{$product['hotel_name']}</td>
|
||||
<td colspan="2">{displayPrice price=$product['unit_price_tax_incl']}</td>
|
||||
<td>{$product['quantity']|escape:'htmlall':'UTF-8'}</td>
|
||||
<td colspan="2">{displayPrice price=$product['unit_price_tax_excl']}</td>
|
||||
<td>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<input type="number" value="{$product['quantity']}" class="product_quantity form-control" min="1" {if $product.max_quantity > 0}max="{$product.max_quantity}"{/if}>
|
||||
<input type="hidden" value="{$product['quantity']}" class="product_quantity_hidden form-control">
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>{displayPrice price=$product['total_price_tax_incl']}</td>
|
||||
<td>
|
||||
<button class="delete_service_product btn btn-danger" data-id-hotel="{$product['id_hotel']|escape:'htmlall':'UTF-8'}" data-id_product={$product['id_product']|escape:'html':'UTF-8'} data-id_cart = {$cart->id|escape:'html':'UTF-8'}>
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
{*
|
||||
* 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 !$hotel_service_products}style="display:none"{/if}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><span class="title_box">{l s='Image'}</th>
|
||||
<th class="text-center"><span class="title_box">{l s='Name'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Quantity'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Price (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($refundReqProducts) && $refundReqProducts}
|
||||
<th class="text-center"><span class="title_box">{l s='Refund State'}</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-right"><span class="title_box">{l s='Edit Order'}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $hotel_service_products}
|
||||
{foreach from=$hotel_service_products item=product}
|
||||
{* Include product line partial *}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{assign var=product_price value=($product['unit_price_tax_excl'])}
|
||||
{else}
|
||||
{assign var=product_price value=$product['unit_price_tax_incl']}
|
||||
{/if}
|
||||
<tr class="product-line-row" data-id_product="{$product.id_product}" data-id_order_detail="{$product.id_order_detail}" data-id_room_type_service_product_order_detail="{$product.id_room_type_service_product_order_detail}" data-id_hotel="{$product.id_hotel}">
|
||||
<td class="text-center">
|
||||
{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{hook h='displayOrderDetailProductLink' id_product=$product.id_product}">
|
||||
<span class="productName">{$product['name']}{if isset($product['option_name']) && $product['option_name']} : {$product['option_name']}{/if}</span><br />
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="">{(int)$product['quantity']}</span>
|
||||
</td>
|
||||
<td class="text-center unit_price_tax_excl">
|
||||
<p>{displayPrice price=$product.total_price_tax_excl currency=$currency->id}</p>
|
||||
<p class="help-block">{l s='Unit price'} : {displayPrice price=$product.unit_price_tax_excl currency=$currency->id}</p>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span>{displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span>{displayPrice price=$product.total_price_tax_incl currency=$currency->id}</span>
|
||||
</td>
|
||||
{if (isset($refundReqProducts) && $refundReqProducts)}
|
||||
<td class="text-center">
|
||||
{if $product.id_room_type_service_product_order_detail|in_array:$refundReqProducts}
|
||||
{if $product.is_cancelled}
|
||||
<span class="badge badge-danger">{l s='Cancelled'}</span>
|
||||
{elseif isset($product.refund_info) && (!$product.refund_info.refunded || $product.refund_info.id_customization)}
|
||||
<span class="badge" style="background-color:{$product.refund_info.color|escape:'html':'UTF-8'}">{$product.refund_info.name|escape:'html':'UTF-8'}</span>
|
||||
{else}
|
||||
<span>--</span>
|
||||
{/if}
|
||||
{else}
|
||||
<span>--</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $product.is_refunded && isset($product.refund_info) && $product.refund_info}
|
||||
{convertPriceWithCurrency price=$product.refund_info.refunded_amount currency=$currency->id}
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<td class="room_invoice" style="display: none;">
|
||||
{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}*}>
|
||||
#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td class="product_action text-right">
|
||||
{* edit/delete controls *}
|
||||
<div class="btn-group">
|
||||
{* <button type="button" class="btn btn-default delete_product_line">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</button> *}
|
||||
<button type="button" class="btn btn-default edit_product_change_link" data-product_line_data="{$product|json_encode|escape}">
|
||||
<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}
|
||||
{else}
|
||||
<tr>
|
||||
<td>{l s='No Data Found.'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* Include product line partial *}
|
||||
{* {include file='controllers/orders/_new_service_product.tpl'} *}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,139 +0,0 @@
|
||||
{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="product-line-row" data-id_product="{$product.id_product}" data-id_order_detail="{$product.id_order_detail}">
|
||||
{if $refund_allowed}
|
||||
<td class="standard_refund_fields" style="display:none">
|
||||
<input type="checkbox" name="id_htl_booking[]" value="{$product.id|escape:'html':'UTF-8'}" {if isset($refundReqBookings) && ($product.id|in_array:$refundReqBookings)}disabled{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
{* <td class="text-center">
|
||||
{$data.room_num}
|
||||
</td> *}
|
||||
<td class="text-center">
|
||||
{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<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']}</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>
|
||||
{* <div class="row-editing-warning" style="display:none;">
|
||||
<div class="alert alert-warning">
|
||||
<strong>{l s='Editing this product line will remove the reduction and base price.'}</strong>
|
||||
</div>
|
||||
</div> *}
|
||||
</td>
|
||||
<td class="text-center unit_price_tax_excl">
|
||||
<span>{displayPrice price=$product.unit_price_tax_excl currency=$currency->id}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="product_quantity_show{if (int)$product['product_quantity'] - (int)$product['customized_product_quantity'] > 1} badge{/if}">{(int)$product['product_quantity'] - (int)$product['customized_product_quantity']}</span>
|
||||
{if $can_edit}
|
||||
<span class="product_quantity_edit" style="display:none;">
|
||||
<input type="text" name="product_quantity" class="edit_product_quantity" value="{$product['product_quantity']|htmlentities}"/>
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="room_price_show">{displayPrice price=$product_price * ($product['product_quantity'] - $product['customizationQuantityTotal']) currency=$currency->id}</span>
|
||||
{* {if $can_edit}
|
||||
<div class="room_price_edit" style="display:none;">
|
||||
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']}" />
|
||||
<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)}"/>
|
||||
{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)}"/>
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if} *}
|
||||
</td>
|
||||
|
||||
{* {if isset($refundReqBookings) && $refundReqBookings}
|
||||
<td class="text-center">
|
||||
{if isset($data.refund_info) && $data.refund_info}
|
||||
<span class="badge" style="background-color:{$data.refund_info.color|escape:'html':'UTF-8'}">{$data.refund_info.name|escape:'html':'UTF-8'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if isset($data.refund_info) && $data.refund_info}
|
||||
{convertPriceWithCurrency price=$data.refund_info.refunded_amount currency=$currency->id}
|
||||
{/if}
|
||||
</td>
|
||||
{/if} *}
|
||||
|
||||
{* {if $data.booking_type == 1}
|
||||
<td class="text-center">
|
||||
{if isset($data.refund_info) && ($data.refund_info.refunded || $data.refund_info.denied)}
|
||||
<p class="text-center">--</p>
|
||||
{else}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mySwappigModal" data-id_order="{$order->id}" data-room_num='{$data.room_num}' data-date_from='{$data.date_from}' data-date_to='{$data.date_to}' data-id_room='{$data.id_room}' 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_rm_realloc='{$data.avail_rooms_to_realloc|@json_encode}'>
|
||||
{l s='Reallocate Room' mod='hotelreservationsystem'}
|
||||
</button>
|
||||
{/if}
|
||||
</td>
|
||||
{/if} *}
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<td class="room_invoice" style="display: none;">
|
||||
{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}*}>
|
||||
#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td class="product_action text-right">
|
||||
{* edit/delete controls *}
|
||||
<div class="btn-group">
|
||||
{* <button type="button" class="btn btn-default delete_product_line">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</button> *}
|
||||
<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>
|
||||
@@ -1,60 +0,0 @@
|
||||
{*
|
||||
* 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}>
|
||||
<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='Image'}</th>
|
||||
<th class="text-center"><span class="title_box">{l s='Name'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Unit Price (Tax excl.)'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Quantity'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Total Price (Tax incl.)'}</span></th>
|
||||
{* {if isset($refundReqBookings) && $refundReqBookings}
|
||||
<th class="text-center"><span class="title_box">{l s='Refund State'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Refunded amount'}</span></th>
|
||||
{/if} *}
|
||||
{* <th class="text-center"><span class="title_box">{l s='Reallocate Room'}</span></th> *}
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<th class="text-right"><span class="title_box">{l s='Edit Order'}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $order_service_products}
|
||||
{foreach from=$order_service_products item=product}
|
||||
{* Include product line partial *}
|
||||
{include file='controllers/orders/_service_product_line.tpl'}
|
||||
{/foreach}
|
||||
{else}
|
||||
{* <tr>
|
||||
<td>{l s='No Data Found.'}</td>
|
||||
</tr> *}
|
||||
{/if}
|
||||
{* Include product line partial *}
|
||||
{include file='controllers/orders/_new_service_product.tpl'}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,153 @@
|
||||
{*
|
||||
* 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">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><span class="title_box">{l s='Image'}</th>
|
||||
<th class="text-center"><span class="title_box">{l s='Name'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Quantity'}</span></th>
|
||||
<th class="text-center"><span class="title_box">{l s='Price (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($refundReqProducts) && $refundReqProducts}
|
||||
<th class="text-center"><span class="title_box">{l s='Refund State'}</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-right"><span class="title_box">{l s='Edit Order'}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $standalone_service_products}
|
||||
{foreach from=$standalone_service_products item=product}
|
||||
{* Include product line partial *}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{assign var=product_price value=($product['unit_price_tax_excl'])}
|
||||
{else}
|
||||
{assign var=product_price value=$product['unit_price_tax_incl']}
|
||||
{/if}
|
||||
<tr class="product-line-row" data-id_product="{$product.id_product}" data-id_order_detail="{$product.id_order_detail}" data-id_room_type_service_product_order_detail="{$product.id_room_type_service_product_order_detail}">
|
||||
<td class="text-center">
|
||||
{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&id_product={$product['id_product']|intval}&updateproduct&token={getAdminToken tab='AdminProducts'}">
|
||||
<span class="productName">{$product['name']}{if $product['option_name']} : {$product['option_name']}{/if}</span><br />
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="">{(int)$product['quantity']}</span>
|
||||
</td>
|
||||
<td class="text-center unit_price_tax_excl">
|
||||
<p>{displayPrice price=$product.total_price_tax_excl currency=$currency->id}</p>
|
||||
<p class="help-block">{l s='Unit price'} : {displayPrice price=$product.unit_price_tax_excl currency=$currency->id}</p>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span>{displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span>{displayPrice price=$product.total_price_tax_incl currency=$currency->id}</span>
|
||||
</td>
|
||||
{if (isset($refundReqProducts) && $refundReqProducts)}
|
||||
<td class="text-center">
|
||||
{if $product.id_room_type_service_product_order_detail|in_array:$refundReqProducts}
|
||||
{if $product.is_cancelled}
|
||||
<span class="badge badge-danger">{l s='Cancelled'}</span>
|
||||
{elseif isset($product.refund_info) && (!$product.refund_info.refunded || $product.refund_info.id_customization)}
|
||||
<span class="badge" style="background-color:{$product.refund_info.color|escape:'html':'UTF-8'}">{$product.refund_info.name|escape:'html':'UTF-8'}</span>
|
||||
{else}
|
||||
<span>--</span>
|
||||
{/if}
|
||||
{else}
|
||||
<span>--</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $product.is_refunded && isset($product.refund_info) && $product.refund_info}
|
||||
{convertPriceWithCurrency price=$product.refund_info.refunded_amount currency=$currency->id}
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<td class="room_invoice" style="display: none;">
|
||||
{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}*}>
|
||||
#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</td>
|
||||
<td class="product_action text-right">
|
||||
{* edit/delete controls *}
|
||||
<div class="btn-group">
|
||||
{* <button type="button" class="btn btn-default delete_product_line">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete'}
|
||||
</button> *}
|
||||
<button type="button" class="btn btn-default edit_product_change_link" data-product_line_data="{$product|json_encode|escape}">
|
||||
<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}
|
||||
{else}
|
||||
<tr>
|
||||
<td>{l s='No Data Found.'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* Include product line partial *}
|
||||
{* {include file='controllers/orders/_new_service_product.tpl'} *}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -280,6 +280,28 @@
|
||||
};
|
||||
updateProductPrice(params, cart_row);
|
||||
})
|
||||
$(document).on('change', '.product_quantity', function(e) {
|
||||
var cart_row = $(this).closest('tr');
|
||||
var qty = parseInt($(this).val());
|
||||
var qtyhidden= parseInt($(this).siblings('.product_quantity_hidden').val());
|
||||
var qty_to_update = qty - qtyhidden;
|
||||
if ((qty_to_update) > 0) {
|
||||
var opt = 'up';
|
||||
} else {
|
||||
var opt = 'down';
|
||||
}
|
||||
|
||||
var params = {
|
||||
id_product: parseInt($(cart_row).attr('data-id-product')),
|
||||
id_hotel_service_product_cart_detail: parseInt($(cart_row).attr('data-id_hotel_service_product_cart_detail')),
|
||||
qty: qty_to_update,
|
||||
opt: opt,
|
||||
id_cart: id_cart
|
||||
};
|
||||
|
||||
updateQuantity(params, cart_row);
|
||||
$(this).siblings('.product_quantity_hidden').val($(this).val())
|
||||
});
|
||||
$('#order_message').live('change', function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
@@ -697,6 +719,26 @@
|
||||
});
|
||||
}
|
||||
|
||||
function updateQuantity(params, cart_row)
|
||||
{
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
|
||||
async: true,
|
||||
dataType: "JSON",
|
||||
data: {
|
||||
ajax: "1",
|
||||
token: "{getAdminToken tab='AdminCarts'}",
|
||||
tab: "AdminCarts",
|
||||
action: "updateProductQuantity",
|
||||
params: params,
|
||||
},
|
||||
success : function(response) {
|
||||
// updateCartLine(response.curr_booking_info, cart_row);
|
||||
// updateCartSummaryData(response.cart_info);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateCartLine(data, cart_row) {
|
||||
$(cart_row).find('.cart_line_total_rooms_price').html(data.amt_with_qty);
|
||||
|
||||
@@ -88,89 +88,90 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-7">
|
||||
<div class="panel">
|
||||
<div class="panel-heading order_status_heading">
|
||||
<i class="icon-bed"></i> {l s='Rooms Status'}
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 table-responsive" id="room_status_info_wrapper">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Room'}</th>
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Check-In'}</th>
|
||||
<th>{l s='Check-Out'}</th>
|
||||
<th>{l s='Allotment'}</th>
|
||||
<th>{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if isset($htl_booking_order_data) && $htl_booking_order_data}
|
||||
{foreach from=$htl_booking_order_data item=data}
|
||||
<tr>
|
||||
<td>
|
||||
{$data['room_num']}<br>
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&id_product={$data['id_product']}&updateproduct" target="_blank">{$data['room_type_name']|escape:'html':'UTF-8'}</a>
|
||||
</td>
|
||||
<td>
|
||||
{assign var="is_full_date" value=($show_full_date && ($data['date_from']|date_format:'%D' == $data['date_to']|date_format:'%D'))}
|
||||
{dateFormat date=$data['date_from'] full=$is_full_date} - {dateFormat date=$data['date_to'] full=$is_full_date}
|
||||
</td>
|
||||
<td>
|
||||
{if ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']) || ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status'])}
|
||||
<span class="text-danger room_status">{l s='Checked in on'}<br>{dateFormat date=$data['check_in'] full=1}</span>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
|
||||
<span class="text-success room_status">{l s='Checked out on'}<br>{dateFormat date=$data['check_out'] full=1}</span>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $data['booking_type'] == $ALLOTMENT_MANUAL}
|
||||
{l s='Manual'} {if $data['comment'] != ''}<a class="manual_allotment_comment" href="#" data-id_hotel_booking_detail="{$data['id']}"><i class="icon-info-circle"></i></a>{/if}
|
||||
{else}
|
||||
{l s='Auto'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a title="{l s='Upload/Check guest documents'}" class="btn btn-default" href="#" onclick="BookingDocumentsModal.init({$data.id|intval}, this); return false;">
|
||||
<span class="badge badge-info">{if $data.num_checkin_documents > 0}{$data.num_checkin_documents}{else}0{/if}</span> <i class="icon-file-text"></i>
|
||||
</a>
|
||||
|
||||
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded}
|
||||
<span class="badge badge-danger">{if $data.is_cancelled}{l s='Cancelled'}{else}{l s='Refunded'}{/if}</span>
|
||||
{elseif $can_edit}
|
||||
<a class="open_room_status_form btn btn-default" href="#" data-id_hotel_booking_detail="{$data['id']}" data-id_order="{$data['id_order']}" data-id_status="{$data['id_status']}" data-id_room="{$data['id_room']}" data-date_from="{$data['date_from']|date_format:"%Y-%m-%d"}" data-date_to="{$data['date_to']|date_format:"%Y-%m-%d"}" data-check_in_time="{$data['check_in_time']}" data-check_out_time="{$data['check_out_time']}">
|
||||
<i class="icon-pencil"></i> {l s='Edit'}
|
||||
{if isset($htl_booking_order_data) && $htl_booking_order_data}
|
||||
<div class="panel">
|
||||
<div class="panel-heading order_status_heading">
|
||||
<i class="icon-bed"></i> {l s='Rooms Status'}
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 table-responsive" id="room_status_info_wrapper">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Room'}</th>
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Check-In'}</th>
|
||||
<th>{l s='Check-Out'}</th>
|
||||
<th>{l s='Allotment'}</th>
|
||||
<th>{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if isset($htl_booking_order_data) && $htl_booking_order_data}
|
||||
{foreach from=$htl_booking_order_data item=data}
|
||||
<tr>
|
||||
<td>
|
||||
{$data['room_num']}<br>
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&id_product={$data['id_product']}&updateproduct" target="_blank">{$data['room_type_name']|escape:'html':'UTF-8'}</a>
|
||||
</td>
|
||||
<td>
|
||||
{assign var="is_full_date" value=($show_full_date && ($data['date_from']|date_format:'%D' == $data['date_to']|date_format:'%D'))}
|
||||
{dateFormat date=$data['date_from'] full=$is_full_date} - {dateFormat date=$data['date_to'] full=$is_full_date}
|
||||
</td>
|
||||
<td>
|
||||
{if ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']) || ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status'])}
|
||||
<span class="text-danger room_status">{l s='Checked in on'}<br>{dateFormat date=$data['check_in'] full=1}</span>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
|
||||
<span class="text-success room_status">{l s='Checked out on'}<br>{dateFormat date=$data['check_out'] full=1}</span>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $data['booking_type'] == $ALLOTMENT_MANUAL}
|
||||
{l s='Manual'} {if $data['comment'] != ''}<a class="manual_allotment_comment" href="#" data-id_hotel_booking_detail="{$data['id']}"><i class="icon-info-circle"></i></a>{/if}
|
||||
{else}
|
||||
{l s='Auto'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a title="{l s='Upload/Check guest documents'}" class="btn btn-default" href="#" onclick="BookingDocumentsModal.init({$data.id|intval}, this); return false;">
|
||||
<span class="badge badge-info">{if $data.num_checkin_documents > 0}{$data.num_checkin_documents}{else}0{/if}</span> <i class="icon-file-text"></i>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded}
|
||||
<span class="badge badge-danger">{if $data.is_cancelled}{l s='Cancelled'}{else}{l s='Refunded'}{/if}</span>
|
||||
{elseif $can_edit}
|
||||
<a class="open_room_status_form btn btn-default" href="#" data-id_hotel_booking_detail="{$data['id']}" data-id_order="{$data['id_order']}" data-id_status="{$data['id_status']}" data-id_room="{$data['id_room']}" data-date_from="{$data['date_from']|date_format:"%Y-%m-%d"}" data-date_to="{$data['date_to']|date_format:"%Y-%m-%d"}" data-check_in_time="{$data['check_in_time']}" data-check_out_time="{$data['check_out_time']}">
|
||||
<i class="icon-pencil"></i> {l s='Edit'}
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td class="list-empty hidden-print" colspan="6">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No rooms found'}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td class="list-empty hidden-print" colspan="6">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No rooms found'}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-file"></i> {l s='Order'}
|
||||
@@ -785,31 +786,33 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-remove-sign"></i> {l s='Cancellation Policies'}
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
{if is_array($applicable_refund_policies) && count($applicable_refund_policies)}
|
||||
<ul>
|
||||
{foreach from=$applicable_refund_policies item=$applicable_refund_policy}
|
||||
<li class="form-group">
|
||||
<a href="{$link->getAdminLink('AdminOrderRefundRules')|escape:'html':'UTF-8'}&id_refund_rule={$applicable_refund_policy.id_refund_rule}&updatehtl_order_refund_rules" target="_blank">
|
||||
{$applicable_refund_policy.name|escape:'html':'UTF-8'} <i class="icon icon-external-link-square"></i>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<div class="list-empty">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No cancellation policies applicable.'}
|
||||
{if is_array($applicable_refund_policies) && count($applicable_refund_policies)}
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-remove-sign"></i> {l s='Cancellation Policies'}
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
{if is_array($applicable_refund_policies) && count($applicable_refund_policies)}
|
||||
<ul>
|
||||
{foreach from=$applicable_refund_policies item=$applicable_refund_policy}
|
||||
<li class="form-group">
|
||||
<a href="{$link->getAdminLink('AdminOrderRefundRules')|escape:'html':'UTF-8'}&id_refund_rule={$applicable_refund_policy.id_refund_rule}&updatehtl_order_refund_rules" target="_blank">
|
||||
{$applicable_refund_policy.name|escape:'html':'UTF-8'} <i class="icon icon-external-link-square"></i>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<div class="list-empty">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No cancellation policies applicable.'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{hook h="displayAdminOrderRight" id_order=$order->id}
|
||||
</div>
|
||||
</div>
|
||||
@@ -821,26 +824,61 @@
|
||||
<div style="display: none">
|
||||
<input type="hidden" value="{$order->getWarehouseList()|implode}" id="warehouse_list" />
|
||||
</div>
|
||||
<div class="panel" id="refundForm">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-bed"></i> {l s='Rooms Booking Detail'} <span class="badge">{$order_detail_data|@count}</span>
|
||||
{if $can_edit && (!$order->hasBeenDelivered() && $currentState->id != Configuration::get('PS_OS_REFUND') && $currentState->id != Configuration::get('PS_OS_CANCELED'))}
|
||||
<button type="button" id="add_room" class="btn btn-primary pull-right">
|
||||
<i class="icon-plus-sign"></i> {l s='Add Rooms'}
|
||||
</button>
|
||||
{if $hotel_booking}
|
||||
<div class="panel" id="refundForm">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-bed"></i> {l s='Rooms Booking Detail'} <span class="badge">{$order_detail_data|@count}</span>
|
||||
{if $can_edit && (!$order->hasBeenDelivered() && $currentState->id != Configuration::get('PS_OS_REFUND') && $currentState->id != Configuration::get('PS_OS_CANCELED'))}
|
||||
<button type="button" id="add_room" class="btn btn-primary pull-right">
|
||||
<i class="icon-plus-sign"></i> {l s='Add Rooms'}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
{* by webkul this code is added for showing rooms information on the order detail page *}
|
||||
{include file='controllers/orders/_rooms_informaion_table.tpl'}
|
||||
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
<input type="hidden" name="TaxMethod" value="0">
|
||||
{else}
|
||||
<input type="hidden" name="TaxMethod" value="1">
|
||||
{/if}
|
||||
</div>
|
||||
{* by webkul this code is added for showing rooms information on the order detail page *}
|
||||
{include file='controllers/orders/_rooms_informaion_table.tpl'}
|
||||
<br>
|
||||
{include file='controllers/orders/_service_products_table.tpl'}
|
||||
<div class="panel" id="refundForm">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-bed"></i> {l s='Product Detail'} <span class="badge">{$hotel_service_products|count}</span>
|
||||
{if $can_edit && (!$order->hasBeenDelivered() && $currentState->id != Configuration::get('PS_OS_REFUND') && $currentState->id != Configuration::get('PS_OS_CANCELED'))}
|
||||
<button type="button" id="add_product" class="btn btn-primary pull-right">
|
||||
<i class="icon-plus-sign"></i> {l s='Add Product'}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
{include file='controllers/orders/_hotel_service_products_table.tpl'}
|
||||
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
<input type="hidden" name="TaxMethod" value="0">
|
||||
{else}
|
||||
<input type="hidden" name="TaxMethod" value="1">
|
||||
{/if}
|
||||
</div>
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
<input type="hidden" name="TaxMethod" value="0">
|
||||
{else}
|
||||
<input type="hidden" name="TaxMethod" value="1">
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
<div class="panel" id="refundForm">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-bed"></i> {l s='Booking Detail'} <span class="badge">{$standalone_service_products|count}</span>
|
||||
{if $can_edit && (!$order->hasBeenDelivered() && $currentState->id != Configuration::get('PS_OS_REFUND') && $currentState->id != Configuration::get('PS_OS_CANCELED'))}
|
||||
<button type="button" id="add_product" class="btn btn-primary pull-right">
|
||||
<i class="icon-plus-sign"></i> {l s='Add Product'}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
{include file='controllers/orders/_standalone_service_products_table.tpl'}
|
||||
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
<input type="hidden" name="TaxMethod" value="0">
|
||||
{else}
|
||||
<input type="hidden" name="TaxMethod" value="1">
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -872,8 +910,8 @@
|
||||
{assign var=total_rooms_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)}
|
||||
|
||||
{* Get total extra services including convenience fees prices *}
|
||||
{assign var=total_services_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false)}
|
||||
{assign var=total_services_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false)}
|
||||
{assign var=total_products_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_lINKED_WITH_HOTEL) + $order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_STANDALONE))}
|
||||
{assign var=total_products_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_lINKED_WITH_HOTEL) + $order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_STANDALONE))}
|
||||
|
||||
{* Get total of extra services and extra demands prices(excluding convenience fee) *}
|
||||
{assign var=total_room_services_and_demands_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTE)}
|
||||
@@ -883,8 +921,8 @@
|
||||
{assign var=total_convenience_fee_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)}
|
||||
{assign var=total_convenience_fee_tax_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)}
|
||||
|
||||
{assign var=order_total_price_tax_excl value=($total_rooms_price_tax_excl + $total_services_price_tax_excl + $totalDemandsPriceTE)}
|
||||
{assign var=order_total_price_tax_incl value=($total_rooms_price_tax_incl + $total_services_price_tax_incl + $totalDemandsPriceTI)}
|
||||
{assign var=order_total_price_tax_excl value=($total_rooms_price_tax_excl + $total_room_services_and_demands_tax_excl + $total_convenience_fee_tax_excl)}
|
||||
{assign var=order_total_price_tax_incl value=($total_rooms_price_tax_incl + $total_room_services_and_demands_tax_incl + $total_convenience_fee_tax_incl)}
|
||||
|
||||
{if $total_rooms_price_tax_excl}
|
||||
<tr id="total_products">
|
||||
@@ -895,6 +933,15 @@
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $total_products_price_tax_excl > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Total products (Tax excl.)'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=$total_products_price_tax_excl currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($total_room_services_and_demands_tax_excl) && $total_room_services_and_demands_tax_excl > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Total Extra services (Tax excl.)'}</td>
|
||||
@@ -968,6 +1015,15 @@
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if ($total_products_price_tax_incl - $total_products_price_tax_excl) > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-left">{l s='Products Tax'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=($total_products_price_tax_incl - $total_products_price_tax_excl) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($total_convenience_fee_tax_excl) && $total_convenience_fee_tax_excl > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-left">{l s='Convenience Fee Tax'}</td>
|
||||
@@ -1012,7 +1068,7 @@
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
|
||||
{if isset($refundReqBookings) && $refundReqBookings}
|
||||
{if (isset($refundReqBookings) && $refundReqBookings) || (isset($refundReqProducts) && $refundReqProducts)}
|
||||
<tr id="total_order">
|
||||
<td class="text-right"><strong>* {l s='Refunded Amount'}</strong></td>
|
||||
<td class="amount text-right nowrap">
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
{*
|
||||
* 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='Product:'}</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 product'}" />
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="add_product_fields" style="display:none;">
|
||||
{hook h='displayAdminOrderAddRoomFormFieldsBefore'}
|
||||
<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="">
|
||||
<div class="row">
|
||||
<div class="productQuantity form-group col-sm-6">
|
||||
<label class="control-label">{l s='Quantity'}</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 class="productOptions form-group col-sm-6" style="display: none;">
|
||||
<label class="control-label">{l s='Variant'}</label>
|
||||
<select name="add_product[product_option]" id="add_product_product_option">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
@@ -18,7 +18,7 @@
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="new_product">
|
||||
<div id="new_room">
|
||||
<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>
|
||||
@@ -142,7 +142,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<button type="button" class="btn btn-default" id="submitAddProduct" disabled="disabled" style="display:none;"></button>
|
||||
<button type="button" class="btn btn-default" id="submitAddRoom" disabled="disabled" style="display:none;"></button>
|
||||
</div>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
|
||||
@@ -18,39 +18,71 @@
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
{if $bookingOrderInfo|count > 0}
|
||||
{if $bookingOrderInfo|count > 0 || $serviceProducts|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}
|
||||
{if $bookingOrderInfo|count}
|
||||
<h3>{l s='Rooms'}</h3>
|
||||
<div class="form-group">
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="customer_cart_details">
|
||||
<thead>
|
||||
<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>
|
||||
{assign var="is_full_date" value=($show_full_date && ($bookingInfo['date_from']|date_format:'%D' == $bookingInfo['date_to']|date_format:'%D'))}
|
||||
<td>{dateFormat date=$bookingInfo.date_from full=$is_full_date} - {dateFormat date=$bookingInfo.date_to full=$is_full_date}</span></td>
|
||||
<td>{convertPriceWithCurrency price=$bookingInfo.total_price_tax_incl currency=$currency->id}</td>
|
||||
<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>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
{assign var="is_full_date" value=($show_full_date && ($bookingInfo['date_from']|date_format:'%D' == $bookingInfo['date_to']|date_format:'%D'))}
|
||||
<td>{dateFormat date=$bookingInfo.date_from full=$is_full_date} - {dateFormat date=$bookingInfo.date_to full=$is_full_date}</span></td>
|
||||
<td>{convertPriceWithCurrency price=$bookingInfo.total_price_tax_incl currency=$currency->id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $serviceProducts|count}
|
||||
<h3>{l s='Products'}</h3>
|
||||
<div class="form-group">
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="customer_cart_product_details">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Quantity'}</th>
|
||||
<th>{l s='Total Price (Tax incl.)'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$serviceProducts item=product}
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="id_room_type_service_product_order_detail[]" value="{$product.id_room_type_service_product_order_detail|escape:'html':'UTF-8'}"/>
|
||||
</td>
|
||||
<td>{$product.name|escape:'html':'UTF-8'}{if $product.option_name} : {$product.option_name|escape:'html':'UTF-8'}{/if}</td>
|
||||
<td>{$product.quantity|escape:'html':'UTF-8'}</td>
|
||||
<td>{convertPriceWithCurrency price=$product.total_price_tax_incl currency=$currency->id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{l s='Reason to Cancel'}</label>
|
||||
|
||||
@@ -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">
|
||||
<div id="edit_product">
|
||||
<input type="hidden" id="edit_product_product_id" name="edit_product[product_id]" value="{$RoomTypeServiceProductOrderDetail->id_product}" />
|
||||
<input type="hidden" id="edit_product_id_room_type_service_product_order_detail" name="edit_product[id_room_type_service_product_order_detail]" value="{$RoomTypeServiceProductOrderDetail->id}" />
|
||||
<input type="hidden" id="edit_product_id_order" name="id_order" value="{$order->id}" />
|
||||
{* <div class="form-group">
|
||||
<label class="control-label">{l s='Product:'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="edit_product_product_name" class="form-control" value="" placeholder="{l s='Enter the name of the product'}" />
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div> *}
|
||||
<div class="edit_product_fields">
|
||||
{hook h='displayAdminOrderEditProductFieldsBefore'}
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Unit 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="edit_product[product_price_tax_excl]" id="edit_product_product_price_tax_excl" value="{$RoomTypeServiceProductOrderDetail->unit_price_tax_excl}"/>
|
||||
{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='Unit 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="edit_product[product_price_tax_incl]" id="edit_product_product_price_tax_incl" value="{$RoomTypeServiceProductOrderDetail->unit_price_tax_incl}"/>
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
</div>
|
||||
</div> *}
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<div class="row">
|
||||
<div class="productQuantity form-group col-sm-6">
|
||||
<label class="control-label">{l s='Quantity'}</label>
|
||||
<input type="number" class="form-control" name="edit_product[product_quantity]" id="edit_product_product_quantity" value="{$RoomTypeServiceProductOrderDetail->quantity}" min="1"/>
|
||||
</div>
|
||||
|
||||
<div class="productOptions form-group col-sm-6" style="display: none;">
|
||||
<label class="control-label">{l s='Variant'}</label>
|
||||
<select name="edit_product[product_option]" id="edit_product_product_option">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
Reference in New Issue
Block a user