Merge branch 'develop' into gli-3071
@@ -0,0 +1,68 @@
|
||||
{**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-list-ul"></i>
|
||||
{l s='Guest Registration Card Information'}
|
||||
</div>
|
||||
|
||||
<form id="grcCardInfoForm" method="post" action="{$guest_reg_card_form_action|escape:'html':'UTF-8'}" class="form-horizontal">
|
||||
<input type="hidden" name="submitGrcCardInfo" value="1" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Select sections and fields to display on the Guest Registration Card PDF.'}">{l s='Select fields'}</span>
|
||||
</label>
|
||||
<div class="col-xs-7">
|
||||
{$guest_reg_card_info_tree}
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<a href="#" class="btn btn-default" data-toggle="modal" data-target="#guestRegPreviewModal">
|
||||
<i class="icon-eye"></i> {l s='Preview'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
<button type="submit" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i> {l s='Save'}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="guestRegPreviewModal" tabindex="-1" role="dialog" aria-labelledby="guestRegPreviewModalLabel">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="guestRegPreviewModalLabel">{$guest_reg_card_preview_title|escape:'html':'UTF-8'}</h4>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<img src="{$guest_reg_card_preview_img_url|escape:'html':'UTF-8'}" alt="{$guest_reg_card_preview_title|escape:'html':'UTF-8'}" class="img-responsive" style="max-width:100%;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,10 +2,10 @@
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* https://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 support@qloapps.com so we can send you a copy immediately.
|
||||
@@ -18,7 +18,7 @@
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License 3.0
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
@@ -29,4 +29,4 @@ header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
exit;
|
||||
@@ -124,8 +124,15 @@
|
||||
{/if}
|
||||
<td id="cart_detail_data_unit_price_{$data.id|escape:'html':'UTF-8'}">
|
||||
{assign var=shown_room_type_price value=$data.feature_price_tax_excl}
|
||||
{if isset($can_edit_booking_carts)}
|
||||
{assign var=can_edit_booking_cart_price value=$can_edit_booking_carts}
|
||||
{elseif isset($can_edit)}
|
||||
{assign var=can_edit_booking_cart_price value=$can_edit}
|
||||
{else}
|
||||
{assign var=can_edit_booking_cart_price value=0}
|
||||
{/if}
|
||||
<div class="input-group">
|
||||
<input type="text" class="room_unit_price" value="{Tools::ps_round($shown_room_type_price, $smarty.const._PS_PRICE_DISPLAY_PRECISION_)|escape:'html':'UTF-8'}">
|
||||
<input type="text" class="room_unit_price" value="{Tools::ps_round($shown_room_type_price, $smarty.const._PS_PRICE_DISPLAY_PRECISION_)|escape:'html':'UTF-8'}"{if !$can_edit_booking_cart_price} readonly="readonly"{/if}>
|
||||
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -164,6 +164,11 @@
|
||||
<span class="badge badge-info">{if $data.num_checkin_documents > 0}{$data.num_checkin_documents}{else}0{/if}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="{l s='Guest Registration Card'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateGuestRegistrationFormPDF&id_hotel_booking_detail={$data['id']}" target="_blank">
|
||||
<i class="icon-download"></i> {l s='GRC'}
|
||||
</a>
|
||||
</li>
|
||||
<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-id_order="{$data['id_order']}" 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}' data-allotment_type='{$data.booking_type}' data-allotment_type_label='{if $data.booking_type == $ALLOTMENT_MANUAL}{l s='Manual'}{else}{l s='Auto'}{/if}' data-comment='{$data.comment}'>
|
||||
<i class="icon-refresh"></i>
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
var id_cart = {$cart->id|intval};
|
||||
{/if}
|
||||
var id_customer = 0;
|
||||
var can_edit_booking_carts = {if isset($can_edit_booking_carts) && $can_edit_booking_carts}true{else}false{/if};
|
||||
var can_add_addresses = {if isset($can_add_addresses) && $can_add_addresses}true{else}false{/if};
|
||||
var admin_order_tab_link = "{$link->getAdminLink('AdminOrders')|addslashes}";
|
||||
var changed_shipping_price = false;
|
||||
var shipping_price_selected_carrier = '';
|
||||
@@ -620,6 +622,10 @@
|
||||
$(booking_occupancy_wrapper).siblings('.booking_guest_occupancy').find('span').text(guestButtonVal);
|
||||
}
|
||||
{/literal}
|
||||
|
||||
if (!can_edit_booking_carts || !can_add_addresses) {
|
||||
$('#address_part').hide();
|
||||
}
|
||||
});
|
||||
|
||||
function resetBind()
|
||||
@@ -953,7 +959,9 @@
|
||||
{if isset($cart->id) && $cart->id}
|
||||
id_cart = "{$cart->id}";
|
||||
{/if}
|
||||
$('#new_address').attr('href', address_link.replace(/id_customer=[0-9]+/, 'id_customer='+id_customer));
|
||||
if (address_link) {
|
||||
$('#new_address').attr('href', address_link.replace(/id_customer=[0-9]+/, 'id_customer='+id_customer));
|
||||
}
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url : "{$link->getAdminLink('AdminCarts')|addslashes}",
|
||||
@@ -1505,13 +1513,20 @@
|
||||
if (addresses.length == 0)
|
||||
{
|
||||
$('#address_delivery, #address_invoice').hide();
|
||||
$("#new_address").show();
|
||||
if (can_edit_booking_carts && can_add_addresses) {
|
||||
$('#address_part').show();
|
||||
$("#new_address").show();
|
||||
} else {
|
||||
$('#address_part').hide();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#addresses_err').hide();
|
||||
$("#new_address").hide();
|
||||
$('#address_delivery, #address_invoice').show();
|
||||
$('#address_part').show();
|
||||
$('#address_part .panel-heading').show();
|
||||
}
|
||||
|
||||
$('#id_address_delivery').html(addresses_delivery_options).hide();
|
||||
@@ -1894,13 +1909,15 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<span class="form-control-static">{l s='Or'} </span>
|
||||
<a class="fancybox_customer btn btn-default" href="{$link->getAdminLink('AdminCustomers')|escape:'html':'UTF-8'}&addcustomer&liteDisplaying=1&submitFormAjax=1#">
|
||||
<i class="icon-plus-sign-alt"></i>
|
||||
{l s='Add new customer'}
|
||||
</a>
|
||||
</div>
|
||||
{if isset($can_edit_booking_carts) && $can_edit_booking_carts && isset($can_add_customers) && $can_add_customers}
|
||||
<div class="col-lg-6">
|
||||
<span class="form-control-static">{l s='Or'} </span>
|
||||
<a class="fancybox_customer btn btn-default" href="{$link->getAdminLink('AdminCustomers')|escape:'html':'UTF-8'}&addcustomer&liteDisplaying=1&submitFormAjax=1#">
|
||||
<i class="icon-plus-sign-alt"></i>
|
||||
{l s='Add new customer'}
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1918,7 +1935,7 @@
|
||||
<a href="{$link->getAdminLink('AdminCustomers')}&id_customer={$customer->id}&viewcustomer&liteDisplaying=1" class="btn btn-default fancybox">
|
||||
<i class="icon-search"></i> Details </a>
|
||||
<button type="button" data-id_cart="6" data-customer="2" class="btn btn-default pull-right change-customer">
|
||||
<i class="icon-refresh"></i> Change
|
||||
<i class="icon-refresh"></i> Change
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2127,13 +2144,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<span class="form-control-static">{l s='Or'} </span>
|
||||
<a class="fancybox btn btn-default" href="{$link->getAdminLink('AdminCartRules')|escape:'html':'UTF-8'}&addcart_rule&liteDisplaying=1&submitFormAjax=1#">
|
||||
<i class="icon-plus-sign-alt"></i>
|
||||
{l s='Add new voucher'}
|
||||
</a>
|
||||
</div>
|
||||
{if isset($can_edit_booking_carts) && $can_edit_booking_carts && isset($can_add_vouchers) && $can_add_vouchers}
|
||||
<div class="col-lg-6">
|
||||
<span class="form-control-static">{l s='Or'} </span>
|
||||
<a class="fancybox btn btn-default" href="{$link->getAdminLink('AdminCartRules')|escape:'html':'UTF-8'}&addcart_rule&liteDisplaying=1&submitFormAjax=1#">
|
||||
<i class="icon-plus-sign-alt"></i>
|
||||
{l s='Add new voucher'}
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2155,7 +2174,7 @@
|
||||
</div>
|
||||
|
||||
<div class="panel" id="address_part" style="">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-heading" id="address_panel_heading">
|
||||
<i class="icon-envelope"></i>
|
||||
{l s='Addresses'}
|
||||
</div>
|
||||
@@ -2189,6 +2208,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if isset($can_edit_booking_carts) && $can_edit_booking_carts && isset($can_add_addresses) && $can_add_addresses}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<a class="fancybox btn btn-default" id="new_address" href="{$link->getAdminLink('AdminAddresses')|escape:'html':'UTF-8'}&addaddress&id_customer=42&liteDisplaying=1&submitFormAjax=1#">
|
||||
@@ -2197,6 +2217,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="panel" id="carriers_part" style="display:none;">
|
||||
<div class="panel-heading">
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<span class="input-group-addon">
|
||||
{$cartCurrency->sign}
|
||||
</span>
|
||||
<input class="service_cart_price_input" id="service_cart_price_{$selectedRoomServiceProduct['id']}_{$product['id_product']}" type="text" value="{$product.price_tax_exc}" name="service_price[{$product['id_product']|escape:'html':'UTF-8'}]"/>
|
||||
<input class="service_cart_price_input" id="service_cart_price_{$selectedRoomServiceProduct['id']}_{$product['id_product']}" type="text" value="{$product.price_tax_exc}" name="service_price[{$product['id_product']|escape:'html':'UTF-8'}]"{if isset($can_edit) && !$can_edit} readonly{/if}/>
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['price_calculation_method']}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
|
||||
124
admin/themes/default/template/controllers/products/amenities.tpl
Normal file
@@ -0,0 +1,124 @@
|
||||
{**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
{if isset($product->id)}
|
||||
<div id="product-amenities" class="panel product-tab">
|
||||
<input type="hidden" name="submitted_tabs[]" value="Amenities" />
|
||||
<h3>{l s='Amenities'}</h3>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<p>{l s='If you want to add a new amenity, please use the following link.'}
|
||||
<a href="{$link->getAdminLink('AdminHotelAmenities')|escape:'html':'UTF-8'}" class="btn btn-link button" target="_blank">
|
||||
<i class="icon-plus-sign"></i> {l s='Manage amenities'} <i class="icon-external-link-sign"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{if isset($room_type_amenities_tree) && $room_type_amenities_tree}
|
||||
<div class="form-group">
|
||||
<label for="room-type-amenities-tree" class="control-label col-sm-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Select the amenities available for this room type.'}">
|
||||
{l s='Select amenities'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-7 room_features_tree">
|
||||
{$room_type_amenities_tree}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Select which of the chosen amenities should be featured for this room type.'}">
|
||||
{l s='Featured amenities'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-7">
|
||||
<select name="featured_amenities[]" id="rt_featured_amenities" class="form-control" multiple>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="alert alert-warning">
|
||||
<i class="icon-warning-sign"></i> {l s='No amenities have been defined yet.'}
|
||||
</div>
|
||||
{/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>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function ($) {
|
||||
var featuredIds = {if isset($featured_amenity_ids)}{$featured_amenity_ids|json_encode}{else}[]{/if};
|
||||
var chosenReady = false;
|
||||
|
||||
function syncAmenitiesToFeatured() {
|
||||
var $select = $('#rt_featured_amenities');
|
||||
var existing = {};
|
||||
$select.find('option').each(function () {
|
||||
existing[$(this).val()] = true;
|
||||
});
|
||||
$('input[name="room_type_amenities[]"]').each(function () {
|
||||
var $checkbox = $(this);
|
||||
var id = $checkbox.val();
|
||||
var name = $checkbox.siblings('label.tree-toggler').text().trim();
|
||||
if ($checkbox.is(':checked')) {
|
||||
if (!existing[id]) {
|
||||
var selected = featuredIds.indexOf(parseInt(id)) !== -1;
|
||||
$select.append($('<option></option>').val(id).text(name).prop('selected', selected));
|
||||
}
|
||||
} else {
|
||||
$select.find('option[value="' + id + '"]').remove();
|
||||
}
|
||||
});
|
||||
if (chosenReady) {
|
||||
$select.trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('click', '#room-type-amenities-tree :input[type="checkbox"]', function () {
|
||||
setTimeout(syncAmenitiesToFeatured, 0);
|
||||
});
|
||||
$(document).on('click', '#check-all-room-type-amenities-tree, #uncheck-all-room-type-amenities-tree', function () {
|
||||
setTimeout(syncAmenitiesToFeatured, 0);
|
||||
});
|
||||
|
||||
function initChosen() {
|
||||
var $select = $('#rt_featured_amenities');
|
||||
syncAmenitiesToFeatured();
|
||||
$select.chosen({ disable_search_threshold: 5, search_contains: true });
|
||||
chosenReady = true;
|
||||
$select.trigger('chosen:updated');
|
||||
}
|
||||
|
||||
var $tabContent = $('#product-tab-content-Amenities');
|
||||
if ($tabContent.is(':visible')) {
|
||||
initChosen();
|
||||
} else {
|
||||
$tabContent.one('displayed', initChosen);
|
||||
}
|
||||
}(jQuery));
|
||||
</script>
|
||||
{/if}
|
||||
@@ -28,162 +28,35 @@
|
||||
<input type="hidden" name="submitted_tabs[]" value="Features" />
|
||||
<h3>{l s='Assign features to this room type'}</h3>
|
||||
|
||||
{if isset($room_type_features_tree) && $room_type_features_tree}
|
||||
<div class="alert alert-info">
|
||||
{l s='You can specify a value for each relevant feature regarding this room type. Empty fields will not be displayed.'}<br/>
|
||||
{l s='You can either create a specific value, or select among the existing pre-defined values you\'ve previously added.'}
|
||||
|
||||
<p>{l s='If you want to add a new feature, please use the following link.'}
|
||||
<a href="{$link->getAdminLink('AdminFeatures')|escape:'html':'UTF-8'}" class="btn btn-link button" target="_blank">
|
||||
<i class="icon-plus-sign"></i> {l s='Add a new feature'} <i class="icon-external-link-sign"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="room-type-features-tree" class="control-label col-sm-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Select the feature values available for this room type.'}">
|
||||
{l s='Select feature values'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-7 room_features_tree">
|
||||
{$room_type_features_tree}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="alert alert-warning">
|
||||
<i class="icon-warning-sign"></i> {l s='No features have been defined'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><span class="title_box">{l s='Feature'}</span></th>
|
||||
<th><span class="title_box">{l s='Feature Image'}</span></th>
|
||||
<!-- <th><span class="title_box"><u>{l s='or'}</u> {l s='Customized value'}</span></th> --><!-- by webkul -->
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{foreach from=$available_features item=available_feature}
|
||||
|
||||
<tr>
|
||||
{foreach from=$available_feature.featureValues item=value}
|
||||
<td>
|
||||
<input type="checkbox" class="checkbox select_hotel_feature" name="feature_{$available_feature.id_feature}_check" value="{$value.id_feature_value}" {if $available_feature.current_item == $value.id_feature_value}checked="checked"{/if}/>
|
||||
</td>
|
||||
<td>{$available_feature.name}</td>
|
||||
<td>
|
||||
<input type="hidden" id="feature_{$available_feature.id_feature}_value" name="feature_{$available_feature.id_feature}_value" value="{$value.id_feature_value}">
|
||||
<img class="img img-responsive" width="15px" src="{$base_url}img/rf/{$value.value}" title="Room image" />
|
||||
</td>
|
||||
{/foreach}
|
||||
{*--<td>
|
||||
{if sizeof($available_feature.featureValues)}
|
||||
<select id="feature_{$available_feature.id_feature}_value" name="feature_{$available_feature.id_feature}_value"
|
||||
onchange="$('.custom_{$available_feature.id_feature}_').val('');">
|
||||
<option value="0">---</option>
|
||||
{foreach from=$available_feature.featureValues item=value}
|
||||
<option value="{$value.id_feature_value}"{if $available_feature.current_item == $value.id_feature_value}selected="selected"{/if} >
|
||||
{$value.value|truncate:40}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
<input type="hidden" name="feature_{$available_feature.id_feature}_value" value="0" />
|
||||
<span>{l s='N/A'} -
|
||||
<a href="{$link->getAdminLink('AdminFeatures')|escape:'html':'UTF-8'}&addfeature_value&id_feature={$available_feature.id_feature}"
|
||||
class="confirm_leave btn btn-link"><i class="icon-plus-sign"></i> {l s='Add pre-defined values first'} <i class="icon-external-link-sign"></i></a>
|
||||
</span>
|
||||
{/if} *}<!-- By Webkul -->
|
||||
</td>
|
||||
{* <td>
|
||||
|
||||
<div class="row lang-0" style='display: none;'>
|
||||
<div class="col-lg-9">
|
||||
<textarea class="custom_{$available_feature.id_feature}_ALL textarea-autosize" name="custom_{$available_feature.id_feature}_ALL"
|
||||
cols="40" style='background-color:#CCF' rows="1" onkeyup="{foreach from=$languages key=k item=language}$('.custom_{$available_feature.id_feature}_{$language.id_lang}').val($(this).val());{/foreach}" >{$available_feature.val[1].value|escape:'html':'UTF-8'|default:""}</textarea>
|
||||
|
||||
</div>
|
||||
{if $languages|count > 1}
|
||||
<div class="col-lg-3">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{l s='ALL'}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach from=$languages item=language}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="restore_lng($(this),{$language.id_lang});">{$language.iso_code}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{foreach from=$languages key=k item=language}
|
||||
{if $languages|count > 1}
|
||||
<div class="row translatable-field lang-{$language.id_lang}">
|
||||
<div class="col-lg-9">
|
||||
{/if}
|
||||
<textarea
|
||||
class="custom_{$available_feature.id_feature}_{$language.id_lang} textarea-autosize"
|
||||
name="custom_{$available_feature.id_feature}_{$language.id_lang}"
|
||||
cols="40"
|
||||
rows="1"
|
||||
onkeyup="if (isArrowKey(event)) return ;$('#feature_{$available_feature.id_feature}_value').val(0);" >{$available_feature.val[$language.id_lang].value|escape:'html':'UTF-8'|default:""}</textarea>
|
||||
|
||||
{if $languages|count > 1}
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{$language.iso_code}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:void(0);" onclick="all_languages($(this));">{l s='ALL'}</a></li>
|
||||
{foreach from=$languages item=language}
|
||||
<li>
|
||||
<a href="javascript:hideOtherLanguage({$language.id_lang});">{$language.iso_code}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td> *}<!-- By Webkul -->
|
||||
|
||||
</tr>
|
||||
{foreachelse}
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:center;"><i class="icon-warning-sign"></i> {l s='No features have been defined'}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{$link->getAdminLink('AdminFeatures')|escape:'html':'UTF-8'}&addfeature" class="btn btn-link confirm_leave button">
|
||||
<i class="icon-plus-sign"></i> {l s='Add a new feature'} <i class="icon-external-link-sign"></i>
|
||||
</a>
|
||||
<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>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
if (tabs_manager.allow_hide_other_languages)
|
||||
hideOtherLanguage({$default_form_language});
|
||||
{literal}
|
||||
$(".textarea-autosize").autosize();
|
||||
|
||||
function all_languages(pos)
|
||||
{
|
||||
{/literal}
|
||||
{if isset($languages) && is_array($languages)}
|
||||
{foreach from=$languages key=k item=language}
|
||||
pos.parents('td').find('.lang-{$language.id_lang}').addClass('nolang-{$language.id_lang}').removeClass('lang-{$language.id_lang}');
|
||||
{/foreach}
|
||||
{/if}
|
||||
pos.parents('td').find('.translatable-field').hide();
|
||||
pos.parents('td').find('.lang-0').show();
|
||||
{literal}
|
||||
}
|
||||
|
||||
function restore_lng(pos,i)
|
||||
{
|
||||
{/literal}
|
||||
{if isset($languages) && is_array($languages)}
|
||||
{foreach from=$languages key=k item=language}
|
||||
pos.parents('td').find('.nolang-{$language.id_lang}').addClass('lang-{$language.id_lang}').removeClass('nolang-{$language.id_lang}');
|
||||
{/foreach}
|
||||
{/if}
|
||||
{literal}
|
||||
pos.parents('td').find('.lang-0').hide();
|
||||
hideOtherLanguage(i);
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{/if}
|
||||
|
||||
@@ -465,21 +465,6 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group" id="bed_types_selection">
|
||||
<label class="control-label col-sm-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select all bed types available for this room type.'}">
|
||||
{l s='Bed Types'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-5">
|
||||
<select name="id_bed_types[]" id="id_bed_types" class="form-control chosen" multiple>
|
||||
{foreach from=$bed_types_info item=bed_type_info}
|
||||
<option value="{$bed_type_info['id_bed_type']}" {if isset($selected_bed_types) && in_array($bed_type_info['id_bed_type'], $selected_bed_types)}selected{/if}>{$bed_type_info['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* <div class="form-group">
|
||||
<label class="control-label col-lg-3" for="tags_{$id_lang}">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
<div class="tree-panel-heading-controls clearfix">
|
||||
{if isset($title) && $title}<span class="tree-panel-label-title">{$title}</span>{/if}
|
||||
{if isset($toolbar)}{$toolbar}{/if}
|
||||
</div>
|
||||
@@ -543,14 +543,14 @@ class AddressCore extends ObjectModel
|
||||
LEFT JOIN `'._DB_PREFIX_.'state` s
|
||||
ON s.`id_country` = cl.`id_country` AND s.`id_state` = a.`id_state`
|
||||
WHERE id_customer > 0 AND a.`deleted` = 0 AND
|
||||
(a.`address1` LIKE \'%'.$query.'%\' OR
|
||||
a.`postcode` LIKE \'%'.$query.'%\' OR
|
||||
a.`city` LIKE \'%'.$query.'%\' OR
|
||||
a.`phone` LIKE \'%'.$query.'%\' OR
|
||||
a.`company` LIKE \'%'.$query.'%\' OR
|
||||
a.`alias` LIKE \'%'.$query.'%\' OR
|
||||
s.`name` LIKE \'%'.$query.'%\' OR
|
||||
cl.`name` LIKE \'%'.$query.'%\'
|
||||
(a.`address1` LIKE \'%'.pSQL($query).'%\' OR
|
||||
a.`postcode` LIKE \'%'.pSQL($query).'%\' OR
|
||||
a.`city` LIKE \'%'.pSQL($query).'%\' OR
|
||||
a.`phone` LIKE \'%'.pSQL($query).'%\' OR
|
||||
a.`company` LIKE \'%'.pSQL($query).'%\' OR
|
||||
a.`alias` LIKE \'%'.pSQL($query).'%\' OR
|
||||
s.`name` LIKE \'%'.pSQL($query).'%\' OR
|
||||
cl.`name` LIKE \'%'.pSQL($query).'%\'
|
||||
)
|
||||
');
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ class CustomerMessageCore extends ObjectModel
|
||||
ON (ct.`id_customer_thread` = cm.`id_customer_thread`)
|
||||
LEFT JOIN '._DB_PREFIX_.'customer c
|
||||
ON (IFNULL(ct.`id_customer`, ct.`email`) = IFNULL(c.`id_customer`, c.`email`))
|
||||
WHERE `message` LIKE \'%'.$query.'%\'
|
||||
WHERE `message` LIKE \'%'.pSQL($query).'%\'
|
||||
');
|
||||
}
|
||||
|
||||
|
||||
@@ -677,8 +677,14 @@ abstract class PaymentModuleCore extends Module
|
||||
$orderTotals[$order->id]['excl'] -= $used['excl'];
|
||||
$cart_rules[$key]['remaining'] -= $used['excl'];
|
||||
}
|
||||
|
||||
$order->addCartRule($cart_rule['obj']->id, $cart_rule['obj']->name, $values, 0, $cart_rule['obj']->free_shipping);
|
||||
|
||||
$order->addCartRule(
|
||||
$cart_rule['obj']->id,
|
||||
$cart_rule['obj']->name,
|
||||
array('tax_incl' => $used['incl'], 'tax_excl' => $used['excl']),
|
||||
0,
|
||||
$cart_rule['obj']->free_shipping
|
||||
);
|
||||
|
||||
if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && !in_array($cart_rule['obj']->id, $cart_rule_used)) {
|
||||
$cart_rule_used[] = $cart_rule['obj']->id;
|
||||
@@ -691,7 +697,7 @@ abstract class PaymentModuleCore extends Module
|
||||
|
||||
$cart_rules_list[] = array(
|
||||
'voucher_name' => $cart_rule['obj']->name,
|
||||
'voucher_reduction' => ($values['tax_incl'] != 0.00 ? '-' : '').Tools::displayPrice($values['tax_incl'], $this->context->currency, false)
|
||||
'voucher_reduction' => ($used['incl'] != 0.00 ? '-' : '').Tools::displayPrice($used['incl'], $this->context->currency, false)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1073,9 +1073,6 @@ class ProductCore extends ObjectModel
|
||||
if (!$this->deleteServiceInfo()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
$objHotelRoomTypeBedType = new HotelRoomTypeBedType();
|
||||
$objHotelRoomTypeBedType->deleteRoomTypeBedTypes(false, $this->id);
|
||||
}
|
||||
|
||||
Hook::exec('actionProductDelete', array('id_product' => (int)$this->id, 'product' => $this));
|
||||
@@ -1083,6 +1080,7 @@ class ProductCore extends ObjectModel
|
||||
!GroupReduction::deleteProductReduction($this->id) ||
|
||||
!$this->deleteCategories(true) ||
|
||||
!$this->deleteProductFeatures() ||
|
||||
!HotelRoomTypeAmenities::deleteByProduct((int)$this->id) ||
|
||||
!$this->deleteTags() ||
|
||||
!$this->deleteAttributesImpacts() ||
|
||||
!$this->deleteAttachments(false) ||
|
||||
@@ -6873,4 +6871,55 @@ class ProductCore extends ObjectModel
|
||||
|
||||
return $price * (int)$quantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare grouped core features and values for a room type, with selection state.
|
||||
*
|
||||
* @param int $idProduct
|
||||
* @param int $idLang defaults to current context language
|
||||
* @return array
|
||||
*/
|
||||
public static function getRoomTypeFeatureTreeData($idProduct, $idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
$product = new self((int) $idProduct);
|
||||
$features = Feature::getFeatures(
|
||||
$idLang,
|
||||
(Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP)
|
||||
);
|
||||
$selectedFeatureValues = array();
|
||||
foreach ($product->getFeatures() as $productFeature) {
|
||||
$selectedFeatureValues[(int) $productFeature['id_feature']][] = (int) $productFeature['id_feature_value'];
|
||||
}
|
||||
|
||||
foreach ($features as &$feature) {
|
||||
$featureValues = FeatureValue::getFeatureValuesWithLang(
|
||||
$idLang,
|
||||
(int) $feature['id_feature']
|
||||
);
|
||||
$feature['value'] = (int) $feature['id_feature'];
|
||||
$feature['input_name'] = 'feature_value_parents';
|
||||
$feature['children'] = array();
|
||||
$selectedValues = isset($selectedFeatureValues[(int) $feature['id_feature']])
|
||||
? $selectedFeatureValues[(int) $feature['id_feature']]
|
||||
: array();
|
||||
|
||||
foreach ($featureValues as $featureValue) {
|
||||
$featureValue['name'] = $featureValue['value'];
|
||||
$featureValue['value'] = (int) $featureValue['id_feature_value'];
|
||||
$featureValue['input_name'] = 'feature_values['.(int) $feature['id_feature'].']';
|
||||
$featureValue['selected'] = in_array((int) $featureValue['id_feature_value'], $selectedValues);
|
||||
$feature['children'][] = $featureValue;
|
||||
}
|
||||
|
||||
if ($feature['children'] && count($selectedValues) === count($feature['children'])) {
|
||||
$feature['selected'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $features;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1211,10 +1211,25 @@ class AdminControllerCore extends Controller
|
||||
if (ob_get_level() && ob_get_length() > 0) {
|
||||
ob_clean();
|
||||
}
|
||||
$fields_to_export = array();
|
||||
if((int)Configuration::get('PS_EXPORT_FIELDS_TYPE') === HelperList::QLO_EXPORT_FIELDS_SELECTED){
|
||||
$list_visibility = json_decode($this->context->cookie->{'list_visibility_'.$this->context->controller->controller_name});
|
||||
foreach ($this->fields_list as $key => $field) {
|
||||
if ((!isset($field['displayed']) || $field['displayed'])
|
||||
&& (empty($field['optional'])
|
||||
|| (!is_array($list_visibility) && !empty($field['visible_default']))
|
||||
|| (is_array($list_visibility) && in_array($key, $list_visibility))
|
||||
)) {
|
||||
$fields_to_export[$key] = $field;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->getList($this->context->language->id, null, null, 0, false);
|
||||
if (!count($this->_list)) {
|
||||
return;
|
||||
}
|
||||
$fields_to_export = (int)Configuration::get('PS_EXPORT_FIELDS_TYPE') === HelperList::QLO_EXPORT_FIELDS_SELECTED ? $fields_to_export : $this->fields_list;
|
||||
|
||||
header('Content-type: text/csv');
|
||||
header('Content-Type: application/force-download; charset=UTF-8');
|
||||
@@ -1223,9 +1238,9 @@ class AdminControllerCore extends Controller
|
||||
|
||||
$fd = fopen('php://output', 'wb');
|
||||
$headers = array();
|
||||
foreach ($this->fields_list as $key => $datas) {
|
||||
foreach ($fields_to_export as $key => $datas) {
|
||||
if ('PDF' === $datas['title']) {
|
||||
unset($this->fields_list[$key]);
|
||||
unset($fields_to_export[$key]);
|
||||
} else {
|
||||
if ('ID' === $datas['title']) {
|
||||
$headers[] = strtolower(Tools::htmlentitiesDecodeUTF8($datas['title']));
|
||||
@@ -1239,7 +1254,7 @@ class AdminControllerCore extends Controller
|
||||
foreach ($this->_list as $i => $row) {
|
||||
$content = array();
|
||||
$path_to_image = false;
|
||||
foreach ($this->fields_list as $key => $params) {
|
||||
foreach ($fields_to_export as $key => $params) {
|
||||
$field_value = isset($row[$key]) ? Tools::htmlentitiesDecodeUTF8(Tools::nl2br($row[$key])) : '';
|
||||
if ($key == 'image') {
|
||||
if ($params['image'] != 'p' || Configuration::get('PS_LEGACY_IMAGES')) {
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*/
|
||||
class HelperListCore extends Helper
|
||||
{
|
||||
const QLO_EXPORT_FIELDS_ALL = 0;
|
||||
const QLO_EXPORT_FIELDS_SELECTED = 1;
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
|
||||
292
classes/pdf/HTMLTemplateGuestRegistrationForm.php
Normal file
@@ -0,0 +1,292 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3.0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
class HTMLTemplateGuestRegistrationFormCore extends HTMLTemplate
|
||||
{
|
||||
public $order;
|
||||
public $available_in_your_account = false;
|
||||
protected $hotelBookingDetail = null;
|
||||
|
||||
/**
|
||||
* @param int $idHotelBookingDetail
|
||||
* @param $smarty
|
||||
*/
|
||||
public function __construct($idHotelBookingDetail, $smarty)
|
||||
{
|
||||
$this->hotelBookingDetail = new HotelBookingDetail((int)$idHotelBookingDetail);
|
||||
$this->order = new Order((int)$this->hotelBookingDetail->id_order);
|
||||
$this->smarty = $smarty;
|
||||
$this->date = Tools::displayDate($this->order->date_add);
|
||||
$this->title = $this->order->getUniqReference();
|
||||
$this->shop = new Shop((int)$this->order->id_shop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the template's HTML header
|
||||
*
|
||||
* @return string HTML header
|
||||
*/
|
||||
public function getHeader()
|
||||
{
|
||||
$this->assignCommonHeaderData();
|
||||
$this->smarty->assign(array('header' => HTMLTemplateGuestRegistrationForm::l('Guest Registration Card')));
|
||||
|
||||
return $this->smarty->fetch($this->getTemplate('header'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the template's HTML content
|
||||
*
|
||||
* @return string HTML content
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
$idLang = (int)$this->order->id_lang;
|
||||
$objHotelBookingDetail = $this->hotelBookingDetail;
|
||||
$idHotel = (int)$objHotelBookingDetail->id_hotel;
|
||||
|
||||
$objHotelBranchInformation = null;
|
||||
$hotelCountry = '';
|
||||
|
||||
if ($idHotel) {
|
||||
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $idLang);
|
||||
if (Validate::isLoadedObject($objHotelBranchInformation)) {
|
||||
if ($objHotelBranchInformation->id_country) {
|
||||
$objCountry = new Country((int)$objHotelBranchInformation->id_country, $idLang);
|
||||
if (Validate::isLoadedObject($objCountry)) {
|
||||
$hotelCountry = (string)$objCountry->name;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$objHotelBranchInformation = null;
|
||||
}
|
||||
}
|
||||
|
||||
$ratePerNight = '';
|
||||
$arrivalDateTime = '';
|
||||
$departureDateTime = '';
|
||||
|
||||
if (Validate::isLoadedObject($objHotelBookingDetail)) {
|
||||
$nights = (int)HotelHelper::getNumberOfDays($objHotelBookingDetail->date_from, $objHotelBookingDetail->date_to);
|
||||
if ($nights > 0) {
|
||||
$currency = new Currency((int)$this->order->id_currency);
|
||||
$ratePerNight = Tools::displayPrice((float)$objHotelBookingDetail->total_price_tax_incl / $nights, $currency, false);
|
||||
}
|
||||
$arrivalDateTime = $objHotelBookingDetail->date_from ? Tools::displayDate($objHotelBookingDetail->date_from) : '';
|
||||
$departureDateTime = $objHotelBookingDetail->date_to ? Tools::displayDate($objHotelBookingDetail->date_to) : '';
|
||||
if ($arrivalDateTime && $objHotelBranchInformation && $objHotelBranchInformation->check_in && $objHotelBranchInformation->check_in != '00:00:00') {
|
||||
$arrivalDateTime .= ' '.date('h:i a', strtotime($objHotelBranchInformation->check_in));
|
||||
}
|
||||
if ($departureDateTime && $objHotelBranchInformation && $objHotelBranchInformation->check_out && $objHotelBranchInformation->check_out != '00:00:00') {
|
||||
$departureDateTime .= ' '.date('h:i a', strtotime($objHotelBranchInformation->check_out));
|
||||
}
|
||||
}
|
||||
|
||||
$additionalGuestsRows = 0;
|
||||
if (Validate::isLoadedObject($objHotelBookingDetail)) {
|
||||
$totalGuests = (int)$objHotelBookingDetail->adults + (int)$objHotelBookingDetail->children;
|
||||
$additionalGuestsRows = ($totalGuests > 1) ? ($totalGuests - 1) : 0;
|
||||
}
|
||||
|
||||
// Build saved config: [sectionId => [fieldId => true, ...]]
|
||||
$grcFields = array();
|
||||
$grcInfoJson = Configuration::get('QLO_GUEST_REGISTRATION_CARD_INFO');
|
||||
if ($grcInfoJson !== false && $grcInfoJson !== '') {
|
||||
$grcData = Tools::jsonDecode($grcInfoJson, true);
|
||||
if (is_array($grcData)) {
|
||||
foreach ($grcData as $sectionId => $fieldIds) {
|
||||
$fieldIds = array_map('intval', (array)$fieldIds);
|
||||
if (!empty($fieldIds)) {
|
||||
$grcFields[(int)$sectionId] = array_flip($fieldIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// When nothing saved, show all sections and fields
|
||||
$allVisible = empty($grcFields);
|
||||
|
||||
// One pass: build false|string label for every field directly.
|
||||
// false = hidden, non-empty string = visible (used for both visibility check and label text in template).
|
||||
$grcInfo = $this->hotelBookingDetail->getRegistrationCardInfo();
|
||||
$fieldLabels = array();
|
||||
foreach ($grcInfo as $sectionId => $section) {
|
||||
$isSectionEnabled = $allVisible || isset($grcFields[$sectionId]);
|
||||
$fieldLabels[$sectionId] = array();
|
||||
foreach ($section['fields'] as $fieldId => $fieldLabel) {
|
||||
$isVisible = $isSectionEnabled && ($allVisible || isset($grcFields[$sectionId][$fieldId]));
|
||||
$fieldLabels[$sectionId][$fieldId] = $isVisible ? $fieldLabel : false;
|
||||
}
|
||||
}
|
||||
|
||||
$section1 = HotelBookingDetail::GRC_SECTION_GUEST_INFO;
|
||||
$section2 = HotelBookingDetail::GRC_SECTION_TRAVEL_INFO;
|
||||
$section3 = HotelBookingDetail::GRC_SECTION_BOOKING_INFO;
|
||||
$section4 = HotelBookingDetail::GRC_SECTION_IDENTIFICATION;
|
||||
$section5 = HotelBookingDetail::GRC_SECTION_ADDITIONAL_GUESTS;
|
||||
$section6 = HotelBookingDetail::GRC_SECTION_BILLING_CORPORATE;
|
||||
$section7 = HotelBookingDetail::GRC_SECTION_PAYMENT_DEPOSIT;
|
||||
$section8 = HotelBookingDetail::GRC_SECTION_GUEST_SIGNATURE;
|
||||
$section9 = HotelBookingDetail::GRC_SECTION_PROPERTY_REGS;
|
||||
$section10 = HotelBookingDetail::GRC_SECTION_OFFICE_USE_ONLY;
|
||||
|
||||
// $labels: false = field hidden, label string = field visible.
|
||||
// Template uses {if $labels.key} for visibility AND {$labels.key} for label — no separate boolean assigns.
|
||||
$labels = array(
|
||||
// Section 1: Guest Information
|
||||
'title' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_TITLE],
|
||||
'full_name' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_FULL_NAME],
|
||||
'phone' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_PHONE],
|
||||
'email' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_EMAIL],
|
||||
'dob' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_DOB],
|
||||
'nationality' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_NATIONALITY],
|
||||
'city_country' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_CITY_COUNTRY],
|
||||
'postal_code' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_POSTAL_CODE],
|
||||
'address' => $fieldLabels[$section1][HotelBookingDetail::GRC_GUEST_ADDRESS],
|
||||
|
||||
// Section 2: Travel Information
|
||||
'arrived_from' => $fieldLabels[$section2][HotelBookingDetail::GRC_TRAVEL_ARRIVED_FROM],
|
||||
'next_dest' => $fieldLabels[$section2][HotelBookingDetail::GRC_TRAVEL_NEXT_DESTINATION],
|
||||
'flight' => $fieldLabels[$section2][HotelBookingDetail::GRC_TRAVEL_FLIGHT_TRAIN],
|
||||
'vehicle' => $fieldLabels[$section2][HotelBookingDetail::GRC_TRAVEL_VEHICLE_REG],
|
||||
'purpose' => $fieldLabels[$section2][HotelBookingDetail::GRC_TRAVEL_PURPOSE_OF_VISIT],
|
||||
|
||||
// Section 3: Booking Information
|
||||
'booking_ref' => $fieldLabels[$section3][HotelBookingDetail::GRC_BOOKING_REFERENCE],
|
||||
'booking_rate' => $fieldLabels[$section3][HotelBookingDetail::GRC_BOOKING_RATE_PER_NIGHT],
|
||||
'booking_arrival' => $fieldLabels[$section3][HotelBookingDetail::GRC_BOOKING_ARRIVAL],
|
||||
'booking_departure' => $fieldLabels[$section3][HotelBookingDetail::GRC_BOOKING_DEPARTURE],
|
||||
'booking_room_type' => $fieldLabels[$section3][HotelBookingDetail::GRC_BOOKING_ROOM_TYPE],
|
||||
'booking_room_number' => $fieldLabels[$section3][HotelBookingDetail::GRC_BOOKING_ROOM_NUMBER],
|
||||
'num_guests' => $fieldLabels[$section3][HotelBookingDetail::GRC_BOOKING_NUM_GUESTS],
|
||||
|
||||
// Section 4: Identification Document
|
||||
'id_proof' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_IDENTITY_PROOF],
|
||||
'id_number' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_NUMBER],
|
||||
'passport' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_PASSPORT_NO],
|
||||
'place_of_issue' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_PLACE_OF_ISSUE],
|
||||
'date_of_issue' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_DATE_OF_ISSUE],
|
||||
'date_of_expiry' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_DATE_OF_EXPIRY],
|
||||
'visa' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_VISA_NUMBER],
|
||||
'valid_until' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_VALID_UNTIL],
|
||||
'arrival_in_country' => $fieldLabels[$section4][HotelBookingDetail::GRC_ID_ARRIVAL_DATE_IN_COUNTRY],
|
||||
|
||||
// Section 5: Additional Guests
|
||||
'addguest_name' => $fieldLabels[$section5][HotelBookingDetail::GRC_ADD_GUEST_NAME],
|
||||
'addguest_id_type' => $fieldLabels[$section5][HotelBookingDetail::GRC_ADD_GUEST_ID_TYPE],
|
||||
'addguest_id_number' => $fieldLabels[$section5][HotelBookingDetail::GRC_ADD_GUEST_ID_NUMBER],
|
||||
'addguest_nationality' => $fieldLabels[$section5][HotelBookingDetail::GRC_ADD_GUEST_NATIONALITY],
|
||||
|
||||
// Section 6: Billing & Corporate
|
||||
'company' => $fieldLabels[$section6][HotelBookingDetail::GRC_BILLING_COMPANY],
|
||||
'tax_id' => $fieldLabels[$section6][HotelBookingDetail::GRC_BILLING_TAX_ID],
|
||||
|
||||
// Section 7: Payment & Deposit
|
||||
'payment_method' => $fieldLabels[$section7][HotelBookingDetail::GRC_PAYMENT_METHOD],
|
||||
'card_number' => $fieldLabels[$section7][HotelBookingDetail::GRC_PAYMENT_CARD_NUMBER],
|
||||
'security_deposit' => $fieldLabels[$section7][HotelBookingDetail::GRC_PAYMENT_SECURITY_DEPOSIT],
|
||||
|
||||
// Section 8: Guest Signature
|
||||
'signature' => $fieldLabels[$section8][HotelBookingDetail::GRC_SIG_SIGNATURE],
|
||||
'sig_date' => $fieldLabels[$section8][HotelBookingDetail::GRC_SIG_DATE],
|
||||
|
||||
// Section 9: Property Regulations (checkin/checkout share one visibility flag; two separate PDF sub-labels)
|
||||
'checkin_time' => $fieldLabels[$section9][HotelBookingDetail::GRC_PROP_CHECKIN_CHECKOUT_TIME] ? 'Check-in Time' : false,
|
||||
'checkout_time' => $fieldLabels[$section9][HotelBookingDetail::GRC_PROP_CHECKIN_CHECKOUT_TIME] ? 'Check-out Time' : false,
|
||||
'hotel_policies' => $fieldLabels[$section9][HotelBookingDetail::GRC_PROP_HOTEL_POLICIES],
|
||||
|
||||
// Section 10: For Office Use Only
|
||||
'staff_name' => $fieldLabels[$section10][HotelBookingDetail::GRC_OFFICE_STAFF_NAME],
|
||||
'office_checkin_time' => $fieldLabels[$section10][HotelBookingDetail::GRC_OFFICE_CHECKIN_TIME],
|
||||
'id_verified' => $fieldLabels[$section10][HotelBookingDetail::GRC_OFFICE_ID_VERIFIED],
|
||||
'reg_no' => $fieldLabels[$section10][HotelBookingDetail::GRC_OFFICE_REG_NO],
|
||||
);
|
||||
|
||||
$showLocalIdGroup = (bool)$labels['id_proof'] || (bool)$labels['id_number'];
|
||||
$showIntIdGroup = (bool)$labels['passport'] || (bool)$labels['place_of_issue'] || (bool)$labels['date_of_issue']
|
||||
|| (bool)$labels['date_of_expiry'] || (bool)$labels['visa'] || (bool)$labels['valid_until']
|
||||
|| (bool)$labels['arrival_in_country'];
|
||||
|
||||
$this->smarty->assign(array(
|
||||
'style_tab' => $this->smarty->fetch($this->getTemplate('invoice.style-tab')),
|
||||
'hotel' => $objHotelBranchInformation,
|
||||
'hotel_country' => $hotelCountry,
|
||||
'booking_reference' => $this->order->getUniqReference(),
|
||||
'arrival_date_time' => $arrivalDateTime,
|
||||
'departure_date_time' => $departureDateTime,
|
||||
'room_type' => Validate::isLoadedObject($objHotelBookingDetail) ? $objHotelBookingDetail->room_type_name : '',
|
||||
'room_number' => Validate::isLoadedObject($objHotelBookingDetail) ? $objHotelBookingDetail->room_num : '',
|
||||
'adults' => Validate::isLoadedObject($objHotelBookingDetail) ? (int)$objHotelBookingDetail->adults : 0,
|
||||
'children' => Validate::isLoadedObject($objHotelBookingDetail) ? (int)$objHotelBookingDetail->children : 0,
|
||||
'rate_per_night' => $ratePerNight,
|
||||
'additional_guests_rows' => $additionalGuestsRows,
|
||||
|
||||
// Section visibility
|
||||
'show_section_guest_info' => !empty(array_filter($fieldLabels[$section1])),
|
||||
'show_section_travel_info' => !empty(array_filter($fieldLabels[$section2])),
|
||||
'show_section_booking_info' => !empty(array_filter($fieldLabels[$section3])),
|
||||
'show_section_identification' => !empty(array_filter($fieldLabels[$section4])),
|
||||
'show_section_additional_guests' => !empty(array_filter($fieldLabels[$section5])),
|
||||
'show_section_billing_corporate' => !empty(array_filter($fieldLabels[$section6])),
|
||||
'show_section_payment_deposit' => !empty(array_filter($fieldLabels[$section7])),
|
||||
'show_section_guest_signature' => !empty(array_filter($fieldLabels[$section8])),
|
||||
'show_section_property_regs' => !empty(array_filter($fieldLabels[$section9])),
|
||||
'show_section_office_use' => !empty(array_filter($fieldLabels[$section10])),
|
||||
|
||||
'section_additional_guests' => $grcInfo[$section5]['name'],
|
||||
'section_property_regs' => $grcInfo[$section9]['name'],
|
||||
|
||||
'local_id' => $showLocalIdGroup,
|
||||
'int_id' => $showIntIdGroup,
|
||||
'labels' => $labels,
|
||||
));
|
||||
|
||||
return $this->smarty->fetch($this->getTemplate('guest-registration-form'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the template filename when using bulk rendering
|
||||
*
|
||||
* @return string filename
|
||||
*/
|
||||
public function getBulkFilename()
|
||||
{
|
||||
return 'guest-registration-forms.pdf';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the template filename
|
||||
*
|
||||
* @return string filename
|
||||
*/
|
||||
public function getFilename()
|
||||
{
|
||||
$filename = 'guest-registration-form-'.$this->order->reference;
|
||||
if ($this->hotelBookingDetail->id) {
|
||||
$filename .= '-room-'.$this->hotelBookingDetail->id;
|
||||
}
|
||||
|
||||
return $filename.'.pdf';
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ class PDFCore
|
||||
protected $smarty;
|
||||
|
||||
const TEMPLATE_INVOICE = 'Invoice';
|
||||
const TEMPLATE_GUEST_REGISTRATION_FORM = 'GuestRegistrationForm';
|
||||
const TEMPLATE_ORDER_RETURN = 'OrderReturn';
|
||||
const TEMPLATE_ORDER_SLIP = 'OrderSlip';
|
||||
const TEMPLATE_DELIVERY_SLIP = 'DeliverySlip';
|
||||
|
||||
@@ -384,13 +384,13 @@ class AdminAddressesControllerCore extends AdminController
|
||||
public function processExport($text_delimiter = '"')
|
||||
{
|
||||
$this->fields_list = array_merge($this->fields_list, array(
|
||||
'email' => array('title' => $this->l('Customer Email')),
|
||||
'phone' => array('title' => $this->l('Phone'), 'filter_key' => 'a!phone'),
|
||||
'phone_mobile' => array('title' => $this->l('Mobile phone')),
|
||||
'address1' => array('title' => $this->l('Address (2)')),
|
||||
'dni' => array('title' => $this->l('Identification Number')),
|
||||
'vat_number' => array('title' => $this->l('VAT number')),
|
||||
'other' => array('title' => $this->l('Other')),
|
||||
'email' => array('title' => $this->l('Customer Email'), 'displayed' => false),
|
||||
'phone' => array('title' => $this->l('Phone'), 'filter_key' => 'a!phone', 'displayed' => false),
|
||||
'phone_mobile' => array('title' => $this->l('Mobile phone'), 'displayed' => false),
|
||||
'address2' => array('title' => $this->l('Address (2)'), 'displayed' => false),
|
||||
'dni' => array('title' => $this->l('Identification Number'), 'displayed' => false),
|
||||
'vat_number' => array('title' => $this->l('VAT number'), 'displayed' => false),
|
||||
'other' => array('title' => $this->l('Other'), 'displayed' => false),
|
||||
));
|
||||
|
||||
return parent::processExport($text_delimiter);
|
||||
|
||||
@@ -695,6 +695,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
'cart_detail_data' => $cart_detail_data,
|
||||
'cart' => $objCart,
|
||||
'currency' => new Currency((int)$this->context->cart->id_currency),
|
||||
'can_edit_booking_carts' => ($this->tabAccess['edit'] === 1),
|
||||
'occupancy_required_for_booking' => $occupancyRequiredForBooking,
|
||||
'ajax' => true
|
||||
));
|
||||
@@ -1265,7 +1266,8 @@ class AdminCartsControllerCore extends AdminController
|
||||
'serviceProducts' => $serviceProducts,
|
||||
'selectedRoomServiceProduct' => $selectedRoomServiceProduct,
|
||||
'customServiceAllowed' => Configuration::get('PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING'),
|
||||
'loaderImg' => $this->context->link->getMediaLink(_PS_IMG_.'admin/ajax-loader.gif')
|
||||
'loaderImg' => $this->context->link->getMediaLink(_PS_IMG_.'admin/ajax-loader.gif'),
|
||||
'can_edit' => $this->tabAccess['edit'],
|
||||
));
|
||||
|
||||
$response['html_exta_demands'] = $this->context->smarty->fetch(
|
||||
@@ -1574,6 +1576,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
'serviceProducts' => $serviceProducts,
|
||||
'selectedRoomServiceProduct' => $selectedRoomServiceProduct,
|
||||
'customServiceAllowed' => Configuration::get('PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING'),
|
||||
'can_edit' => $this->tabAccess['edit'],
|
||||
));
|
||||
|
||||
$servicesTpl = $this->context->smarty->fetch(
|
||||
@@ -1589,7 +1592,9 @@ class AdminCartsControllerCore extends AdminController
|
||||
{
|
||||
$response = array('hasError' => false);
|
||||
// Check tab access is allowed to edit
|
||||
if ($this->tabAccess['add'] === 1) {
|
||||
$canAdd = ($this->tabAccess['add'] === 1);
|
||||
$canEdit = ($this->tabAccess['edit'] === 1);
|
||||
if ($canAdd || $canEdit) {
|
||||
$idCartBooking = Tools::getValue('id_hotel_cart_booking');
|
||||
if (Validate::isLoadedObject($objHotelCartBookingData = new HotelCartBookingData($idCartBooking))) {
|
||||
$objCart = new Cart($objHotelCartBookingData->id_cart);
|
||||
@@ -1667,7 +1672,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
))) {
|
||||
$originalPrice = Product::getPriceStatic($idServiceProduct, false);
|
||||
// if price is different than the original service price then update the price
|
||||
if ($operator == 'up' && $originalPrice != $unitPrice) {
|
||||
if ($canEdit && $operator == 'up' && $originalPrice != $unitPrice) {
|
||||
if ($specificPriceInfo = SpecificPrice::getSpecificPrice(
|
||||
(int)$idServiceProduct,
|
||||
0,
|
||||
|
||||
@@ -80,6 +80,9 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$this->_join = 'LEFT JOIN '._DB_PREFIX_.'gender_lang gl ON (a.id_gender = gl.id_gender AND gl.id_lang = '.(int)$this->context->language->id.')';
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'group_lang grl ON (a.id_default_group = grl.id_group AND grl.id_lang = '.(int)$this->context->language->id.')';
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'orders o ON (a.id_customer = o.id_customer)';
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'address ad ON (ad.id_customer = a.id_customer AND ad.deleted = 0)';
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'state adstate ON (adstate.id_state = ad.id_state)';
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'country_lang adcountry ON (adcountry.id_country = ad.id_country AND adcountry.id_lang = '.(int)$this->context->language->id.')';
|
||||
$this->_group = 'GROUP BY a.`id_customer`';
|
||||
|
||||
$this->fields_list = array(
|
||||
@@ -119,6 +122,11 @@ class AdminCustomersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$this->fields_list = array_merge($this->fields_list, array(
|
||||
'phone' => array(
|
||||
'title' => $this->l('Phone'),
|
||||
'filter_key' => 'a!phone',
|
||||
'visible_default' => true,
|
||||
),
|
||||
'default_group_name' => array(
|
||||
'title' => $this->l('Default Group'),
|
||||
'optional' => true,
|
||||
@@ -144,11 +152,82 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'align' => 'text-right',
|
||||
'badge_success' => true
|
||||
),
|
||||
'phone' => array(
|
||||
'title' => $this->l('Phone'),
|
||||
'filter_key' => 'a!phone',
|
||||
'address_company' => array(
|
||||
'title' => $this->l('Company'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'vat_number' => array(
|
||||
'title' => $this->l('VAT number'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'address1' => array(
|
||||
'title' => $this->l('Address'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'search' => false,
|
||||
'orderby' => false,
|
||||
),
|
||||
'address2' => array(
|
||||
'title' => $this->l('Address (2)'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'search' => false,
|
||||
'orderby' => false,
|
||||
),
|
||||
'city' => array(
|
||||
'title' => $this->l('City'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'state' => array(
|
||||
'title' => $this->l('State'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'postcode' => array(
|
||||
'title' => $this->l('Zip/Postal Code'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'country' => array(
|
||||
'title' => $this->l('Country'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'address_phone' => array(
|
||||
'title' => $this->l('Home phone'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'phone_mobile' => array(
|
||||
'title' => $this->l('Mobile phone'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'havingFilter' => true,
|
||||
'orderby' => false,
|
||||
),
|
||||
'dni' => array(
|
||||
'title' => $this->l('Identification Number'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
'search' => false,
|
||||
'orderby' => false,
|
||||
),
|
||||
'active' => array(
|
||||
'title' => $this->l('Enabled'),
|
||||
@@ -171,7 +250,9 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'align' => 'text-center',
|
||||
'type' => 'bool',
|
||||
'callback' => 'printOptinIcon',
|
||||
'orderby' => false
|
||||
'orderby' => false,
|
||||
'optional' => true,
|
||||
'visible_default' => false
|
||||
),
|
||||
'date_add' => array(
|
||||
'title' => $this->l('Registration'),
|
||||
@@ -183,12 +264,15 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'title' => $this->l('Last visit'),
|
||||
'type' => 'datetime',
|
||||
'search' => false,
|
||||
'havingFilter' => true
|
||||
'havingFilter' => true,
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
),
|
||||
'deleted' => array(
|
||||
'title' => $this->l('Banned'),
|
||||
'type' => 'bool',
|
||||
'displayed' => false,
|
||||
'filter_key' => 'a!deleted',
|
||||
'callback' => 'getCustomerStatusLabel',
|
||||
),
|
||||
'order_date' => array(
|
||||
@@ -211,7 +295,11 @@ class AdminCustomersControllerCore extends AdminController
|
||||
WHERE g.id_customer = a.id_customer
|
||||
ORDER BY c.date_add DESC
|
||||
LIMIT 1
|
||||
) as connect';
|
||||
) as connect,
|
||||
ad.company as address_company, ad.vat_number,
|
||||
ad.address1, ad.address2, ad.city, adstate.name as state,
|
||||
ad.postcode, adcountry.name as country, ad.phone as address_phone,
|
||||
ad.phone_mobile, ad.dni';
|
||||
|
||||
// Check if we can add a customer
|
||||
if (Shop::isFeatureActive() && (Shop::getContext() == Shop::CONTEXT_ALL || Shop::getContext() == Shop::CONTEXT_GROUP)) {
|
||||
|
||||
@@ -91,13 +91,22 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
if (($id = Tools::getValue('id_feature')) && Tools::getIsset('viewfeature')) {
|
||||
self::$currentIndex .= '&id_feature='.(int)$id.'&viewfeature';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* AdminController::renderList() override
|
||||
* @see AdminController::renderList()
|
||||
*/
|
||||
public function renderList()
|
||||
{
|
||||
/*$this->addRowAction('view');*//*by webkul*/
|
||||
$this->addRowAction('view');
|
||||
$this->addRowAction('edit');
|
||||
$this->addRowAction('delete');
|
||||
|
||||
@@ -154,7 +163,6 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
);
|
||||
|
||||
$this->_where = sprintf('AND `id_feature` = %d', (int)$id);
|
||||
self::$currentIndex = self::$currentIndex.'&id_feature='.(int)$id.'&viewfeature';
|
||||
$this->processFilter();
|
||||
return parent::renderList();
|
||||
}
|
||||
@@ -322,8 +330,14 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$bread_extended[] = $this->feature_name[$this->context->employee->id_lang];
|
||||
$this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
|
||||
if (!$this->feature_name && ($id = Tools::getValue('id_feature'))) {
|
||||
$obj = new Feature((int)$id);
|
||||
$this->feature_name = $obj->name;
|
||||
}
|
||||
if ($this->feature_name) {
|
||||
$bread_extended[] = $this->feature_name[$this->context->employee->id_lang];
|
||||
$this->addMetaTitle($bread_extended[count($bread_extended) - 1]);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'editFeatureValue':
|
||||
@@ -334,7 +348,7 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if (Validate::isLoadedObject($obj = new FeatureValue((int)Tools::getValue('id_feature_value')))) {
|
||||
$bread_extended[] = sprintf($this->l('Edit: %s'), $obj->value[$this->context->employee->id_lang]);
|
||||
$bread_extended[] = sprintf($this->l('Edit: %s'), $obj->value[$this->context->employee->id_lang]);
|
||||
}
|
||||
} else {
|
||||
$bread_extended[] = $this->l('Edit Value');
|
||||
@@ -549,13 +563,15 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
{
|
||||
$object = parent::processAdd();
|
||||
|
||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) {
|
||||
if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add')) {
|
||||
$this->redirect_after = self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token;
|
||||
if ('feature_value' === $this->table && !count($this->errors)) {
|
||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && ($this->display == 'edit' || $this->display == 'add')) {
|
||||
$this->redirect_after = self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&conf=3&token='.$this->token;
|
||||
} else {
|
||||
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.(int) $object->id.'&conf=3&update'.$this->table.'&token='.$this->token;
|
||||
$this->redirect_after = self::$currentIndex.'&id_feature='.(int)Tools::getValue('id_feature').'&viewfeature&conf=3&token='.$this->token;
|
||||
}
|
||||
} elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors) && $this->table == 'feature_value') { // enter only if feature is submitted
|
||||
} elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) {
|
||||
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.(int) $object->id.'&conf=3&update'.$this->table.'&token='.$this->token;
|
||||
} elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors) && 'feature_value' === $this->table) { // enter only if feature is submitted
|
||||
$this->display = 'editFeatureValue';
|
||||
}
|
||||
|
||||
@@ -570,8 +586,14 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
{
|
||||
$object = parent::processUpdate();
|
||||
|
||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) {
|
||||
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.(int) Tools::getValue('id_feature').'&conf=4&update'.$this->table.'&token='.$this->token;
|
||||
if ('feature_value' === $this->table && !count($this->errors)) {
|
||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) {
|
||||
$this->redirect_after = self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&conf=4&token='.$this->token;
|
||||
} else {
|
||||
$this->redirect_after = self::$currentIndex.'&id_feature='.(int)Tools::getValue('id_feature').'&viewfeature&conf=4&token='.$this->token;
|
||||
}
|
||||
} elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) {
|
||||
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.(int)$object->id.'&conf=4&update'.$this->table.'&token='.$this->token;
|
||||
}
|
||||
|
||||
return $object;
|
||||
@@ -628,24 +650,12 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
$this->errors[] = $this->l('Some error occurred while uploding room feature logo. Please try again.');
|
||||
}
|
||||
}
|
||||
|
||||
if ($featureValues = FeatureValue::getFeatureValuesWithLang(
|
||||
$this->context->language->id,
|
||||
$objFeature->id
|
||||
)) {
|
||||
$objFeatureValue = new FeatureValue($featureValues[0]['id_feature_value']);
|
||||
} else {
|
||||
$objFeatureValue = new FeatureValue();
|
||||
}
|
||||
|
||||
$objFeatureValue->id_feature = $objFeature->id;
|
||||
foreach (Language::getLanguages(true) as $lang) {
|
||||
$objFeatureValue->value[$lang['id_lang']] = $objFeature->id.'.jpg';
|
||||
}
|
||||
$objFeatureValue->save();
|
||||
return $objFeature;
|
||||
}
|
||||
|
||||
return $objFeature;
|
||||
}
|
||||
|
||||
return parent::processSave();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
123
controllers/admin/AdminGuestRegistrationController.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3.0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
class AdminGuestRegistrationControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'configuration';
|
||||
$this->className = 'Configuration';
|
||||
$this->identifier = 'id_configuration';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->display = 'view';
|
||||
$this->initToolbar();
|
||||
parent::initContent();
|
||||
}
|
||||
|
||||
public function renderView()
|
||||
{
|
||||
$grcInfoJson = Configuration::get('QLO_GUEST_REGISTRATION_CARD_INFO');
|
||||
$savedSections = array();
|
||||
if ($grcInfoJson !== false && $grcInfoJson !== '') {
|
||||
$grcData = Tools::jsonDecode($grcInfoJson, true);
|
||||
if (is_array($grcData)) {
|
||||
$savedSections = $grcData;
|
||||
}
|
||||
}
|
||||
|
||||
$allSelected = empty($savedSections);
|
||||
$nodes = array();
|
||||
$objHotelBookingDetail = new HotelBookingDetail();
|
||||
foreach ($objHotelBookingDetail->getRegistrationCardInfo() as $sectionId => $section) {
|
||||
$sectionFields = isset($savedSections[$sectionId]) ? $savedSections[$sectionId] : array();
|
||||
$fieldNodes = array();
|
||||
foreach ($section['fields'] as $fieldId => $fieldName) {
|
||||
$fieldSelected = $allSelected || in_array($fieldId, $sectionFields);
|
||||
$fieldNodes[] = array(
|
||||
'value' => $fieldId,
|
||||
'name' => $fieldName,
|
||||
'input_name' => 'grc_field_'.$sectionId,
|
||||
'selected' => $fieldSelected,
|
||||
);
|
||||
}
|
||||
$fieldsSelected = $allSelected || !empty(array_filter($fieldNodes, function ($n) { return $n['selected']; }));
|
||||
$nodes[] = array(
|
||||
'value' => $sectionId,
|
||||
'name' => $section['name'],
|
||||
'input_name' => 'grc_section',
|
||||
'selected' => $fieldsSelected,
|
||||
'children' => $fieldNodes,
|
||||
);
|
||||
}
|
||||
|
||||
$tree = new HelperTree('grc-card-info-tree');
|
||||
$tree->setData($nodes)
|
||||
->setUseCheckBox(true)
|
||||
->setAutoSelectChildren(true)
|
||||
->setUseBulkActions(true);
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'guest_reg_card_info_tree' => $tree->render(),
|
||||
'guest_reg_card_form_action' => self::$currentIndex.'&token='.$this->token,
|
||||
'guest_reg_card_preview_img_url' => $this->context->link->getBaseLink().'img/admin/guest_registration_preview.jpg',
|
||||
'guest_reg_card_preview_title' => $this->l('Guest Registration Card Preview'),
|
||||
));
|
||||
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$this->toolbar_title = array($this->l('Guest Registration Card'));
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if (Tools::isSubmit('submitGrcCardInfo')) {
|
||||
$grcInfo = array();
|
||||
$objHotelBookingDetail = new HotelBookingDetail();
|
||||
foreach (array_keys($objHotelBookingDetail->getRegistrationCardInfo()) as $sectionId) {
|
||||
$fields = array_values(array_filter(array_map('intval', (array)Tools::getValue('grc_field_'.$sectionId, array()))));
|
||||
if (!empty($fields)) {
|
||||
$grcInfo[$sectionId] = $fields;
|
||||
}
|
||||
}
|
||||
if (empty($grcInfo)) {
|
||||
$this->errors[] = $this->l('Please select at least one field for the Guest Registration Card.');
|
||||
return;
|
||||
}
|
||||
Configuration::updateValue('QLO_GUEST_REGISTRATION_CARD_INFO', Tools::jsonEncode($grcInfo));
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&conf=4');
|
||||
return;
|
||||
}
|
||||
|
||||
parent::postProcess();
|
||||
}
|
||||
}
|
||||
@@ -3326,7 +3326,7 @@ class AdminImportControllerCore extends AdminController
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_image`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_access`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_booking_detail`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_branch_features`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_branch_amenity`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_cart_booking_data`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_branch_refund_rules`');
|
||||
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'htl_order_restrict_date`');
|
||||
|
||||
@@ -484,6 +484,22 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$objHotelAdvancedPayment = new HotelAdvancedPayment();
|
||||
$adminCartsAccess = Profile::getProfileAccess(
|
||||
(int) $this->context->employee->id_profile,
|
||||
(int) Tab::getIdFromClassName('AdminCarts')
|
||||
);
|
||||
$adminCustomersAccess = Profile::getProfileAccess(
|
||||
(int) $this->context->employee->id_profile,
|
||||
(int) Tab::getIdFromClassName('AdminCustomers')
|
||||
);
|
||||
$adminCartRulesAccess = Profile::getProfileAccess(
|
||||
(int) $this->context->employee->id_profile,
|
||||
(int) Tab::getIdFromClassName('AdminCartRules')
|
||||
);
|
||||
$adminAddressesAccess = Profile::getProfileAccess(
|
||||
(int) $this->context->employee->id_profile,
|
||||
(int) Tab::getIdFromClassName('AdminAddresses')
|
||||
);
|
||||
$this->context->smarty->assign(array(
|
||||
'order_total' => $cart->getOrderTotal(true),
|
||||
'is_advance_payment_active' => $objHotelAdvancedPayment->isAdvancePaymentAvailableForCurrentCart(),
|
||||
@@ -497,6 +513,11 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'payment_types' => $paymentTypes,
|
||||
'PAYMENT_TYPE_PAY_AT_HOTEL' => OrderPayment::PAYMENT_TYPE_PAY_AT_HOTEL,
|
||||
'currency' => new Currency((int)$cart->id_currency),
|
||||
'can_edit_booking_carts' => (!empty($adminCartsAccess['edit']) && (int) $adminCartsAccess['edit'] === 1),
|
||||
'can_add_customers' => (!empty($adminCustomersAccess['add']) && (int) $adminCustomersAccess['add'] === 1),
|
||||
'can_add_vouchers' => (!empty($adminCartRulesAccess['add']) && (int) $adminCartRulesAccess['add'] === 1),
|
||||
'can_add_addresses' => (!empty($adminAddressesAccess['add']) && (int) $adminAddressesAccess['add'] === 1),
|
||||
'max_child_in_room' => Configuration::get('WK_GLOBAL_MAX_CHILD_IN_ROOM'),
|
||||
'max_child_age' => Configuration::get('WK_GLOBAL_CHILD_MAX_AGE'),
|
||||
'occupancy_required_for_booking' => $occupancyRequiredForBooking,
|
||||
));
|
||||
|
||||
@@ -64,6 +64,15 @@ class AdminPdfControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function processGenerateGuestRegistrationFormPDF()
|
||||
{
|
||||
if (Tools::isSubmit('id_hotel_booking_detail')) {
|
||||
$this->generateGuestRegistrationFormPDF((int)Tools::getValue('id_hotel_booking_detail'));
|
||||
} else {
|
||||
die(Tools::displayError('The hotel booking detail ID is missing.'));
|
||||
}
|
||||
}
|
||||
|
||||
public function processGenerateBookingVoucherPDF()
|
||||
{
|
||||
if (Tools::isSubmit('id_order')) {
|
||||
@@ -234,6 +243,17 @@ class AdminPdfControllerCore extends AdminController
|
||||
$this->generatePDF($order_invoice, PDF::TEMPLATE_INVOICE);
|
||||
}
|
||||
|
||||
public function generateGuestRegistrationFormPDF($idHotelBookingDetail)
|
||||
{
|
||||
$idHotelBookingDetail = (int)$idHotelBookingDetail;
|
||||
if (!$idHotelBookingDetail || !Validate::isLoadedObject(new HotelBookingDetail($idHotelBookingDetail))) {
|
||||
die(Tools::displayError('The hotel booking cannot be found within your database.'));
|
||||
}
|
||||
|
||||
$pdf = new PDF($idHotelBookingDetail, PDF::TEMPLATE_GUEST_REGISTRATION_FORM, Context::getContext()->smarty);
|
||||
$pdf->render('I');
|
||||
}
|
||||
|
||||
public function generateBookingVoucherPDFByIdOrder($id_order)
|
||||
{
|
||||
$order = new Order((int)$id_order);
|
||||
|
||||
@@ -195,6 +195,19 @@ class AdminPreferencesControllerCore extends AdminController
|
||||
'class' => 'fixed-width-xl',
|
||||
'desc' => sprintf($this->l('If set to 0, the maximum limit will be %d characters.'), Configuration::PS_SHORT_DESC_LIMIT)
|
||||
),
|
||||
'PS_EXPORT_FIELDS_TYPE' => array(
|
||||
'title' => $this->l('CSV export fields'),
|
||||
'desc' => $this->l('Choose whether list CSV exports include all fields, or only the fields currently checked in the "Available Fields" selector of the list being exported.'),
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'list' => array(
|
||||
array('id' => HelperList::QLO_EXPORT_FIELDS_ALL, 'name' => $this->l('All Fields')),
|
||||
array('id' => HelperList::QLO_EXPORT_FIELDS_SELECTED, 'name' => $this->l('Selected Fields')),
|
||||
),
|
||||
'identifier' => 'id',
|
||||
'defaultValue' => HelperList::QLO_EXPORT_FIELDS_ALL,
|
||||
),
|
||||
// 'PS_DISPLAY_SUPPLIERS' => array(
|
||||
// 'title' => $this->l('Display suppliers and manufacturers'),
|
||||
// 'desc' => $this->l('Enable suppliers and manufacturers pages on your front office even when their respective modules are disabled.'),
|
||||
|
||||
@@ -107,6 +107,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
'Images' => $this->l('Images'),
|
||||
'ServiceProduct' => $this->l('Service Products'),
|
||||
// 'Associations' => $this->l('Associations'),
|
||||
'Amenities' => $this->l('Amenities'),
|
||||
'Features' => $this->l('Features'),
|
||||
'Configuration' => $this->l('Rooms'),
|
||||
'Occupancy' => $this->l('Occupancy'),
|
||||
@@ -121,9 +122,10 @@ class AdminProductsControllerCore extends AdminController
|
||||
'Seo' => 2,
|
||||
// 'Associations' => 3,
|
||||
'Images' => 4,
|
||||
'Features' => 5,
|
||||
'Configuration' => 6,
|
||||
'Occupancy' => 7,
|
||||
'Amenities' => 5,
|
||||
'Features' => 6,
|
||||
'Configuration' => 7,
|
||||
'Occupancy' => 8,
|
||||
'ServiceProduct' => 9,
|
||||
'LengthOfStay' => 10,
|
||||
'AdditionalFacilities' => 11,
|
||||
@@ -944,12 +946,6 @@ class AdminProductsControllerCore extends AdminController
|
||||
$id_hotel_new = $room_type_info['id_hotel'];
|
||||
}
|
||||
|
||||
$objHotelRoomTypeBedType = new HotelRoomTypeBedType();
|
||||
if ($roomTypeBedTypes = $objHotelRoomTypeBedType->getRoomTypeBedTypes($id_product_old)) {
|
||||
$roomTypeBedTypes = array_column($roomTypeBedTypes, 'id_bed_type');
|
||||
$objHotelRoomTypeBedType->updateRoomTypeBedTypes($roomTypeBedTypes, $product->id);
|
||||
}
|
||||
|
||||
if ($product->hasAttributes()) {
|
||||
Product::updateDefaultAttribute($product->id);
|
||||
} else {
|
||||
@@ -1143,34 +1139,45 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) {
|
||||
// delete all objects
|
||||
$product->deleteFeatures();
|
||||
|
||||
// add new objects
|
||||
$languages = Language::getLanguages(false);
|
||||
foreach ($_POST as $key => $val) {
|
||||
if (preg_match('/^feature_([0-9]+)_check/i', $key, $match)) {
|
||||
if ($val) {
|
||||
$product->addFeaturesToDB($match[1], $val);
|
||||
} else {
|
||||
if ($default_value = $this->checkFeatures($languages, $match[1])) {
|
||||
$id_value = $product->addFeaturesToDB($match[1], 0, 1);
|
||||
foreach ($languages as $language) {
|
||||
if ($cust = Tools::getValue('custom_'.$match[1].'_'.(int)$language['id_lang'])) {
|
||||
$product->addFeaturesCustomToDB($id_value, (int)$language['id_lang'], $cust);
|
||||
} else {
|
||||
$product->addFeaturesCustomToDB($id_value, (int)$language['id_lang'], $default_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$this->saveRoomTypeFeatures($product)) {
|
||||
$this->errors[] = Tools::displayError('An error occurred while saving room type features.');
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('A room type must be created before adding features.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save assigned core feature values for a room type.
|
||||
*
|
||||
* @param Product $product
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function saveRoomTypeFeatures(Product $product)
|
||||
{
|
||||
$product->deleteFeatures();
|
||||
|
||||
$featureValues = Tools::getValue('feature_values', array());
|
||||
if (!is_array($featureValues) || empty($featureValues)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach ($featureValues as $idFeature => $selectedValues) {
|
||||
$idFeature = (int)$idFeature;
|
||||
if (!$idFeature) {
|
||||
continue;
|
||||
}
|
||||
foreach (array_unique(array_map('intval', $selectedValues)) as $idFeatureValue) {
|
||||
if ($idFeatureValue) {
|
||||
$product->addFeaturesToDB($idFeature, $idFeatureValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is never called at the moment (specific prices cannot be edited)
|
||||
*/
|
||||
@@ -1925,14 +1932,29 @@ class AdminProductsControllerCore extends AdminController
|
||||
$this->copyFromPost($this->object, $this->table);
|
||||
$this->object->booking_product = true;
|
||||
if ($this->object->add()) {
|
||||
$objHotelRoomTypeBedType = new HotelRoomTypeBedType();
|
||||
$objHotelRoomTypeBedType->updateRoomTypeBedTypes(Tools::getValue('id_bed_types'), $this->object->id);
|
||||
// associateroom type to hotel
|
||||
// if ($this->object->is_virtual) {
|
||||
|
||||
// }
|
||||
|
||||
$this->assignRoomType($this->object);
|
||||
if ($this->isTabSubmitted('Amenities')) {
|
||||
$categories = HotelAmenities::getCategories();
|
||||
if ($categories && !HotelAmenities::getAmenities()) {
|
||||
$this->errors[] = Tools::displayError('No amenities have been created. Please add amenities to at least one category before assigning them.');
|
||||
return false;
|
||||
}
|
||||
$selectedAmenities = Tools::getValue('room_type_amenities', array());
|
||||
$featuredAmenities = Tools::getValue('featured_amenities', array());
|
||||
if (!(new HotelRoomTypeAmenities())->saveRoomTypeAmenities((int)$this->object->id, $selectedAmenities, $featuredAmenities)) {
|
||||
$this->errors[] = Tools::displayError('An error occurred while saving room type amenities.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ($this->isTabSubmitted('Features') && !$this->saveRoomTypeFeatures($this->object)) {
|
||||
$this->errors[] = Tools::displayError('An error occurred while saving room type features.');
|
||||
return false;
|
||||
}
|
||||
|
||||
PrestaShopLogger::addLog(sprintf($this->l('%s addition', 'AdminTab', false, false), $this->className), 1, null, $this->className, (int)$this->object->id, true, (int)$this->context->employee->id);
|
||||
|
||||
@@ -2175,8 +2197,18 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if ($object->update()) {
|
||||
$objHotelRoomTypeBedType = new HotelRoomTypeBedType();
|
||||
$objHotelRoomTypeBedType->updateRoomTypeBedTypes(Tools::getValue('id_bed_types'), $object->id);
|
||||
if ($this->isTabSubmitted('Amenities')) {
|
||||
$selectedAmenities = Tools::getValue('room_type_amenities', array());
|
||||
$featuredAmenities = Tools::getValue('featured_amenities', array());
|
||||
if (!(new HotelRoomTypeAmenities())->saveRoomTypeAmenities((int)$object->id, $selectedAmenities, $featuredAmenities)) {
|
||||
$this->errors[] = Tools::displayError('An error occurred while saving room type amenities.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ($this->isTabSubmitted('Features') && !$this->saveRoomTypeFeatures($object)) {
|
||||
$this->errors[] = Tools::displayError('An error occurred while saving room type features.');
|
||||
return false;
|
||||
}
|
||||
|
||||
// update position in category
|
||||
$object->setPositionInCategory(Tools::getValue('category_position'));
|
||||
@@ -2200,9 +2232,6 @@ class AdminProductsControllerCore extends AdminController
|
||||
if ($this->isTabSubmitted('Suppliers')) {
|
||||
// $this->processSuppliers();
|
||||
}
|
||||
if ($this->isTabSubmitted('Features')) {
|
||||
$this->processFeatures();
|
||||
}
|
||||
if ($this->isTabSubmitted('Combinations')) {
|
||||
$this->processProductAttribute();
|
||||
}
|
||||
@@ -4601,15 +4630,6 @@ class AdminProductsControllerCore extends AdminController
|
||||
$data->assign('htl_full_info', $hotelFullInfo);
|
||||
}
|
||||
|
||||
$objHotelBedType = new HotelBedType();
|
||||
$bedTypes = $objHotelBedType->getAllBedTypes($this->context->language->id);
|
||||
$data->assign('bed_types_info', $bedTypes);
|
||||
$objHotelRoomTypeBedType = new HotelRoomTypeBedType();
|
||||
if ($selectedBedTypes = $objHotelRoomTypeBedType->getRoomTypeBedTypes($product->id)) {
|
||||
$selectedBedTypes = array_column($selectedBedTypes, 'id_bed_type');
|
||||
$data->assign('selected_bed_types', $selectedBedTypes);
|
||||
}
|
||||
|
||||
$this->tpl_form_vars['product'] = $product;
|
||||
$this->tpl_form_vars['custom_form'] = $data->fetch();
|
||||
}
|
||||
@@ -4851,37 +4871,17 @@ class AdminProductsControllerCore extends AdminController
|
||||
} else {
|
||||
if ($obj->id) {
|
||||
if ($this->product_exists_in_shop) {
|
||||
$features = Feature::getFeatures($this->context->language->id, (Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP));
|
||||
|
||||
foreach ($features as $k => $tab_features) {
|
||||
$features[$k]['current_item'] = false;
|
||||
$features[$k]['val'] = array();
|
||||
|
||||
$custom = true;
|
||||
foreach ($obj->getFeatures() as $tab_products) {
|
||||
if ($tab_products['id_feature'] == $tab_features['id_feature']) {
|
||||
$features[$k]['current_item'] = $tab_products['id_feature_value'];
|
||||
}
|
||||
}
|
||||
|
||||
$features[$k]['featureValues'] = FeatureValue::getFeatureValuesWithLang($this->context->language->id, (int)$tab_features['id_feature']);
|
||||
if (count($features[$k]['featureValues'])) {
|
||||
foreach ($features[$k]['featureValues'] as $value) {
|
||||
if ($features[$k]['current_item'] == $value['id_feature_value']) {
|
||||
$custom = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($custom) {
|
||||
$feature_values_lang = FeatureValue::getFeatureValueLang($features[$k]['current_item']);
|
||||
foreach ($feature_values_lang as $feature_value) {
|
||||
$features[$k]['val'][$feature_value['id_lang']] = $feature_value;
|
||||
}
|
||||
}
|
||||
$features = Product::getRoomTypeFeatureTreeData($obj->id);
|
||||
if ($features) {
|
||||
$tree = new HelperTree('room-type-features-tree', $features);
|
||||
$tree->setShowCollapseExpandButton(true)
|
||||
->setUseCheckBox(true)
|
||||
->setAutoSelectChildren(true)
|
||||
->setUseBulkActions(true)
|
||||
->setUseSearch(true)
|
||||
->setHeaderTemplate('tree_header_room.tpl');
|
||||
$data->assign('room_type_features_tree', $tree->render());
|
||||
}
|
||||
|
||||
$data->assign('available_features', $features);
|
||||
$data->assign('product', $obj);
|
||||
$data->assign('link', $this->context->link);
|
||||
$data->assign('default_form_language', $this->default_form_language);
|
||||
@@ -4895,6 +4895,50 @@ class AdminProductsControllerCore extends AdminController
|
||||
$this->tpl_form_vars['custom_form'] = $data->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the amenities form tab for a room type.
|
||||
*
|
||||
* @param Product $obj
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws SmartyException
|
||||
*/
|
||||
public function initFormAmenities($obj)
|
||||
{
|
||||
if (!$this->default_form_language) {
|
||||
$this->getLanguages();
|
||||
}
|
||||
|
||||
$data = $this->createTemplate($this->tpl_form);
|
||||
$data->assign('default_form_language', $this->default_form_language);
|
||||
$data->assign('languages', $this->_languages);
|
||||
$data->assign('link', $this->context->link);
|
||||
$data->assign('product', $obj);
|
||||
|
||||
if ($obj->id) {
|
||||
if ($this->product_exists_in_shop) {
|
||||
$roomTypeAmenities = HotelRoomTypeAmenities::getRoomTypeAmenitiesTreeData((int) $obj->id);
|
||||
if ($roomTypeAmenities) {
|
||||
$tree = new HelperTree('room-type-amenities-tree', $roomTypeAmenities);
|
||||
$tree->setShowCollapseExpandButton(true)
|
||||
->setUseCheckBox(true)
|
||||
->setAutoSelectChildren(true)
|
||||
->setUseBulkActions(true)
|
||||
->setUseSearch(true)
|
||||
->setHeaderTemplate('tree_header_room.tpl');
|
||||
$data->assign('room_type_amenities_tree', $tree->render());
|
||||
$data->assign('featured_amenity_ids', array_column(HotelRoomTypeAmenities::getAmenities((int)$obj->id, 0, true), 'id'));
|
||||
}
|
||||
} else {
|
||||
$this->displayWarning($this->l('You must save the room type in this shop before adding amenities.'));
|
||||
}
|
||||
} else {
|
||||
$this->displayWarning($this->l('You must save this room type before adding amenities.'));
|
||||
}
|
||||
|
||||
$this->tpl_form_vars['custom_form'] = $data->fetch();
|
||||
}
|
||||
|
||||
public function getModalDuplicateOptions()
|
||||
{
|
||||
$idsHotel = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 1);
|
||||
|
||||
@@ -38,7 +38,7 @@ class AdminSearchControllerCore extends AdminController
|
||||
'AdminOrderRefundRules' => 1,
|
||||
'AdminRoomTypeGlobalDemand' => 1,
|
||||
'AdminGroups' => 1,
|
||||
'AdminHotelFeatures' => 1,
|
||||
'AdminHotelAmenities' => 1,
|
||||
'AdminCustomers' => 1,
|
||||
'AdminAddHotel' => 1,
|
||||
'AdminNormalProducts' => 1,
|
||||
@@ -190,7 +190,7 @@ class AdminSearchControllerCore extends AdminController
|
||||
|
||||
if (!$searchType) {
|
||||
$this->searchAddress();
|
||||
$this->searchHotelFeatures();
|
||||
$this->searchHotelAmenities();
|
||||
$this->searchAdditionalFacilities();
|
||||
$this->searchRefundRules();
|
||||
}
|
||||
@@ -428,23 +428,23 @@ class AdminSearchControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function searchHotelFeatures()
|
||||
public function searchHotelAmenities()
|
||||
{
|
||||
if (class_exists('HotelFeatures')) {
|
||||
if (isset($this->controllerAccess['AdminHotelFeatures']) && $this->controllerAccess['AdminHotelFeatures']) {
|
||||
$objHotelFeatures = new HotelFeatures();
|
||||
if ($hotelFeatures = $objHotelFeatures->searchByName($this->query, $this->context->language->id)) {
|
||||
$features = array();
|
||||
foreach ($hotelFeatures as $key => $hotelFeature) {
|
||||
$features[$hotelFeature['id']]['name'] = $hotelFeature['name'];
|
||||
if ($hotelFeature['parent_feature_id']) {
|
||||
$features[$hotelFeature['id']]['id'] = $hotelFeature['parent_feature_id'];
|
||||
if (class_exists('HotelAmenities')) {
|
||||
if (isset($this->controllerAccess['AdminHotelAmenities']) && $this->controllerAccess['AdminHotelAmenities']) {
|
||||
$objHotelAmenities = new HotelAmenities();
|
||||
if ($hotelAmenities = $objHotelAmenities->searchByName($this->query, $this->context->language->id)) {
|
||||
$amenities = array();
|
||||
foreach ($hotelAmenities as $key => $hotelAmenity) {
|
||||
$amenities[$hotelAmenity['id_amenity']]['name'] = $hotelAmenity['name'];
|
||||
if ($hotelAmenity['id_parent']) {
|
||||
$amenities[$hotelAmenity['id_amenity']]['id'] = $hotelAmenity['id_parent'];
|
||||
} else {
|
||||
$features[$hotelFeature['id']]['id'] = $hotelFeature['id'];
|
||||
$amenities[$hotelAmenity['id_amenity']]['id'] = $hotelAmenity['id_amenity'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->_list['hotel_features'] = $features;
|
||||
$this->_list['hotel_amenities'] = $amenities;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -681,10 +681,10 @@ class AdminSearchControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
protected function initHotelFeatureList()
|
||||
protected function initHotelAmenityList()
|
||||
{
|
||||
$this->show_toolbar = false;
|
||||
$this->fields_list['hotel_features'] = array(
|
||||
$this->fields_list['hotel_amenities'] = array(
|
||||
'name' => array('title' => $this->l('name'), 'width' => 'auto'),
|
||||
);
|
||||
}
|
||||
@@ -929,26 +929,26 @@ class AdminSearchControllerCore extends AdminController
|
||||
$this->tpl_view_vars['customers'] = $view;
|
||||
}
|
||||
|
||||
if (isset($this->_list['hotel_features']) && count($this->_list['hotel_features'])) {
|
||||
if (isset($this->_list['hotel_amenities']) && count($this->_list['hotel_amenities'])) {
|
||||
$view = '';
|
||||
$this->initHotelFeatureList();
|
||||
$this->initHotelAmenityList();
|
||||
|
||||
$helper = new HelperList();
|
||||
$helper->shopLinkType = '';
|
||||
$helper->simple_header = true;
|
||||
$helper->identifier = 'id';
|
||||
$helper->identifier = 'id_amenity';
|
||||
$helper->actions = array('edit', 'view');
|
||||
$helper->show_toolbar = false;
|
||||
$helper->table = 'htl_features';
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminHotelFeatures', false);
|
||||
$helper->token = Tools::getAdminTokenLite('AdminHotelFeatures');
|
||||
$helper->table = 'htl_amenity';
|
||||
$helper->currentIndex = $this->context->link->getAdminLink('AdminHotelAmenities', false);
|
||||
$helper->token = Tools::getAdminTokenLite('AdminHotelAmenities');
|
||||
|
||||
if ($this->_list['hotel_features']) {
|
||||
$view = $helper->generateList($this->_list['hotel_features'], $this->fields_list['hotel_features']);
|
||||
if ($this->_list['hotel_amenities']) {
|
||||
$view = $helper->generateList($this->_list['hotel_amenities'], $this->fields_list['hotel_amenities']);
|
||||
}
|
||||
|
||||
$this->tpl_view_vars['num_hotel_features'] = count($this->_list['hotel_features']);
|
||||
$this->tpl_view_vars['hotel_features'] = $view;
|
||||
$this->tpl_view_vars['num_hotel_amenities'] = count($this->_list['hotel_amenities']);
|
||||
$this->tpl_view_vars['hotel_amenities'] = $view;
|
||||
}
|
||||
if (isset($this->_list['groups']) && count($this->_list['groups'])) {
|
||||
$view = '';
|
||||
|
||||
@@ -92,37 +92,45 @@ class CategoryControllerCore extends FrontController
|
||||
public function init()
|
||||
{
|
||||
// Get category ID
|
||||
$id_category = (int)Tools::getValue('id_category');
|
||||
if (!$id_category || !Validate::isUnsignedId($id_category)) {
|
||||
$this->errors[] = Tools::displayError('Missing category ID');
|
||||
}
|
||||
$idCategory = (int) Tools::getValue('id_category');
|
||||
$this->category = new Category($idCategory, $this->context->language->id);
|
||||
|
||||
// validate dates if available
|
||||
$dateFrom = Tools::getValue('date_from');
|
||||
$dateTo = Tools::getValue('date_to');
|
||||
$idHotel = HotelBranchInformation::getHotelIdByIdCategory($id_category);
|
||||
if (!HotelHelper::validateDateRangeForHotel($dateFrom, $dateTo, $idHotel)) {
|
||||
$idHotel = HotelBranchInformation::getHotelIdByIdCategory($idCategory);
|
||||
|
||||
if (!$idCategory || !Validate::isUnsignedId($idCategory)) {
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
}
|
||||
|
||||
// Instantiate category
|
||||
$this->category = new Category($id_category, $this->context->language->id);
|
||||
|
||||
parent::init();
|
||||
|
||||
// Check if the category is active and return 404 error if is disable.
|
||||
if (!$this->category->active || !Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop() || in_array($this->category->id, array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')))) {
|
||||
header('HTTP/1.1 404 Not Found');
|
||||
header('Status: 404 Not Found');
|
||||
} elseif (!Validate::isLoadedObject($this->category) || !$this->category->active) {
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
} else
|
||||
// Check if category can be accessible by current customer and return 403 if not
|
||||
if (!$this->category->checkAccess($this->context->customer->id)) {
|
||||
} elseif ($idHotel && !(new HotelBranchInformation())->hotelBranchInfoByCategoryId($idCategory)) {
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
} elseif ($idHotel && !HotelHelper::validateDateRangeForHotel($dateFrom, $dateTo, $idHotel)) {
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
} else {
|
||||
parent::init();
|
||||
|
||||
if (
|
||||
!$this->category->inShop()
|
||||
|| !$this->category->isAssociatedToShop()
|
||||
|| in_array(
|
||||
$this->category->id,
|
||||
array(
|
||||
Configuration::get('PS_HOME_CATEGORY'),
|
||||
Configuration::get('PS_ROOT_CATEGORY')
|
||||
)
|
||||
)
|
||||
) {
|
||||
header('HTTP/1.1 404 Not Found');
|
||||
header('Status: 404 Not Found');
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
} elseif (!$this->category->checkAccess($this->context->customer->id)) {
|
||||
header('HTTP/1.1 403 Forbidden');
|
||||
header('Status: 403 Forbidden');
|
||||
$this->errors[] = Tools::displayError('You do not have access to this category.');
|
||||
$this->customer_access = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,14 +138,15 @@ class CategoryControllerCore extends FrontController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
if (!$this->customer_access) {
|
||||
$this->display_column_left = false;
|
||||
$this->display_column_right = false;
|
||||
}
|
||||
|
||||
parent::initContent();
|
||||
|
||||
$this->setTemplate(_PS_THEME_DIR_.'category.tpl');
|
||||
|
||||
if (!$this->customer_access) {
|
||||
return;
|
||||
}
|
||||
|
||||
$id_category = Tools::getValue('id_category');
|
||||
|
||||
$displayAllRoomsTypes = false;
|
||||
@@ -236,7 +245,6 @@ class CategoryControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
$feat_img_dir = _PS_IMG_.'rf/';
|
||||
$ratting_img = _MODULE_DIR_.'hotelreservationsystem/views/img/Slices/icons-sprite.png';
|
||||
$this->context->smarty->assign(array(
|
||||
'warning_num' => $warning_num,
|
||||
@@ -249,7 +257,7 @@ class CategoryControllerCore extends FrontController
|
||||
'display_all_room_types' => $displayAllRoomsTypes,
|
||||
'id_hotel' => $id_hotel,
|
||||
'currency' => $currency,
|
||||
'feat_img_dir' => $feat_img_dir,
|
||||
'amenity_img_dir' => _MODULE_DIR_.'hotelreservationsystem/views/img/hotel_amenities/',
|
||||
'ratting_img' => $ratting_img,
|
||||
));
|
||||
|
||||
|
||||
@@ -523,8 +523,18 @@ class OrderDetailControllerCore extends FrontController
|
||||
{
|
||||
$response = array('extra_demands' => false);
|
||||
|
||||
$idOrder = (int) Tools::getValue('id_order');
|
||||
$order = new Order($idOrder);
|
||||
|
||||
if (!Validate::isLoadedObject($order)
|
||||
|| $order->id_customer != $this->context->customer->id
|
||||
|| $order->secure_key != Tools::getValue('secure_key')
|
||||
) {
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
if (($idProduct = Tools::getValue('id_product'))
|
||||
&& ($idOrder = Tools::getValue('id_order'))
|
||||
&& $idOrder
|
||||
&& ($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
) {
|
||||
@@ -568,7 +578,7 @@ class OrderDetailControllerCore extends FrontController
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'objOrder' => new Order($idOrder),
|
||||
'objOrder' => $order,
|
||||
));
|
||||
|
||||
$response['extra_demands'] = $this->context->smarty->fetch(_PS_THEME_DIR_.'_partials/order-extra-services.tpl');
|
||||
|
||||
@@ -126,6 +126,12 @@ class ProductControllerCore extends FrontController
|
||||
$objHotelRoomType = new HotelRoomType();
|
||||
if ($hotelRoomInfo = $objHotelRoomType->getRoomTypeInfoByIdProduct($this->product->id)) {
|
||||
$idHotel = (int) $hotelRoomInfo['id_hotel'];
|
||||
|
||||
// If the hotel this room type belongs to is disabled, redirect to home page
|
||||
if (!(new HotelBranchInformation())->hotelBranchesInfo(false, 1, 0, $idHotel)) {
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
}
|
||||
|
||||
if (!HotelHelper::validateDateRangeForHotel($dateFrom, $dateTo, $idHotel)) {
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
}
|
||||
@@ -346,12 +352,12 @@ class ProductControllerCore extends FrontController
|
||||
$hotel_location = $addressInfo['city'].
|
||||
($addressInfo['id_state']?', '.$addressInfo['state']:'').', '.$addressInfo['country'];
|
||||
|
||||
$obj_hotel_feaures_ids = $obj_hotel_branch->getFeaturesOfHotelByHotelId($hotel_id);
|
||||
$obj_hotel_amenities_ids = $obj_hotel_branch->getAmenitiesOfHotelByHotelId($hotel_id);
|
||||
|
||||
if (isset($obj_hotel_feaures_ids) && $obj_hotel_feaures_ids) {
|
||||
foreach ($obj_hotel_feaures_ids as $key => $value) {
|
||||
$obj_htl_ftr = new HotelFeatures();
|
||||
$htl_info = $obj_htl_ftr->getFeatureInfoById($value['feature_id']);
|
||||
if (isset($obj_hotel_amenities_ids) && $obj_hotel_amenities_ids) {
|
||||
foreach ($obj_hotel_amenities_ids as $key => $value) {
|
||||
$obj_htl_amenity = new HotelAmenities();
|
||||
$htl_info = $obj_htl_amenity->getAmenityInfoById($value['amenity_id']);
|
||||
$htl_features[] = $htl_info['name'];
|
||||
}
|
||||
}
|
||||
@@ -409,19 +415,9 @@ class ProductControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
$objHotelBedType = new HotelBedType();
|
||||
if ($bedTypes = $objHotelBedType->getAllBedTypes($this->context->language->id)) {
|
||||
foreach ($bedTypes as $bedTypeKey => $bedType) {
|
||||
$bedTypes[$bedTypeKey]['area'] = Tools::ps_round($bedType['width'], 2).' * '.Tools::ps_round($bedType['length'], 2);
|
||||
}
|
||||
|
||||
$bedTypes = array_column($bedTypes, null, 'id_bed_type');
|
||||
}
|
||||
|
||||
$objHotelRoomTypeBedType = new HotelRoomTypeBedType();
|
||||
if ($selectedBedTypes = $objHotelRoomTypeBedType->getRoomTypeBedTypes($this->product->id)) {
|
||||
$selectedBedTypes = array_column($selectedBedTypes, 'id_bed_type');
|
||||
}
|
||||
$roomFeatures = $this->product->getFrontFeatures($this->context->language->id);
|
||||
$roomAmenities = HotelRoomTypeAmenities::getAmenities($this->product->id, $this->context->language->id);
|
||||
$hotelAmenities = HotelBranchAmenities::getAmenities($hotel_id, $this->context->language->id);
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
@@ -449,14 +445,14 @@ class ProductControllerCore extends FrontController
|
||||
'hotel_description' => $hotel_info_by_id['description'],
|
||||
'hotel_policies' => $hotel_policies,
|
||||
'hotel_features' => $htl_features,
|
||||
'room_type_features' => $roomFeatures,
|
||||
'room_dynamic_amenities' => $roomAmenities,
|
||||
'hotel_dynamic_amenities' => $hotelAmenities,
|
||||
'amenity_img_dir' => _MODULE_DIR_.'hotelreservationsystem/views/img/hotel_amenities/',
|
||||
'hotel_image_link' => $hotelImageLink,
|
||||
'hotel_has_images' => (bool) HotelImage::getCover($hotel_id),
|
||||
'ftr_img_src' => _PS_IMG_.'rf/',
|
||||
'order_date_restrict' => $order_date_restrict,
|
||||
'PS_SERVICE_PRODUCT_CATEGORY_FILTER' => Configuration::get('PS_SERVICE_PRODUCT_CATEGORY_FILTER'),
|
||||
'bed_types_info' => $bedTypes,
|
||||
'selected_bed_types' => $selectedBedTypes,
|
||||
'dimension_unit' => Configuration::get('WK_DIMENSION_UNIT', $this->context->language->id),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
8744
docs/CHANGELOG.txt
@@ -1,17 +0,0 @@
|
||||
Adress ID;Alias*;Active (0/1);Customer e-mail*;Customer ID;Manufacturer;Supplier;Company;Lastname*;Firstname*;Address 1*;Address 2;Zipcode*;City*;Country*;State;Other;Phone;Mobile Phone;VAT number;DNI
|
||||
1;Peter.Pan / New York;1;Peter.Pan@prestashop.com;;;;;Pan;Peter;360W, 42nd Street;;12001;New York;United States;New York;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
2;Wendy.Moira.Darling / New York;1;Wendy.Moira.Darling@prestashop.com;;;;;Darling;Wendy Moira;360W, 42nd Street;;12001;New York;United States;New York;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
3;Wendy.Moira.Darling / London;1;Wendy.Moira.Darling@prestashop.com;;;;;Darling;Wendy Moira;Lansdowne road 50 London;Kensington;W11;London;United Kingdom;;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
4;Tiger.Lily / Arizona;1;Tiger.Lily@prestashop.com;;;;;Lily;Tiger;Brackin Ranch Road;;86001;Flagstaff;United States;Arizona;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
5;Tiger.Lily / Le Chesnay;1;Tiger.Lily@prestashop.com;;;;;Lily;Tiger;53 passage des pas sages;;78150;Le Chesnay;France;;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
6;James.Hook / Home;1;James.Hook@prestashop.com;;;;;Hook;James;Mass Gravesite;P.O. Box 007;2101;Cayman Brac;Cayman Islands;;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
7;James Hook / Pro;1;James.Hook@prestashop.com;;;;Räuber Schätze GmBH;Hook;James;12 Leipziger Platz;;13505;Berlin;Germany;;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
8;Tinker.Bell / Napaiiri;1;Tinker.Bell@prestashop.com;;;;Santa Clauss Inc.;Bell;Tinker;Tähtikuja 1;;96930;Napapiiri;Finland;;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
9;Smee / Fiji;1;Bob.Smee@prestashop.com;;;;;Smee;Bob;Cross Island rd 321;Vanua Levu;;Savusavu;Fiji;;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
10;Smee / Portland;1;Bob.Smee@prestashop.com;;;;Lattice Semiconductor;Smee;Bob;5555 NE Moore Ct;;97124;Hillsboro;United States;Oregon;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
11;Tictac Crocodile / Home;1;Tictac.Crocodile@prestashop.com;;;;;Crocodile;Tictac;Old State Rd 4A;Saddlebunch keys;33040;Bay Point;United States;Florida;Beware the Shark :);01 02 03 04 05;06 02 03 04 05;;;
|
||||
12;Apple / address1;1;;;Apple;;;Doe;John;1–6 Infinite Loop;;95014;Cupertino;United States;California;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
13;Shure / address1;1;;;Shure;;;Non-Doe;John;5800W Touhy Avenue;;60714;Niles;United States;Illinois;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
14;Shure / address2;1;;;Shure;;;Schuss-mayer;Kurt;Jakob-Dieffenbacher-Str. 12;;75031;Eppingen;Germany;;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
15;UPS / address1;1;;;;U.P.S;;Austin;Steve;55NE Glenlake Parkway;;30328;Atlanta;United States;Georgia;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
16;FedEX / address1;1;;;;FedEX;;Noland;Chuck;3640 Hacks Cross Rd;;32125;Memphis;United States;Tennessee;;01 02 03 04 05;06 02 03 04 05;;;
|
||||
|
@@ -1,5 +0,0 @@
|
||||
Alias ID;Alias *;Search *;Active (0/1)
|
||||
1;htl, hotle;Hotel;1
|
||||
2;rom, roms;Room;1
|
||||
2;romblk, romblk;Room Block;1
|
||||
3;ordre;Order;1
|
||||
|
@@ -1,28 +0,0 @@
|
||||
Product ID*;Attribute (Name:Type:Position)*;Value (Value:Position)*;Supplier reference;Reference;EAN13;UPC;Wholesale price;Impact on price;Ecotax;Quantity;Minimal quantity;Impact on weight;Default (0 = No, 1 = Yes);Combination available date;Image position;Image URL;Delete existing images (0 = No, 1 = Yes);ID / Name of shop;Advanced Stock Managment;Depends on stock;Warehouse
|
||||
1;Color:color:0, Disk space:select:1;Blue:0, 16GB:1;RF-Nano-Blue-16GB;RP-Nano-Blue-16GB;0000080446392;116052426077;100;40;0;10;1;0;0;2014-01-01;1;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Blue:0, 8GB:1;RF-Nano-Blue-8GB;RP-Nano-Blue-8GB;0000080446393;457698445011;80;0;0;10;1;0;0;2014-01-02;2;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Yellow:0, 16GB:1;RF-Nano-Yellow-16GB;RP-Nano-Yellow-16GB;0000080446394;541661772012;100;40;0;10;1;0;0;2014-01-03;3;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Yellow:0, 8GB:1;RF-Nano-Yellow-8GB;RP-Nano-Yellow-8GB;0000080446395;080064075921;80;0;0;10;1;0;1;2014-01-04;4;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Metal:0, 16GB:1;RF-Nano-Metal-16GB;RP-Nano-Metal-16GB;0000080446396;943284585394;100;40;0;10;1;0;0;2014-01-05;5;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Metal:0, 8GB:1;RF-Nano-Metal-8GB;RP-Nano-Metal-8GB;0000080446397;779589194980;80;0;0;10;1;0;0;2014-01-06;6;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Black:0, 16GB:1;RF-Nano-Black-16GB;RP-Nano-Black-16GB;0000080446398;633319125866;100;40;0;10;1;0;0;2014-01-07;7;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Black:0, 8GB:1;RF-Nano-Black-8GB;RP-Nano-Black-8GB;0000080446399;397444719890;80;0;0;10;1;0;0;2014-01-08;8;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Orange:0, 16GB:1;RF-Nano-Orange-16GB;RP-Nano-Orange-16GB;0000080446400;295437962413;100;40;0;10;1;0;0;2014-01-09;9;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Orange:0, 8GB:1;RF-Nano-Orange-8GB;RP-Nano-Orange-8GB;0000080446401;879526174964;80;0;0;10;1;0;0;2014-01-10;10;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Pink:0, 16GB:1;RF-Nano-Pink-16GB;RP-Nano-Pink-16GB;0000080446402;850089888307;100;40;0;10;1;0;0;2014-01-11;11;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Pink:0, 8GB:1;RF-Nano-Pink-8GB;RP-Nano-Pink-8GB;0000080446403;681363175404;80;0;0;10;1;0;0;2014-01-12;12;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Green:0, 16GB:1;RF-Nano-Green-16GB;RP-Nano-Green-16GB;0000080446404;343278201887;100;40;0;10;1;0;0;2014-01-13;13;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Green:0, 8GB:1;RF-Nano-Green-8GB;RP-Nano-Green-8GB;0000080446405;910409113499;80;0;0;10;1;0;0;2014-01-14;14;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Purple:0, 16GB:1;RF-Nano-Purple-16GB;RP-Nano-Purple-16GB;0000080446406;835747175053;100;40;0;10;1;0;0;2014-01-15;15;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
1;Color:color:0, Disk space:select:1;Purple:0, 8GB:1;RF-Nano-Purple-8GB;RP-Nano-Purple-8GB;0000080446407;825739577313;80;0;0;10;1;0;0;2014-01-16;16;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
2;Color:color:0;Metal:0;RF-Shuffle-Metal;RP-Shuffle-Metal;0685387000000;623892618739;40;0;0;12;1;0;1;2014-01-17;1;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
2;Color:color:0;Blue:0;RF-Shuffle-Blue;RP-Shuffle-Blue;0685387000000;848279119061;40;0;0;12;1;0;0;2014-01-18;2;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
2;Color:color:0;Pink:0;RF-Shuffle-Pink;RP-Shuffle-Pink;0685387000000;745140261407;40;0;0;12;1;0;0;2014-01-19;3;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
2;Color:color:0;Green:0;RF-Shuffle-Green;RP-Shuffle-Green;0685387000000;180143857886;40;0;0;12;1;0;0;2014-01-20;4;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, 80GB Parallel ATA Drive @ 4200 rpm:1, 1.60GHz Intel Core 2 Duo:2;RF-MacBookAir80GB-1.6MHz;RP-MacBookAir80GB-1.6MHz;0123457000000;959149242374;0;750;0;10;1;0;0;2014-01-21;1;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, 80GB Parallel ATA Drive @ 4200 rpm:1, 1.80GHz Intel Core 2 Duo:2;RF-MacBookAir80GB-1.6MHz;RP-MacBookAir80GB-1.6MHz;0123457000000;110179337894;0;0;0;10;1;0;1;2014-01-22;2;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, Optional 64GB solid-state drive:1, 1.60GHz Intel Core 2 Duo:2;RF-MacBookAir64GB-1.8MHz;RP-MacBookAir64GB-1.8MHz;0123457000000;576786535242;0;225;0;10;1;0;0;2014-01-23;3;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
3;Color:color:0, Disk space:select:1, ICU:select:2;Metal:0, Optional 64GB solid-state drive:1, 1.60GHz Intel Core 2 Duo:2;RF-MacBookAir64GB-1.8MHz;RP-MacBookAir64GB-1.8MHz;0123457000000;288200093419;0;975;0;10;1;0;0;2014-01-24;4;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
5;Disk space:select:1;8GB:0;RF-IpodTouch8GB;RP-IpodTouch8GB;8456120000000;626733005930;200;0;0;10;1;0;1;2014-01-25;1;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
5;Disk space:select:1;16GB:0;RF-IpodTouch16GB;RP-IpodTouch16GB;8456120000000;604116319829;250;75;0;10;1;0;0;2014-01-26;2;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
5;Disk space:select:1;32GB:0;RF-IpodTouch32GB;RP-IpodTouch32GB;8456120000000;635894030063;300;150;0;10;1;0;0;2014-01-27;3;http://youdomain.com/img.jpg;1;0;0;0;
|
||||
|
@@ -1,35 +1,32 @@
|
||||
<?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.
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* https://opensource.org/license/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.
|
||||
* to support@qloapps.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.
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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 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
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
@@ -1,63 +0,0 @@
|
||||
Manufacturer ID;Active (0/1);Name *;Description;Short description;Meta title;Meta keywords;Meta description;Image URL
|
||||
1;1;Apple;"<p style=""text-align: justify;"">The company was founded on April 1, 1976, and incorporated as Apple Computer, Inc. on January 3, 1977.The word ""Computer"" was removed from its name on January 9, 2007, the same day Steve Jobs introduced the iPhone, reflecting its shifted focus towards consumer electronics.<br /><br />Apple is the world's second-largest information technology company by revenue after Samsung Electronics, and the world's third-largest mobile phone maker after Samsung and Nokia.Fortune magazine named Apple the most admired company in the United States in 2008, and in the world from 2008 to 2012. However, the company has received criticism for its contractors' labor practices, and for Apple's own environmental and business practices.<br /><br />As of May 2013, Apple maintains 408 retail stores in fourteen countries as well as the online Apple Store and iTunes Store, the latter of which is the world's largest music retailer. Apple is the largest publicly traded corporation in the world by market capitalization, with an estimated value of US$415 billion as of March 2013. As of Sept 29 2012, the company had 72,800 permanent full-time employees and 3,300 temporary full-time employees worldwide. Its worldwide annual revenue in 2012 totalled $156 billion. In May 2013, Apple entered the top ten of the Fortune 500 list of companies for the first time, rising 11 places above its 2012 ranking to take the sixth position.</p>
|
||||
<p> </p>
|
||||
<p style=""text-align: right;""><a href=""http://en.wikipedia.org/wiki/Apple_Inc."" target=""_blank""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> </span></span><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps"">original article</span></span></span><span style=""color: #008080;""><span id=""result_box"" lang=""en""> <span class=""hps"">on</span> </span></span><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps"">Wikipedia)</span></span></span></em></span></a></p>";"<p> </p>
|
||||
<div class=""floatnone""><strong><span class=""image""><img style=""display: block; margin-left: auto; margin-right: auto;"" src=""http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Apple_logo_black.svg/101px-Apple_logo_black.svg.png"" alt=""1998-present"" width=""101"" height=""121"" /></span></strong></div>
|
||||
<div class=""floatnone""> </div>
|
||||
<p style=""text-align: justify;""> </p>
|
||||
<p style=""text-align: justify;""><strong>Apple Inc.,</strong> formerly Apple Computer, Inc., is an American multinational corporation headquartered in Cupertino, California that designs, develops, and sells consumer electronics, computer software and personal computers.</p>";MetaTitle-Apple;MetaKeywords-Apple;Meta description-Apple;http://localhost/prestashop/img/m/1.jpg
|
||||
2;1;Shure;"<h2 style=""text-align: justify;""><span class=""mw-headline""><br /></span></h2>
|
||||
<h2 style=""text-align: justify;""><span id=""Company_history"" class=""mw-headline"">Company history</span></h2>
|
||||
<p style=""text-align: justify;"">Shure was founded by Sidney N. Shure in 1925 as ""The Shure Radio Company"", selling radio parts kits in the days before complete manufactured radios were available. The company's office was located at 19 South Wells Street in downtown Chicago, Illinois. The following year, Shure published its first direct mail catalog, which was one of only six radio parts catalogs in the United States at the time. By 1928, the company had grown to over 75 employees, and Sidney's brother, Samuel J. Shure, joined the company, which was renamed Shure Brothers Company. The company moved into new offices at 335 West Madison Street in Chicago. In 1929, with the advent of the Great Depression and the increased availability of factory-built radios, Shure Brothers Company was forced to greatly reduce their staff and became the exclusive US distributor of a small microphone manufacturer. In 1930, Samuel J. Shure left the company.</p>
|
||||
<p style=""text-align: justify;"">In 1931, Shure and engineer Ralph Glover began development of the first Shure microphone, and the following year, the Model 33N Two-Button Carbon Microphone was introduced, making Shure one of only four microphone manufacturers in the U.S.. Shure's first condenser microphone, crystal microphone, and microphone suspension support system (for which they received their first patent) were all introduced that same decade. In 1939, Shure introduced the Model 55 Unidyne Microphone, which went on to become one of the world's most recognized microphones.</p>
|
||||
<p style=""text-align: justify;"">In 1941, Shure was contracted by the United States armed forces to supply microphones during World War II, and by the following year, the T-17B was the microphone most widely used by the U.S. Army and Navy. Shure also manufactured throat, headset, and oxygen mask microphones, and adopted the United States Military Standard for all Shure microphones.</p>
|
||||
<p style=""text-align: justify;"">By the mid-1940s, Shure was also manufacturing and supplying phonograph cartridges to major phonograph manufacturers including Philco, RCA, Emerson, Magnavox, Admiral, and Motorola, and was the largest producer of phonograph cartridges in the U.S. at that time. Among Shure's innovations in phonograph cartridge design was Ralph Glover and Ben Bauer's ""needle-tilt"" principle for minimizing record wear while improving sound reproduction, and Jim Kogen's engineering concept of ""trackability."" Shure produced the first phonograph cartridge capable of playing both long-playing and 78 rpm records, the first cartridge with tracking force of only one gram, and the first cartridge meeting the requirements of stereo recording. At the peak of Shure's phonograph cartridge production, the company was producing approximately 28,000 cartridges per day, with 25,000 of those coming from a Shure phonograph cartridge plant in Phoenix, Arizona. After the introduction of compact discs in the 1980s reduced the demand for phonograph cartridges, Shure closed the Phoenix facility but continued manufacturing phonograph cartridges, and continues to manufacture them today.</p>
|
||||
<p style=""text-align: justify;"">Shure also developed and produced products for medical applications. In 1937, their 66A piezoelectric stethophone was designed to accurately reproduce chest sounds, and in the early 1960s, the SP-5, SP-5S and SP-6 stethoscope pickups were produced. Shure also produced hearing aid cartridges used in hearing aid products from manufacturers like Maico, Telex, Dictograph, Otarian, Vocalite, and Trimm.</p>
|
||||
<p style=""text-align: justify;"">In 1956, Shure moved its corporate headquarters to Hartrey Avenue in Evanston, Illinois, where it remained for 47 years. Beginning in the 1956, Shure manufactured magnetic tape recording heads and two years later, the company announced it was ready to mass-produce 4-ch recording heads. By 1964, however, Shure announced it would no longer produce tape recording heads due to increased competition.</p>
|
||||
<p style=""text-align: justify;"">In 1953, Shure introduced their first wireless microphone system for performers, and in 1959, they introduced the Unidyne III Microphone, which was the predecessor to the SM57, which would be introduced, along with the SM58, six years later. Shure also produced portable equipment for broadcast field recording like Vocal Master, the M67 Portable Mixer, and the FP31 Portable Mixer. In 1990, Shure entered the wireless microphone market with the L-Series.</p>
|
||||
<p style=""text-align: justify;"">In 1981, James Kogen, Executive Vice President, Operations, was promoted to President and General Manager of Shure. In 1995, Sidney N. Shure died at the age of 93, and Rose L. Shure was elected Chairman of the Board of Directors. In 1996, James Kogen retired; Santo (Sandy) LaMantia, Vice President of Engineering, was named President and CEO. Shure Brothers Incorporated was officially renamed Shure Incorporated in 1999.</p>
|
||||
<p>In 2001, Shure acquired the Popper Stopper brand of studio pop filters from Middle Atlantic Products Inc. The following year, Shure adopted hearing conservation as the company’s corporate cause and established the Shure Bid for Hearing program. In 2003, Shure moved into new corporate headquarters in Niles, Illinois, into a building designed by architect Helmut Jahn which was originally the headquarters of <span class=""new"">HA•LO Industries</span>. The 65,000-square-foot (6,000 m<sup>2</sup>) Technology Annex designed by Krueck and Sexton Architects, opened in 2005, houses Shure's Performance Listening Center. In 2008, Shure celebrated the opening of The S.N. Shure Theater and Interactive Display at their corporate headquarters.</p>
|
||||
<h3 style=""text-align: justify;""><span id=""International_offices"" class=""mw-headline"">International offices</span></h3>
|
||||
<ul style=""text-align: justify;"">
|
||||
<li>1991: Shure Europe GmbH opened in Heilbronn, Germany to provide sales, service and support to Shure distribution centers in 34 European countries.</li>
|
||||
<li>1999: Shure Asia Limited is opened in Hong Kong to serve Distribution Centers and distributors throughout Asia and the Pacific Rim.</li>
|
||||
<li>2002: Shure Distribution GmbH established as a subsidiary of Shure Europe GmbH, to handle direct sales with Shure dealers in Germany.</li>
|
||||
<li>2003: HW International, Shure's United Kingdom Distribution Center, acquired and renamed Shure Distribution UK.</li>
|
||||
<li>2005: Sales and marketing office opened in Shanghai, China.</li>
|
||||
<li>2006: Sales and marketing office opened in Tokyo, Japan.</li>
|
||||
<li>2010: New subsidiary formed in the Netherlands</li>
|
||||
</ul>
|
||||
<h3 style=""text-align: justify;""><span id=""Production_facility_expansion"" class=""mw-headline"">Production facility expansion</span></h3>
|
||||
<ul style=""text-align: justify;"">
|
||||
<li>1982: Manufacturing facility opened in Wheeling, Illinois</li>
|
||||
<li>1983: Phonograph cartridge manufacturing facility opened in Agua Prieta, Mexico</li>
|
||||
<li>1984: Wired microphone manufacturing facility opened in Juarez, Mexico</li>
|
||||
<li>1989: Juarez, Mexico facility expanded</li>
|
||||
<li>1994: Agua Prieta facility expanded in 1994</li>
|
||||
<li>2005: Manufacturing facility opened in Suzhou, China</li>
|
||||
</ul>
|
||||
<p><sup id=""cite_ref-The_History_of_Shure_Incorporated_7-1"" class=""reference""><span><a href=""http://en.wikipedia.org/wiki/Samsung"" target=""_blank""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps""><br class=""hps atn"" /></span></span></span></em></span></a></span></sup></p>
|
||||
<p style=""text-align: right;""><a href=""http://en.wikipedia.org/wiki/Shure"" target=""_blank""><span><span style=""color: #008080;""><em><span style=""color: #008080;""><span lang=""en""><span class=""hps""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> <span class=""hps"">original article</span> <span class=""hps"">on</span> <span class=""hps"">Wikipedia)</span></span></span></em></span></span></span></span></em></span></span></a></p>";"<p> </p>
|
||||
<p style=""text-align: center;""><span class=""image""><img class=""thumbimage"" src=""http://upload.wikimedia.org/wikipedia/en/thumb/f/f7/Shure_us_pro_circle_s_logo.gif/220px-Shure_us_pro_circle_s_logo.gif"" alt="""" width=""131"" height=""131"" /></span></p>
|
||||
<p> </p>
|
||||
<p style=""text-align: justify;""><strong>Shure Incorporated</strong> is an American corporation originally founded by Sidney N. Shure in Chicago, Illinois in 1925 as a supplier of radio parts kits. The company became a consumer and professional audio-electronics manufacturer of microphones, wireless microphone systems, phonograph cartridges, discussion systems, mixers, and digital signal processing.</p>
|
||||
<p style=""text-align: justify;"">The company also produces listening products, including headphones, high-end earbuds and personal monitor systems.</p>";MetaTitle-Shure;MetaKeywords-Shure;Meta description-Shure;http://localhost/prestashop/img/m/2.jpg
|
||||
3;1;Sony;"<h2><span class=""mw-headline""><br /></span></h2>
|
||||
<h2><span id=""History"" class=""mw-headline"">History</span></h2>
|
||||
<p>Sony found its beginning in the wake of World War II. In 1946, Masaru Ibuka started an electronics shop in a bomb-damaged department store building in Tokyo. The company had $530 in capital and a total of eight employees. The next year, he was joined by his colleague, Akio Morita, and they founded a company called <strong>Tokyo Tsushin Kogyo</strong> (Tokyo Telecommunications Engineering Corporation). The company built Japan's first tape recorder, called the Type-G. In 1958 the company name was changed to Sony.</p>
|
||||
<p style=""text-align: justify;"">In the early 1950s, Ibuka traveled in the United States and heard about Bell Labs' invention of the...</p>
|
||||
<p style=""text-align: right;""><span style=""color: #008080;""><em><a href=""http://en.wikipedia.org/wiki/Sony"" target=""_blank""><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> <span class=""hps"">original article</span> <span class=""hps"">on</span> <span class=""hps"">Wikipedia)</span></span><br /></span></a></em></span></p>";"<p style=""text-align: justify;""> </p>
|
||||
<p><span class=""image""><img style=""display: block; margin-left: auto; margin-right: auto;"" src=""http://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Sony_logo.svg/220px-Sony_logo.svg.png"" alt=""Sony logo.svg"" width=""220"" height=""37"" /></span></p>
|
||||
<p> </p>
|
||||
<p><strong><br /></strong></p>
|
||||
<p style=""text-align: justify;""><strong>Sony Corporation</strong>, commonly referred to as Sony, is a Japanese multinational conglomerate corporation headquartered in Konan Minato, Tokyo, Japan. Its diversified business is primarily focused on the electronics, game, entertainment and financial services sectors. The company is one of the leading manufacturers of electronic products for the consumer and professional markets. Sony is ranked 87th on the 2012 list of Fortune Global 500.</p>";MetaTitle-Sony;MetaKeywords-Sony;Meta description-Sony;http://localhost/prestashop/img/m/3.jpg
|
||||
4;1;Samsung;"<p style=""text-align: justify;"">Samsung was founded by Lee Byung-chul in 1938 as a trading company. Over the next three decades the group diversified into areas including food processing, textiles, insurance, securities and retail. Samsung entered the electronics industry in the late 1960s and the construction and shipbuilding industries in the mid-1970s; these areas would drive its subsequent growth. Following Lee's death in 1987, Samsung was separated into four business groups – Samsung Group, Shinsegae Group, CJ Group and Hansol Group. Since the 1990s Samsung has increasingly globalized its activities, and electronics, particularly mobile phones and semiconductors, have become its most important source of income.</p>
|
||||
<p>Notable Samsung industrial subsidiaries include Samsung Electronics (the <span class=""mw-redirect"">world's largest information technology company</span> measured by 2012 revenues, and 4th in market value), Samsung Heavy Industries (the world's 2nd-largest <span class=""mw-redirect"">shipbuilder</span> measured by 2010 revenues), and Samsung Engineering and <span class=""mw-redirect"">Samsung C&T</span> (respectively the world's 13th and 36th-largest construction companies). Other notable subsidiaries include Samsung Life Insurance (the world's 14th-largest life insurance company), Samsung Everland (operator of Everland Resort, the oldest <span class=""mw-redirect"">theme park</span> in South Korea), Samsung Techwin (an aerospace, surveillance and defense company) and <span class=""new"">Cheil Worldwide</span> (the world's 16th-largest advertising agency measured by 2011 revenues).</p>
|
||||
<p>Samsung has a powerful influence on South Korea's economic development, politics, media and culture, and has been a major driving force behind the ""Miracle on the Han River"". Its affiliate companies produce around a fifth of South Korea's total exports. Samsung's revenue was equal to 17% of the South Korea's $1,082 billion GDP.</p>
|
||||
<p style=""text-align: justify;"">In 2013, Samsung began construction on building the world's largest ...</p>
|
||||
<p style=""text-align: right;""><a href=""http://en.wikipedia.org/wiki/Samsung"" target=""_blank""><span style=""color: #008080;""><em><span style=""color: #008080;""><span id=""result_box"" lang=""en""><span class=""hps atn"">(</span><span>For more,</span> <span class=""hps"">go to the</span> <span class=""hps"">original article</span> <span class=""hps"">on</span> <span class=""hps"">Wikipedia)</span></span></span></em></span></a></p>";"<p><strong><br /></strong></p>
|
||||
<div class=""center"">
|
||||
<div class=""floatnone"" style=""text-align: center;""><span class=""image""><img src=""http://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Samsung_Logo.svg/200px-Samsung_Logo.svg.png"" alt=""Samsung Logo.svg"" width=""200"" height=""68"" /></span></div>
|
||||
</div>
|
||||
<p><strong><br /></strong></p>
|
||||
<p style=""text-align: justify;""><strong>Samsung Group</strong> is a South Korean multinational conglomerate company headquartered in Samsung Town, Seoul. It comprises numerous subsidiaries and affiliated businesses, most of them united under the <em>Samsung</em> brand, and is the largest South Korean <em>chaebol</em> (business conglomerate).</p>";MetaTitle-Samsung;MetaKeywords-Samsung;Meta description-Samsung;http://localhost/prestashop/img/m/4.jpg
|
||||
|
@@ -1,8 +0,0 @@
|
||||
Product ID;Active (0/1);Name *;Categories (x,y,z...);Price tax excluded or Price tax included;Tax rules ID;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyyy-mm-dd);Discount to (yyyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;Width;Height;Depth;Weight;Quantity;Minimal quantity;Visibility;Additional shipping cost;Unity;Unit price;Short description;Description;Tags (x,y,z...);Meta title;Meta keywords;Meta description;URL rewritten;Text when in stock;Text when backorder allowed;Available for order (0 = No, 1 = Yes);Product available date;Product creation date;Show price (0 = No, 1 = Yes);Image URLs (x,y,z...);Delete existing images (0 = No, 1 = Yes);Feature(Name:Value:Position);Available online only (0 = No, 1 = Yes);Condition;Customizable (0 = No, 1 = Yes);Uploadable files (0 = No, 1 = Yes);Text fields (0 = No, 1 = Yes);Out of stock;ID / Name of shop;Advanced stock management;Depends On Stock;Warehouse
|
||||
1;1;iPod Nano;iPods;100;1;80;1;;5.5;2013-06-01;2018-12-31;RP-demo_1;RF-demo_1;Applestore;Apple;1234567890123;;1;0.6;0.2;0.4;0.068357;160;1;;;;;<p>New design.</p>;<p>New design.</p>;apple, ipod, nano;Meta title-Nano;Meta keywords-Nano;Meta description-Nano;iPod-Nano;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-01;1;http://localhost/prestashop/img/p/1/5/15.jpg;0;;0;new;0;0;0;0;0;0;0;0
|
||||
2;1;iPod shuffle;iPods;60;1;40;1;;;2013-06-01;2018-12-31;RP-demo_2;RF-demo_2;Applestore;Apple;1234567890123;;1;0.1;0.1;0.1;0.027563;120;1;both;;;;<p>New design.</p>;<p>New design.</p>;ipod, shuffle;Meta title-Shuffle;Meta keywords-Shuffle;Meta description-Shuffle;iPod-shuffle;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-02;1;http://localhost/prestashop/img/p/2/3/23.jpg;0;;0;new;0;0;0;0;0;0;0;0
|
||||
3;1;MacBook Air;Laptops;1500;1;1000;1;100;;2013-06-01;2018-12-31;RP-demo_3;RF-demo_3;Applestore;Apple;1234567890123;;2;1.31;0.3;1;2.976846;400;1;catalog;;;;<p>New design.</p>;<p>New design.</p>;MacBook, Air;Meta title-McBookAir;Meta keywords-McBookAir;Meta description-McBookAir;MacBook-Air;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-03;1;http://localhost/prestashop/img/p/1/1.jpg;1;;0;new;0;0;0;0;0;0;0;0
|
||||
4;1;MacBook;Laptops;1150;1;750;1;;;2013-06-01;2018-12-31;RP-demo_4;RF-demo_4;Applestore;Apple;1234567890123;;2;1.31;0.3;1;4.454244;75;1;search;;;;<p>New design.</p>;<p>New design.</p>;MacBook, Pro;Meta title-McBookPro;Meta keywords-McBookPro;Meta description-McBookPro;MacBook;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-04;1;http://localhost/prestashop/img/p/6/6.jpg;1;;0;new;0;0;0;0;0;0;0;0
|
||||
5;1;iPod touch;iPods;240;1;150;1;;;2013-06-01;2018-12-31;RP-demo_5;RF-demo_5;Applestore;Apple;1234567890123;;1;0.6;0.2;0.4;0.194046;120;1;none;;;;<p>New design.</p>;<p>New design.</p>;Ipod touch;Meta title-IpodTouch;Meta keywords-IpodTouch;Meta description-IpodTouch;iPod-touch;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-05;1;http://localhost/prestashop/img/p/7/7.jpg;0;;1;used;0;0;0;0;0;0;0;0
|
||||
6;1;Belkin Leather Folio for iPod nano - Black / Chocolate;Accessories;25;1;150;1;;;2013-06-01;2018-12-31;RP-demo_6;RF-demo_6;Nippon Electronic Import;Belkin;1234567890123;;0;0.6;0.2;0.4;0.038588;25;1;;20;;;<p>New design.</p>;<p>New design.</p>;Folio, leather;Meta title-BelkinLeatherFolio;Meta keywords-BelkinLeatherFolio;Meta description-BelkinLeatherFolio;Belkin-Leather-Folio-for-iPod-nano---Black-Chocolate;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-06;1;http://localhost/prestashop/img/p/1/3/13.jpg;0;;1;refurbished;0;0;0;0;0;0;0;0
|
||||
7;1;Shure SE210 Sound-Isolating Earphones for iPod and iPhone;Accessories;125;2;80;1;;;2013-06-01;2018-12-31;RP-demo_7;RF-demo_7;Shure Online Store;Shure;1234567890123;;0;0.1;0.1;0.1;0.040793;15;1;;;;;<p>New design.</p>;<p>New design.</p>;Headphones;Meta title-ShureEarphones;Meta keywords-ShureEarphones;Meta description-ShureEarphones;Shure-SE210-Sound-Isolating-Earphones-for-iPod-and-iPhone;In Stock;Current supply. Ordering availlable;1;2013-03-01;2013-01-07;1;http://localhost/prestashop/img/p/1/4/14.jpg;0;;1;new;0;0;0;0;0;0;0;0
|
||||
|
@@ -1,4 +0,0 @@
|
||||
Supplier ID;Active (0/1);Name *;Description;Short description;Meta title;Meta keywords;Meta description;Image URL
|
||||
1;1;Applestore;<p>The Apple Store is a chain of retail stores owned and operated by Apple Inc., dealing in computers and consumer electronics. The stores sell Macintosh personal computers, software, iPods, iPads, iPhones, third-party accessories, and other consumer electronics such as Apple TV. Some high profile stores feature a Theatre for presentations and workshops and a Studio for training with Apple products; all stores offer a Genius Bar for technical support and repairs, as well as free workshops available to the public. Under the leadership of Ron Johnson, the former Senior Vice President of Retail Operations, the Apple Stores have, according to an article in the New York Times, been responsible for "[turning] the boring computer sales floor into a sleek playroom filled with gadgets".</p>;Meta title-Applestore;Meta keywords-Applestore;Meta description-Applestore;http://localhost/prestashop/img/su/Pic-of-this-supplier.jpg
|
||||
2;1;Shure Online Store;<p><em>- No description -</em></p>;<p><em>- No description -</em></p>;Meta title-Shure Online Store;Meta keywords-Shure Online Store;Meta description-Shure Online Store;http://localhost/prestashop/img/su/Pic-of-this-supplier-2.jpg
|
||||
3;1;Nippon Electronic Import;<p><em>- No description -</em></p>;<p><em>- No description -</em></p>;Meta title-Nippon Electronic Import;Meta keywords-Nippon Electronic Import;Meta description-Nippon Electronic Import;http://localhost/prestashop/img/su/Pic-of-this-supplier-3.jpg
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 718.
|
@@ -1,21 +0,0 @@
|
||||
Supply Order Reference *;Product ID *;Product Attribute ID;Unit Price (tax excl.)*;Quantity Expected *;Discount Rate;Tax Rate
|
||||
Ref Apple 01;1;1;100;25;0;19,6
|
||||
Ref Apple 01;1;2;80;25;0;19,6
|
||||
Ref Apple 01;1;3;100;25;0;19,6
|
||||
Ref Apple 01;1;4;80;25;0;19,6
|
||||
Ref Apple 01;1;5;100;25;0;19,6
|
||||
Ref Apple 01;1;6;80;25;0;19,6
|
||||
Ref Apple 01;1;7;100;25;0;19,6
|
||||
Ref Apple 01;1;8;80;25;0;19,6
|
||||
Ref Apple 01;1;9;100;25;0;19,6
|
||||
Ref Apple 01;1;10;80;25;0;19,6
|
||||
Ref Apple 01;1;11;100;25;0;19,6
|
||||
Ref Apple 01;1;12;80;25;0;19,6
|
||||
Ref Apple 01;1;13;100;25;0;19,6
|
||||
Ref Apple 01;1;14;80;25;0;19,6
|
||||
Ref Apple 01;1;15;100;25;0;19,6
|
||||
Ref Apple 01;1;16;80;25;0;19,6
|
||||
Ref Apple 01;2;17;40;25;0;19,6
|
||||
Ref Apple 01;2;18;40;25;0;19,6
|
||||
Ref Apple 01;2;19;40;25;0;19,6
|
||||
Ref Apple 01;2;20;40;25;0;19,6
|
||||
|
@@ -1,5 +0,0 @@
|
||||
Supply Order ID;Supplier ID *;Lang ID;Warehouse ID *;Currency ID *;Supply Order Reference *;Delivery Date (Y-M-D)*;Discount Rate;Template
|
||||
1;1;1;1;1;Ref Apple 01;2013-11-01;;
|
||||
2;3;1;1;1;Nippon Electronic Import;2013-11-01;;
|
||||
3;2;1;1;1;Shure Online Store;2013-11-01;;
|
||||
4;1;1;2;2;Ref Apple 02;2013-11-01;;
|
||||
|
@@ -1,35 +1,32 @@
|
||||
<?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.
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* https://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.
|
||||
* to support@qloapps.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.
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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 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
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License 3.0
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
@@ -1,35 +1,32 @@
|
||||
<?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.
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* https://opensource.org/license/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.
|
||||
* to support@qloapps.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.
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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 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
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
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('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;
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
@@ -1,79 +0,0 @@
|
||||
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
|
||||
|
||||
VORBEREITUNG
|
||||
===========
|
||||
|
||||
Zur Installation von PrestaShop benötigen Sie einen Remote-Web-Server oder
|
||||
Ihren Computer (MAMP) mit Zugriff auf eine Datenbank wie MySQL.
|
||||
Sie benötigen Zugriff auf phpMyAdmin, um eine Datenbank zu erstellen und die
|
||||
Informationen in der Datenbank im Installer anzuzeigen.
|
||||
|
||||
Wenn Sie keinen Hosting-Provider haben und Ihren Shop selbst nicht erstellen
|
||||
können, bieten wir einen schlüsselfertigen Shop, mit dem Sie Ihren eigenen
|
||||
Online-Shop in weniger als 10 Minuten ohne jegliche technische Kenntnisse
|
||||
erstellen können.
|
||||
Besuchen Sie:
|
||||
http://www.prestabox.com/
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
Gehen Sie einfach zu Ihrem PrestaShop Web-Verzeichnis und verwenden Sie den
|
||||
Installer :-)
|
||||
|
||||
Falls ein PHP-Fehler auftritt, haben Sie vielleicht kein PHP5 oder müssen es
|
||||
auf Ihrem Web-Host aktivieren.
|
||||
Die Vorinstallationseinstellungen (PHP 5, htaccess) für bestimmte
|
||||
Hosting-Dienste (1&1, Free, Lycos, OVH, Infomaniak, Amen, GoDaddy, etc.)
|
||||
finden Sie in unserem Forum.
|
||||
|
||||
Spezifische englische Webhosting-Einstellungen:
|
||||
http://www.prestashop.com/forums/viewthread/2946/installation_configuration___upgrade/preinstallation_settings_php_5_htaccess_for_certain_hosting_servi
|
||||
ces
|
||||
|
||||
Wenn Sie keine Lösung zum Starten des Installers finden, posten Sie bitte
|
||||
Ihr Problem in unserem Forum:
|
||||
http://www.prestashop.com/forums/viewforum/7/installation_configuration___upgrade
|
||||
|
||||
Es gibt immer Lösungen für Ihre Fragen ;-)
|
||||
|
||||
DOKUMENTATION
|
||||
=============
|
||||
|
||||
Für zusätzliche Benutzerhinweise (how-to), lesen Sie bitte unser Wiki:
|
||||
http://doc.prestashop.com
|
||||
|
||||
FOREN
|
||||
======
|
||||
|
||||
Sie können außerdem mit der PrestaShop Community in unseren Foren
|
||||
diskutieren, Hilfe finden und eigene Beiträge liefern unter:
|
||||
http://www.prestashop.com/forums/
|
||||
|
||||
Danke für Ihren Download und die Nutzung der PrestaShop E-Commerce-Open-Source-Lösung!
|
||||
|
||||
==========================
|
||||
= The PrestaTeam' =
|
||||
= www.PrestaShop.com =
|
||||
==========================
|
||||
@@ -1,61 +0,0 @@
|
||||
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
|
||||
|
||||
PREPARATION
|
||||
===========
|
||||
|
||||
To install PrestaShop, you need a remote web server or on your computer (MAMP), with access to a database like MySQL.
|
||||
You'll need access to phpMyAdmin to create a database and to indicate the information in the database in the installer.
|
||||
|
||||
If you do not host and unable to create your store, we offer a turnkey store, which lets you create your online store in less than 10 minutes without any technical knowledge.
|
||||
We invite you to visit: http://www.prestabox.com/
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
Simply go to your PrestaShop web directory and use installer :-)
|
||||
|
||||
If you have any PHP error, perhaps you don't have PHP5 or you need to activate it on your web host.
|
||||
Please go to our forum to find pre-installation settings (PHP 5, htaccess) for certain hosting services (1&1, Free, Lycos, OVH, Infomaniak, Amen, GoDaddy, etc).
|
||||
|
||||
English webhost specifics settings:
|
||||
http://www.prestashop.com/forums/topic/2946-pre-installation-settings-php-5-htaccess-for-certain-hosting-services/
|
||||
|
||||
If you don't find any solution to launch installer, please post on our forum:
|
||||
http://www.prestashop.com/forums/forum/7-installing-prestashop/
|
||||
|
||||
There are always solutions for your issues ;-)
|
||||
|
||||
DOCUMENTATION
|
||||
=============
|
||||
|
||||
For any extra documentation (how-to), please read our Online documentation:
|
||||
http://doc.prestashop.com/dashboard.action
|
||||
|
||||
FORUMS
|
||||
======
|
||||
|
||||
You can also discuss, help and contribute with PrestaShop community on our forums:
|
||||
http://www.prestashop.com/forums/
|
||||
|
||||
Thanks for downloading and using PrestaShop e-commerce Open-source solution!
|
||||
@@ -1,67 +0,0 @@
|
||||
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
|
||||
|
||||
PREPARACIÓN
|
||||
===========
|
||||
|
||||
Para instalar PrestaShop, necesita un servidor web remoto o en su ordenador (MAMP), con acceso a una base de datos como MySQL.
|
||||
Tendrá acceso a phpMyAdmin para crear una base de datos y para indicar la información en la base de datos en el instalador.
|
||||
|
||||
Si no de acogida y no puede crear su tienda, le ofrecemos una tienda "llave en mano, que le permite crear su tienda en línea en menos de 10 minutos sin ningún conocimiento técnico.
|
||||
Le invitamos a visitar:
|
||||
http://www.prestabox.com/
|
||||
|
||||
INSTALACIÓN
|
||||
============
|
||||
|
||||
Simplemente vaya a su directorio web y el uso PrestaShop instalador :-)
|
||||
|
||||
Si usted tiene cualquier error de PHP, tal vez usted no tiene PHP5 o necesitas activarlo en su web host.
|
||||
Por favor, vaya a nuestro foro para encontrar la configuración de la instalación pre-(PHP 5, htaccess) para determinados servicios de hospedaje (1 & 1, gratis, Lycos, OVH, Infomaniak, Amén, GoDaddy, etc.)
|
||||
|
||||
Inglés webhost ajustes específicos:
|
||||
http://www.prestashop.com/forums/viewthread/2946/installation_configuration___upgrade/preinstallation_settings_php_5_htaccess_for_certain_hosting_services
|
||||
|
||||
Si usted no encuentra ninguna solución para lanzar el instalador, por favor enviar en nuestro foro:
|
||||
http://www.prestashop.com/forums/viewforum/7/installation_configuration___upgrade
|
||||
|
||||
Siempre hay soluciones para sus problemas ;-)
|
||||
|
||||
DOCUMENTACIÓN
|
||||
=============
|
||||
|
||||
Para cualquier documentación adicional (procedimientos), por favor lea nuestra wiki:
|
||||
http://doc.prestashop.com
|
||||
|
||||
FOROS
|
||||
======
|
||||
|
||||
Usted puede también discute, ayudar y contribuir con la comunidad PrestaShop en nuestros foros:
|
||||
http://www.prestashop.com/forums/
|
||||
|
||||
Gracias por descargar y utilizar el comercio electrónico PrestaShop solución de código abierto!
|
||||
|
||||
==========================
|
||||
= The PrestaTeam' =
|
||||
= www.PrestaShop.com =
|
||||
==========================
|
||||
@@ -1,67 +0,0 @@
|
||||
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
|
||||
|
||||
PREPARATION
|
||||
===========
|
||||
|
||||
Pour installer PrestaShop, vous avez besoin d'un serveur web distant ou sur votre ordinateur (MAMP), avec un accès à une base de données de type MySQL.
|
||||
Vous aurez besoin d'un accès à PhpMyAdmin afin de créer un base de données, et d'indiquer les informations de la base de données dans l'installeur.
|
||||
|
||||
Si vous n'avez pas d'hébergeur et pas la possibilité de créer votre boutique, nous vous proposons un service de boutique clé en main, qui vous permet de créer votre boutique en ligne en moins de 10 minutes sans aucunes notions techniques.
|
||||
Nous vous invitons à vous rendre sur :
|
||||
http://www.prestabox.com/
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
Il suffit d'aller dans votre répertoire web PrestaShop et de lancer l'installateur (dans /install) :-)
|
||||
|
||||
Si vous avez des erreurs de PHP, peut-être que vous n'avez pas PHP5 ou peut être devez vous l'activer via votre hébergeur.
|
||||
Merci de vous rendre sur notre forum pour trouver les paramètres de pré-installation (PHP 5, htaccess) pour certains services d'hébergement (1 & 1, Free, Lycos, OVH, Infomaniak, Amen, GoDaddy, etc.)
|
||||
|
||||
Topic français sur notre forum officiel :
|
||||
http://www.prestashop.com/forums/viewthread/446/installation_configuration_et_mise_a_jour/preinstallation_settings_php_5_htaccess_for_certain_hosting_services
|
||||
|
||||
Si vous ne trouvez pas de solution pour lancer l'installateur, merci de vous rendre à cette adresse:
|
||||
http://www.prestashop.com/forums/viewforum/7/installation_configuration___upgrade
|
||||
|
||||
Il ya toujours des solutions pour vos questions ;-)
|
||||
|
||||
DOCUMENTATION
|
||||
=============
|
||||
|
||||
Pour toute documentation supplémentaire (how-to), vous trouverez notre wiki à cette adresse :
|
||||
http://doc.prestashop.com
|
||||
|
||||
FORUMS
|
||||
======
|
||||
|
||||
Vous pouvez également discuter, aider et contribuer avec la communauté PrestaShop sur nos forums :
|
||||
http://www.prestashop.com/forums/
|
||||
|
||||
Merci d'avoir télécharger et d'utiliser PrestaShop, solution e-commerce open-source !
|
||||
|
||||
==========================
|
||||
= The PrestaTeam' =
|
||||
= www.PrestaShop.com =
|
||||
==========================
|
||||
@@ -1,67 +0,0 @@
|
||||
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
|
||||
|
||||
PREPARAZIONE
|
||||
===========
|
||||
|
||||
Per installare PrestaShop, hai bisogno di un server remoto o nel tuo computer (MAMP), con accesso ad un database come MySQL.
|
||||
Dovrai accedere a phpMyAdmin per creare un database e per indicare le informazioni nel database all'installatore.
|
||||
|
||||
Sei non hai un host e non sai come creare il tuo negozio, ti offriamo un negozio già pronto che ti farà realizzare il tuo negozio online in meno di 10 minuti senza nessun bisogno di competenze tecniche.
|
||||
Ti invitiamo a visitare:
|
||||
http://www.prestabox.com/
|
||||
|
||||
INSTALLAZIONE
|
||||
============
|
||||
|
||||
Devi solo andare nella tua directory PrestaShop e usare l'installatore :-)
|
||||
|
||||
Se si verifica un qualsiasi errore PHP, forse non hai PHP5 oppure devi attivarlo nel tuo web host.
|
||||
Vai nel nostro forum e cerca le impostazioni di pre-installazione (PHP 5, htaccess) per alcuni hosting services (1&1, Free, Lycos, OVH, Infomaniak, Amen, GoDaddy, etc).
|
||||
|
||||
Impostazioni specifiche per web host in inglese:
|
||||
http://www.prestashop.com/forums/viewthread/2946/installation_configuration___upgrade/preinstallation_settings_php_5_htaccess_for_certain_hosting_services
|
||||
|
||||
Se non trovi nessuna soluzione per lanciare l'installatore, scrivi un post sul nostro forum:
|
||||
http://www.prestashop.com/forums/viewforum/7/installation_configuration___upgrade
|
||||
|
||||
Troverai sempre una soluzione ai tuoi problemi :-)
|
||||
|
||||
INFORMAZIONI
|
||||
=============
|
||||
|
||||
Per qualsiasi informazione ulteriore (come fare per?), leggi il nostro wiki:
|
||||
http://doc.prestashop.com
|
||||
|
||||
FORUM
|
||||
======
|
||||
|
||||
Puoi anche inserirti, chattare, e contribuire alla community PrestaShop nei nostri forum:
|
||||
http://www.prestashop.com/forums/
|
||||
|
||||
Ti ringraziamo per l'uso della soluzione open-source PrestaShop per il commercio online!
|
||||
|
||||
==========================
|
||||
= The PrestaTeam' =
|
||||
= www.PrestaShop.com =
|
||||
==========================
|
||||
BIN
img/admin/guest_registration_preview.jpg
Normal file
|
After Width: | Height: | Size: 481 KiB |
BIN
img/rf/1.jpg
|
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 1.3 KiB |
BIN
img/rf/10.jpg
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
img/rf/11.jpg
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
img/rf/12.jpg
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
img/rf/13.jpg
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
img/rf/2.jpg
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 1.2 KiB |
BIN
img/rf/3.jpg
|
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 1.2 KiB |
BIN
img/rf/4.jpg
|
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 1.1 KiB |
BIN
img/rf/5.jpg
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 1.3 KiB |
BIN
img/rf/6.jpg
|
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 1.3 KiB |
BIN
img/rf/7.jpg
|
Before Width: | Height: | Size: 184 B After Width: | Height: | Size: 1.1 KiB |
BIN
img/rf/8.jpg
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
img/rf/9.jpg
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
@@ -831,7 +831,7 @@ CREATE TABLE `PREFIX_feature_product` (
|
||||
`id_feature` int(10) unsigned NOT NULL,
|
||||
`id_product` int(10) unsigned NOT NULL,
|
||||
`id_feature_value` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id_feature`,`id_product`),
|
||||
PRIMARY KEY (`id_feature`,`id_product`,`id_feature_value`),
|
||||
KEY `id_feature_value` (`id_feature_value`),
|
||||
KEY `id_product` (`id_product`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
<tab id="Order_Messages" id_parent="Orders" active="1" hide_host_mode="0">
|
||||
<class_name>AdminOrderMessage</class_name>
|
||||
</tab>
|
||||
<tab id="Guest_Registration" id_parent="Orders" active="1" hide_host_mode="0">
|
||||
<class_name>AdminGuestRegistration</class_name>
|
||||
</tab>
|
||||
<tab id="Customers_1" id_parent="Customers" active="1" hide_host_mode="0">
|
||||
<class_name>AdminCustomers</class_name>
|
||||
</tab>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<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_9" id_theme="1" id_meta="9" left_column="1" right_column="0"/>
|
||||
<theme_meta id="theme_meta_9" id_theme="1" id_meta="9" left_column="0" 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"/>
|
||||
@@ -29,9 +29,9 @@
|
||||
<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_23" id_theme="1" id_meta="23" left_column="0" 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_25" id_theme="1" id_meta="25" left_column="1" 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"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Кредитни известия"/>
|
||||
<tab id="Statuses" name="Статуси"/>
|
||||
<tab id="Order_Messages" name="Съобщения при поръчка"/>
|
||||
<tab id="Guest_Registration" name="Карта за регистрация на гост"/>
|
||||
<tab id="Customers_1" name="Клиенти"/>
|
||||
<tab id="Addresses" name="Адреси"/>
|
||||
<tab id="Groups" name="Групи"/>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<tab id='Credit_Slips' name='বকেয়া বিল'/>
|
||||
<tab id='Statuses' name='অবস্থা'/>
|
||||
<tab id='Order_Messages' name='অর্ডার এর মাসাআজ'/>
|
||||
<tab id='Guest_Registration' name='অতিথি নিবন্ধন কার্ড'/>
|
||||
<tab id='Customers_1' name='গ্রাহকরা'/>
|
||||
<tab id='Addresses' name='ঠিকানা'/>
|
||||
<tab id='Groups' name='দল'/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Monitoramento"/>
|
||||
<tab id="Multistore" name="Multiloja"/>
|
||||
<tab id="Order_Messages" name="Mensagens de compras"/>
|
||||
<tab id="Guest_Registration" name="Cartão de Registro de Hóspede"/>
|
||||
<tab id="Orders_2" name="Compras"/>
|
||||
<tab id="Orders" name="Compras"/>
|
||||
<tab id="Orders_1" name="Compras"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Dobropisy"/>
|
||||
<tab id="Statuses" name="Stavy objednávek"/>
|
||||
<tab id="Order_Messages" name="Zprávy k objednávkám"/>
|
||||
<tab id="Guest_Registration" name="Registrační karta hosta"/>
|
||||
<tab id="Customers_1" name="Zákazníci"/>
|
||||
<tab id="Addresses" name="Adresy"/>
|
||||
<tab id="Groups" name="Skupiny zákazníků"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Kontrollübersicht"/>
|
||||
<tab id="Multistore" name="Multishop"/>
|
||||
<tab id="Order_Messages" name="Bestellnachrichten"/>
|
||||
<tab id="Guest_Registration" name="Gästeregistrierungskarte"/>
|
||||
<tab id="Orders_2" name="Bestellungen"/>
|
||||
<tab id="Orders" name="Bestellungen"/>
|
||||
<tab id="Orders_1" name="Bestellungen"/>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<tab id="Credit_Slips" name="Credit Slips"/>
|
||||
<tab id="Statuses" name="Statuses"/>
|
||||
<tab id="Order_Messages" name="Order Messages"/>
|
||||
<tab id="Guest_Registration" name="Guest Registration Card"/>
|
||||
<tab id="Customers_1" name="Customers"/>
|
||||
<tab id="Addresses" name="Addresses"/>
|
||||
<tab id="Groups" name="Groups"/>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<tab id="Credit_Slips" name="Factura de abonos"/>
|
||||
<tab id="Statuses" name="Estados"/>
|
||||
<tab id="Order_Messages" name="Mensajes predefinidos"/>
|
||||
<tab id="Guest_Registration" name="Tarjeta de Registro de Huésped"/>
|
||||
<tab id="Customers_1" name="Clientes"/>
|
||||
<tab id="Addresses" name="Direcciones"/>
|
||||
<tab id="Groups" name="Grupos"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="رسیدهای اعتبار"/>
|
||||
<tab id="Statuses" name="وضعیتها"/>
|
||||
<tab id="Order_Messages" name="پیامهای سفارش"/>
|
||||
<tab id="Guest_Registration" name="کارت ثبت نام مهمان"/>
|
||||
<tab id="Customers_1" name="مشتریان"/>
|
||||
<tab id="Addresses" name="آدرسها"/>
|
||||
<tab id="Groups" name="گروهها"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Suivi"/>
|
||||
<tab id="Multistore" name="Multiboutique"/>
|
||||
<tab id="Order_Messages" name="Messages prédéfinis"/>
|
||||
<tab id="Guest_Registration" name="Carte d'enregistrement des hôtes"/>
|
||||
<tab id="Orders_2" name="Commandes"/>
|
||||
<tab id="Orders" name="Commandes"/>
|
||||
<tab id="Orders_1" name="Commandes"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="שוברי זיכוי"/>
|
||||
<tab id="Statuses" name="סטטוסי הזמנה ומלאי"/>
|
||||
<tab id="Order_Messages" name="תבניות עבור הודעות הזמנה"/>
|
||||
<tab id="Guest_Registration" name="כרטיס רישום אורח"/>
|
||||
<tab id="Customers_1" name="לקוחות"/>
|
||||
<tab id="Addresses" name="כתובות"/>
|
||||
<tab id="Groups" name="קבוצות"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Kreditne note"/>
|
||||
<tab id="Statuses" name="Statusi"/>
|
||||
<tab id="Order_Messages" name="Poruke narudžbe"/>
|
||||
<tab id="Guest_Registration" name="Kartica registracije gosta"/>
|
||||
<tab id="Customers_1" name="Kupci"/>
|
||||
<tab id="Addresses" name="Adrese"/>
|
||||
<tab id="Groups" name="Grupe"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Credit Slips"/>
|
||||
<tab id="Statuses" name="Statuses"/>
|
||||
<tab id="Order_Messages" name="Order Messages"/>
|
||||
<tab id="Guest_Registration" name="Vendég regisztráció"/>
|
||||
<tab id="Customers_1" name="Vásárlók"/>
|
||||
<tab id="Addresses" name="Címek"/>
|
||||
<tab id="Groups" name="Csoportok"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Nota kredit"/>
|
||||
<tab id="Statuses" name="Status"/>
|
||||
<tab id="Order_Messages" name="Pesan"/>
|
||||
<tab id="Guest_Registration" name="Kartu Registrasi Tamu"/>
|
||||
<tab id="Customers_1" name="Pelanggan"/>
|
||||
<tab id="Addresses" name="Alamat"/>
|
||||
<tab id="Groups" name="Grup"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Monitoraggio"/>
|
||||
<tab id="Multistore" name="Multi-negozio"/>
|
||||
<tab id="Order_Messages" name="Messaggi predefiniti"/>
|
||||
<tab id="Guest_Registration" name="Scheda di registrazione ospite"/>
|
||||
<tab id="Orders_2" name="Ordini"/>
|
||||
<tab id="Orders" name="Ordini"/>
|
||||
<tab id="Orders_1" name="Ordini"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Grąžinimo kuponai"/>
|
||||
<tab id="Statuses" name="Būsenos"/>
|
||||
<tab id="Order_Messages" name="Užsakymo pranešimai"/>
|
||||
<tab id="Guest_Registration" name="Svečio registracijos kortelė"/>
|
||||
<tab id="Customers_1" name="Klientai"/>
|
||||
<tab id="Addresses" name="Adresai"/>
|
||||
<tab id="Groups" name="Grupės"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Кредитни исечоци"/>
|
||||
<tab id="Statuses" name="Состојби"/>
|
||||
<tab id="Order_Messages" name="Пораки за нарачки"/>
|
||||
<tab id="Guest_Registration" name="Картичка за регистрација на гостин"/>
|
||||
<tab id="Customers_1" name="Клиенти"/>
|
||||
<tab id="Addresses" name="Адреси"/>
|
||||
<tab id="Groups" name="Групи"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Creditnota's"/>
|
||||
<tab id="Statuses" name="Statussen"/>
|
||||
<tab id="Order_Messages" name="Bestellingsberichten"/>
|
||||
<tab id="Guest_Registration" name="Gasten registratiekaart"/>
|
||||
<tab id="Customers_1" name="Klanten"/>
|
||||
<tab id="Addresses" name="Adressen"/>
|
||||
<tab id="Groups" name="Groepen"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Credit Slips"/>
|
||||
<tab id="Statuses" name="Statuses"/>
|
||||
<tab id="Order_Messages" name="Order Messages"/>
|
||||
<tab id="Guest_Registration" name="Guest Registration Card"/>
|
||||
<tab id="Customers_1" name="Customers"/>
|
||||
<tab id="Addresses" name="Addresses"/>
|
||||
<tab id="Groups" name="Groups"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Monitorowanie"/>
|
||||
<tab id="Multistore" name="Zestawienie sklepów ?"/>
|
||||
<tab id="Order_Messages" name="Treść powiadomienia zamówień"/>
|
||||
<tab id="Guest_Registration" name="Karta rejestracji gościa"/>
|
||||
<tab id="Orders_2" name="Zamówienia"/>
|
||||
<tab id="Orders" name="Zamówienia"/>
|
||||
<tab id="Orders_1" name="Zamówienia"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Monitoramento"/>
|
||||
<tab id="Multistore" name="Multi loja"/>
|
||||
<tab id="Order_Messages" name="Mensagens de encomendas"/>
|
||||
<tab id="Guest_Registration" name="Cartão de Registo de Hóspede"/>
|
||||
<tab id="Orders_2" name="Encomendas"/>
|
||||
<tab id="Orders" name="Encomendas"/>
|
||||
<tab id="Orders_1" name="Encomendas"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Suivi"/>
|
||||
<tab id="Multistore" name="Multiboutique"/>
|
||||
<tab id="Order_Messages" name="Messages prédéfinis"/>
|
||||
<tab id="Guest_Registration" name="Carte d'enregistrement des hôtes"/>
|
||||
<tab id="Orders_2" name="Commandes"/>
|
||||
<tab id="Orders" name="Commandes"/>
|
||||
<tab id="Orders_1" name="Commandes"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Note de credit"/>
|
||||
<tab id="Statuses" name="Stadii"/>
|
||||
<tab id="Order_Messages" name="Mesaje la comenzi"/>
|
||||
<tab id="Guest_Registration" name="Card de înregistrare a oaspeților"/>
|
||||
<tab id="Customers_1" name="Clienți"/>
|
||||
<tab id="Addresses" name="Adrese"/>
|
||||
<tab id="Groups" name="Grupuri"/>
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<tab id="Monitoring" name="Мониторинг"/>
|
||||
<tab id="Multistore" name="Мульти-магазин"/>
|
||||
<tab id="Order_Messages" name="Сообщения"/>
|
||||
<tab id="Guest_Registration" name="Карта регистрации гостя"/>
|
||||
<tab id="Orders_2" name="Заказы"/>
|
||||
<tab id="Orders" name="Заказы"/>
|
||||
<tab id="Orders_1" name="Заказы"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Dobropisi"/>
|
||||
<tab id="Statuses" name="Statusi"/>
|
||||
<tab id="Order_Messages" name="Sporočila ob naročilu"/>
|
||||
<tab id="Guest_Registration" name="Kartica za registracijo gosta"/>
|
||||
<tab id="Customers_1" name="Kupci"/>
|
||||
<tab id="Addresses" name="Naslovi"/>
|
||||
<tab id="Groups" name="Skupine"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Komadi kredita"/>
|
||||
<tab id="Statuses" name="Statusi"/>
|
||||
<tab id="Order_Messages" name="Poruke porudžbina"/>
|
||||
<tab id="Guest_Registration" name="Kartica za registraciju gosta"/>
|
||||
<tab id="Customers_1" name="Kupci"/>
|
||||
<tab id="Addresses" name="Adrese"/>
|
||||
<tab id="Groups" name="Grupe"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Kreditnota"/>
|
||||
<tab id="Statuses" name="Statusar"/>
|
||||
<tab id="Order_Messages" name="Ordermeddelanden"/>
|
||||
<tab id="Guest_Registration" name="Gästregistreringskort"/>
|
||||
<tab id="Customers_1" name="Kunder"/>
|
||||
<tab id="Addresses" name="Adresser"/>
|
||||
<tab id="Groups" name="Grupper"/>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<tab id="Credit_Slips" name="折讓單"/>
|
||||
<tab id="Statuses" name="狀態"/>
|
||||
<tab id="Order_Messages" name="訂單訊息"/>
|
||||
<tab id="Guest_Registration" name="住客登記表"/>
|
||||
<tab id="Customers_1" name="客戶"/>
|
||||
<tab id="Addresses" name="地址"/>
|
||||
<tab id="Groups" name="群組"/>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<tab id="Monitoring" name="Giám sát"/>
|
||||
<tab id="Multistore" name="Multistore"/>
|
||||
<tab id="Order_Messages" name="Tin nhắn đơn hàng"/>
|
||||
<tab id="Guest_Registration" name="Thẻ đăng ký khách"/>
|
||||
<tab id="Orders" name="đặt hàng"/>
|
||||
<tab id="Orders_1" name="Đơn hàng"/>
|
||||
<tab id="Orders_2" name="Đơn hàng"/>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<tab id="Credit_Slips" name="Credit Slips"/>
|
||||
<tab id="Statuses" name="Statuses"/>
|
||||
<tab id="Order_Messages" name="Order Messages"/>
|
||||
<tab id="Guest_Registration" name="住客登记卡"/>
|
||||
<tab id="Customers_1" name="Customers"/>
|
||||
<tab id="Addresses" name="Addresses"/>
|
||||
<tab id="Groups" name="Groups"/>
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
|
||||
var current_product = null;
|
||||
var ajaxQueries = new Array();
|
||||
|
||||
if (typeof jQuery !== 'undefined' && jQuery.effects && !jQuery.effects.effect) {
|
||||
jQuery.effects.effect = {};
|
||||
}
|
||||
$(document).ready(function() {
|
||||
// Init all events
|
||||
init();
|
||||
|
||||
291
modules/hotelreservationsystem/classes/HotelAmenities.php
Normal file
@@ -0,0 +1,291 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3.0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
class HotelAmenities extends ObjectModel
|
||||
{
|
||||
public $name;
|
||||
public $id_parent;
|
||||
public $position;
|
||||
public $active;
|
||||
public $logo_type;
|
||||
public $logo;
|
||||
public $date_add;
|
||||
public $date_upd;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'htl_amenity',
|
||||
'primary' => 'id_amenity',
|
||||
'multilang' => true,
|
||||
'fields' => array(
|
||||
'id_parent' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'position' => array('type' => self::TYPE_INT),
|
||||
'active' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'logo_type' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'),
|
||||
'logo' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
|
||||
// lang fields
|
||||
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'required' => true),
|
||||
),
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'hotel_amenities',
|
||||
'objectNodeName' => 'hotel_amenity',
|
||||
'fields' => array(),
|
||||
);
|
||||
|
||||
public function delete()
|
||||
{
|
||||
if ($id = $this->id) {
|
||||
$imgFile = dirname(__FILE__).'/../views/img/hotel_amenities/'.(int)$id.'.jpg';
|
||||
if (file_exists($imgFile)) {
|
||||
unlink($imgFile);
|
||||
}
|
||||
return parent::delete();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all categories (id_parent = 0) with their child amenities.
|
||||
*
|
||||
* @param int $idLang
|
||||
* @return array|false
|
||||
*/
|
||||
public function getAmenitiesTree($idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
$rows = Db::getInstance()->executeS(
|
||||
'SELECT ha.`id_amenity`, ha.`id_parent`, ha.`position`, ha.`active`, ha.`logo_type`, ha.`logo`, hal.`name`
|
||||
FROM `'._DB_PREFIX_.'htl_amenity` ha
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_amenity_lang` hal
|
||||
ON (hal.`id_amenity` = ha.`id_amenity` AND hal.`id_lang` = '.(int)$idLang.')
|
||||
ORDER BY ha.`id_parent` ASC, ha.`position` ASC'
|
||||
);
|
||||
|
||||
if (!$rows) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = array();
|
||||
$amenitiesByCategory = array();
|
||||
|
||||
foreach ($rows as $row) {
|
||||
if ($row['id_parent'] == 0) {
|
||||
$result[$row['id_amenity']] = array(
|
||||
'id' => $row['id_amenity'],
|
||||
'name' => $row['name'],
|
||||
'position' => $row['position'],
|
||||
'children' => array(),
|
||||
);
|
||||
} else {
|
||||
$row['id'] = $row['id_amenity'];
|
||||
$amenitiesByCategory[$row['id_parent']][] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($amenitiesByCategory as $categoryId => $amenities) {
|
||||
if (isset($result[$categoryId])) {
|
||||
$result[$categoryId]['children'] = $amenities;
|
||||
}
|
||||
}
|
||||
|
||||
return $result ?: false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all amenity categories with children, marking which are selected for a hotel/room type.
|
||||
*
|
||||
* @param array $selectedIds flat array of selected amenity IDs
|
||||
* @param int $idLang
|
||||
* @return array|false
|
||||
*/
|
||||
public function hotelBranchSelectedAmenities($selectedIds, $idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
$rows = Db::getInstance()->executeS(
|
||||
'SELECT ha.`id_amenity`, ha.`id_parent`, hal.`name`
|
||||
FROM `'._DB_PREFIX_.'htl_amenity` ha
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_amenity_lang` hal
|
||||
ON (hal.`id_amenity` = ha.`id_amenity` AND hal.`id_lang` = '.(int)$idLang.')
|
||||
ORDER BY ha.`id_parent` ASC'
|
||||
);
|
||||
|
||||
if (!$rows) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$result = array();
|
||||
|
||||
foreach ($rows as $row) {
|
||||
if ($row['id_parent'] == 0) {
|
||||
$result[$row['id_amenity']]['name'] = $row['name'];
|
||||
} else {
|
||||
$result[$row['id_parent']]['children'][] = array(
|
||||
'id_amenity' => $row['id_amenity'],
|
||||
'id' => $row['id_amenity'],
|
||||
'name' => $row['name'],
|
||||
'selected' => in_array($row['id_amenity'], $selectedIds) ? 1 : 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $result ?: false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param int $idLang
|
||||
* @return array|false
|
||||
*/
|
||||
public function getAmenityInfoById($id, $idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
return Db::getInstance()->getRow(
|
||||
'SELECT ha.`id_amenity`, hal.`name`
|
||||
FROM `'._DB_PREFIX_.'htl_amenity` ha
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_amenity_lang` hal
|
||||
ON (hal.`id_amenity` = ha.`id_amenity` AND hal.`id_lang` = '.(int)$idLang.')
|
||||
WHERE ha.`id_amenity` = '.(int)$id
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $parentId
|
||||
* @return array|false
|
||||
*/
|
||||
public function getChildAmenitiesByParentAmenityId($parentId)
|
||||
{
|
||||
return Db::getInstance()->executeS(
|
||||
'SELECT `id_amenity` FROM `'._DB_PREFIX_.'htl_amenity` WHERE `id_parent` = '.(int)$parentId
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a category and all its child amenities.
|
||||
*
|
||||
* @param int $deleteId
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteCategory($idCategory)
|
||||
{
|
||||
$rows = Db::getInstance()->executeS(
|
||||
'SELECT `id_amenity` FROM `'._DB_PREFIX_.'htl_amenity`
|
||||
WHERE `id_parent` = '.(int)$idCategory.' OR `id_amenity` = '.(int)$idCategory
|
||||
);
|
||||
|
||||
if ($rows) {
|
||||
foreach ($rows as $row) {
|
||||
$objHotelAmenities = new HotelAmenities((int)$row['id_amenity']);
|
||||
$objHotelAmenities->delete();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @param int $idLang
|
||||
* @return array|false
|
||||
*/
|
||||
public function searchByName($query, $idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
return Db::getInstance()->executeS(
|
||||
'SELECT ha.*, hal.* FROM `'._DB_PREFIX_.'htl_amenity` ha
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_amenity_lang` hal ON hal.`id_amenity` = ha.`id_amenity`
|
||||
WHERE hal.`name` LIKE \'%'.pSQL($query).'%\'
|
||||
AND hal.`id_lang` = '.(int)$idLang
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all amenity categories (id_parent = 0), ordered by position.
|
||||
*
|
||||
* @param int $idLang
|
||||
* @return array
|
||||
*/
|
||||
public static function getCategories($idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
return Db::getInstance()->executeS(
|
||||
'SELECT ha.`id_amenity`, hal.`name`
|
||||
FROM `'._DB_PREFIX_.'htl_amenity` ha
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_amenity_lang` hal
|
||||
ON (hal.`id_amenity` = ha.`id_amenity` AND hal.`id_lang` = '.(int)$idLang.')
|
||||
WHERE ha.`id_parent` = 0
|
||||
ORDER BY ha.`position` ASC'
|
||||
) ?: array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all active child amenities (id_parent > 0).
|
||||
*
|
||||
* @param int $idLang
|
||||
* @return array
|
||||
*/
|
||||
public static function getAmenities($idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
return Db::getInstance()->executeS(
|
||||
'SELECT ha.`id_amenity`, hal.`name`
|
||||
FROM `'._DB_PREFIX_.'htl_amenity` ha
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_amenity_lang` hal
|
||||
ON (hal.`id_amenity` = ha.`id_amenity` AND hal.`id_lang` = '.(int)$idLang.')
|
||||
WHERE ha.`id_parent` > 0
|
||||
AND ha.`active` = 1
|
||||
ORDER BY hal.`name` ASC'
|
||||
) ?: array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return image path for amenity logo stored in views/img/hotel_amenities/.
|
||||
*
|
||||
* @param int $id
|
||||
* @return string
|
||||
*/
|
||||
public static function getAmenityImagePath($id)
|
||||
{
|
||||
return _MODULE_DIR_.'hotelreservationsystem/views/img/hotel_amenities/'.(int)$id.'.jpg';
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
class HotelBedType extends ObjectModel
|
||||
{
|
||||
public $length;
|
||||
public $width;
|
||||
public $name;
|
||||
|
||||
public static $definition =array(
|
||||
'table' => 'htl_bed_type',
|
||||
'primary' => 'id_bed_type',
|
||||
'multilang' => true,
|
||||
'fields' => array(
|
||||
'length' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
||||
'width' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'),
|
||||
// lang fields
|
||||
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128),
|
||||
),
|
||||
);
|
||||
|
||||
public function getAllBedTypes($idLang)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
$sql = 'SELECT hbt.*, hbtl.`name` FROM `'._DB_PREFIX_.$this->table.'` hbt
|
||||
LEFT JOIN `'._DB_PREFIX_.$this->table.'_lang` hbtl ON hbt.`id_bed_type` = hbtl.`id_bed_type`
|
||||
WHERE 1 AND hbtl.`id_lang` ='.(int) $idLang;
|
||||
|
||||
return Db::getInstance()->executeS($sql);
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
$objHotelRoomTypeBedType = new HotelRoomTypeBedType();
|
||||
$objHotelRoomTypeBedType->deleteRoomTypeBedTypes($this->id);
|
||||
|
||||
return parent::delete();
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,85 @@
|
||||
|
||||
class HotelBookingDetail extends ObjectModel
|
||||
{
|
||||
// Guest Registration Card — Section IDs
|
||||
const GRC_SECTION_GUEST_INFO = 1;
|
||||
const GRC_SECTION_TRAVEL_INFO = 2;
|
||||
const GRC_SECTION_BOOKING_INFO = 3;
|
||||
const GRC_SECTION_IDENTIFICATION = 4;
|
||||
const GRC_SECTION_ADDITIONAL_GUESTS = 5;
|
||||
const GRC_SECTION_BILLING_CORPORATE = 6;
|
||||
const GRC_SECTION_PAYMENT_DEPOSIT = 7;
|
||||
const GRC_SECTION_GUEST_SIGNATURE = 8;
|
||||
const GRC_SECTION_PROPERTY_REGS = 9;
|
||||
const GRC_SECTION_OFFICE_USE_ONLY = 10;
|
||||
|
||||
// Guest Registration Card — Guest Information fields (section 1)
|
||||
const GRC_GUEST_TITLE = 1;
|
||||
const GRC_GUEST_FULL_NAME = 2;
|
||||
const GRC_GUEST_PHONE = 3;
|
||||
const GRC_GUEST_EMAIL = 4;
|
||||
const GRC_GUEST_DOB = 5;
|
||||
const GRC_GUEST_NATIONALITY = 6;
|
||||
const GRC_GUEST_CITY_COUNTRY = 7;
|
||||
const GRC_GUEST_POSTAL_CODE = 8;
|
||||
const GRC_GUEST_ADDRESS = 9;
|
||||
|
||||
// Guest Registration Card — Travel Information fields (section 2)
|
||||
const GRC_TRAVEL_ARRIVED_FROM = 1;
|
||||
const GRC_TRAVEL_NEXT_DESTINATION = 2;
|
||||
const GRC_TRAVEL_FLIGHT_TRAIN = 3;
|
||||
const GRC_TRAVEL_VEHICLE_REG = 4;
|
||||
const GRC_TRAVEL_PURPOSE_OF_VISIT = 5;
|
||||
|
||||
// Guest Registration Card — Booking Information fields (section 3)
|
||||
const GRC_BOOKING_REFERENCE = 1;
|
||||
const GRC_BOOKING_RATE_PER_NIGHT = 2;
|
||||
const GRC_BOOKING_ARRIVAL = 3;
|
||||
const GRC_BOOKING_DEPARTURE = 4;
|
||||
const GRC_BOOKING_ROOM_TYPE = 5;
|
||||
const GRC_BOOKING_ROOM_NUMBER = 6;
|
||||
const GRC_BOOKING_NUM_GUESTS = 7;
|
||||
|
||||
// Guest Registration Card — Identification Document fields (section 4)
|
||||
const GRC_ID_IDENTITY_PROOF = 1;
|
||||
const GRC_ID_NUMBER = 2;
|
||||
const GRC_ID_PASSPORT_NO = 3;
|
||||
const GRC_ID_PLACE_OF_ISSUE = 4;
|
||||
const GRC_ID_DATE_OF_ISSUE = 5;
|
||||
const GRC_ID_DATE_OF_EXPIRY = 6;
|
||||
const GRC_ID_VISA_NUMBER = 7;
|
||||
const GRC_ID_VALID_UNTIL = 8;
|
||||
const GRC_ID_ARRIVAL_DATE_IN_COUNTRY = 9;
|
||||
|
||||
// Guest Registration Card — Additional Guests fields (section 5)
|
||||
const GRC_ADD_GUEST_NAME = 1;
|
||||
const GRC_ADD_GUEST_ID_TYPE = 2;
|
||||
const GRC_ADD_GUEST_ID_NUMBER = 3;
|
||||
const GRC_ADD_GUEST_NATIONALITY = 4;
|
||||
|
||||
// Guest Registration Card — Billing & Corporate Details fields (section 6)
|
||||
const GRC_BILLING_COMPANY = 1;
|
||||
const GRC_BILLING_TAX_ID = 2;
|
||||
|
||||
// Guest Registration Card — Payment & Deposit fields (section 7)
|
||||
const GRC_PAYMENT_METHOD = 1;
|
||||
const GRC_PAYMENT_CARD_NUMBER = 2;
|
||||
const GRC_PAYMENT_SECURITY_DEPOSIT = 3;
|
||||
|
||||
// Guest Registration Card — Guest Signature fields (section 8)
|
||||
const GRC_SIG_SIGNATURE = 1;
|
||||
const GRC_SIG_DATE = 2;
|
||||
|
||||
// Guest Registration Card — Property Regulations fields (section 9)
|
||||
const GRC_PROP_CHECKIN_CHECKOUT_TIME = 1;
|
||||
const GRC_PROP_HOTEL_POLICIES = 2;
|
||||
|
||||
// Guest Registration Card — For Office Use Only fields (section 10)
|
||||
const GRC_OFFICE_STAFF_NAME = 1;
|
||||
const GRC_OFFICE_CHECKIN_TIME = 2;
|
||||
const GRC_OFFICE_ID_VERIFIED = 3;
|
||||
const GRC_OFFICE_REG_NO = 4;
|
||||
|
||||
private $allReqDates;
|
||||
private $dltDates;
|
||||
private $partAvaiDates; // used to remove cart rooms from partial available rooms
|
||||
@@ -1700,19 +1779,15 @@ class HotelBookingDetail extends ObjectModel
|
||||
if (!$only_search_data) {
|
||||
if (!empty($bookingData)) {
|
||||
foreach ($bookingData['rm_data'] as $key => $value) {
|
||||
$product_feature = Product::getFrontFeaturesStatic($context->language->id, $value['id_product']);
|
||||
$prod_amen = array();
|
||||
// featured amenities for display in room type list
|
||||
$product_feature = HotelRoomTypeAmenities::getAmenities(
|
||||
$value['id_product'],
|
||||
$context->language->id,
|
||||
true
|
||||
);
|
||||
if (!empty($amenities) && $amenities) {
|
||||
$prod_amen = $amenities;
|
||||
foreach ($product_feature as $a_key => $a_val) {
|
||||
if (($pa_key = array_search($a_val['id_feature'], $prod_amen)) !== false) {
|
||||
unset($prod_amen[$pa_key]);
|
||||
if (empty($prod_amen)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($prod_amen)) {
|
||||
$roomAmenityIds = array_column(HotelRoomTypeAmenities::getAmenities($value['id_product']), 'id');
|
||||
if (array_diff($amenities, $roomAmenityIds)) {
|
||||
unset($bookingData['rm_data'][$key]);
|
||||
continue;
|
||||
}
|
||||
@@ -4802,4 +4877,118 @@ class HotelBookingDetail extends ObjectModel
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Returns all Guest Registration Card sections and their fields.
|
||||
* Modules may add, remove, or reorder sections/fields via the hook.
|
||||
*
|
||||
* @return array sectionId => ['name' => string, 'fields' => [fieldId => string, ...]]
|
||||
*/
|
||||
public function getRegistrationCardInfo()
|
||||
{
|
||||
$guestRegCardInfo = array(
|
||||
self::GRC_SECTION_GUEST_INFO => array(
|
||||
'name' => $this->moduleInstance->l('Guest Information', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_GUEST_TITLE => $this->moduleInstance->l('Title', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_FULL_NAME => $this->moduleInstance->l('Full Name (As per ID)', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_PHONE => $this->moduleInstance->l('Phone / Mobile', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_EMAIL => $this->moduleInstance->l('Email', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_DOB => $this->moduleInstance->l('Date of Birth', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_NATIONALITY => $this->moduleInstance->l('Nationality', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_CITY_COUNTRY => $this->moduleInstance->l('City / Country', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_POSTAL_CODE => $this->moduleInstance->l('Postal Code', 'hotelreservationsystem'),
|
||||
self::GRC_GUEST_ADDRESS => $this->moduleInstance->l('Address', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_TRAVEL_INFO => array(
|
||||
'name' => $this->moduleInstance->l('Travel Information', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_TRAVEL_ARRIVED_FROM => $this->moduleInstance->l('Arrived From', 'hotelreservationsystem'),
|
||||
self::GRC_TRAVEL_NEXT_DESTINATION => $this->moduleInstance->l('Next Destination', 'hotelreservationsystem'),
|
||||
self::GRC_TRAVEL_FLIGHT_TRAIN => $this->moduleInstance->l('Flight / Train Number', 'hotelreservationsystem'),
|
||||
self::GRC_TRAVEL_VEHICLE_REG => $this->moduleInstance->l('Vehicle Reg. No.', 'hotelreservationsystem'),
|
||||
self::GRC_TRAVEL_PURPOSE_OF_VISIT => $this->moduleInstance->l('Purpose of Visit', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_BOOKING_INFO => array(
|
||||
'name' => $this->moduleInstance->l('Booking Information', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_BOOKING_REFERENCE => $this->moduleInstance->l('Booking Reference No.', 'hotelreservationsystem'),
|
||||
self::GRC_BOOKING_RATE_PER_NIGHT => $this->moduleInstance->l('Rate per Night', 'hotelreservationsystem'),
|
||||
self::GRC_BOOKING_ARRIVAL => $this->moduleInstance->l('Arrival Date & Time', 'hotelreservationsystem'),
|
||||
self::GRC_BOOKING_DEPARTURE => $this->moduleInstance->l('Departure Date & Time', 'hotelreservationsystem'),
|
||||
self::GRC_BOOKING_ROOM_TYPE => $this->moduleInstance->l('Room Type', 'hotelreservationsystem'),
|
||||
self::GRC_BOOKING_ROOM_NUMBER => $this->moduleInstance->l('Room Number', 'hotelreservationsystem'),
|
||||
self::GRC_BOOKING_NUM_GUESTS => $this->moduleInstance->l('Number of Guests', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_IDENTIFICATION => array(
|
||||
'name' => $this->moduleInstance->l('Identification Document', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_ID_IDENTITY_PROOF => $this->moduleInstance->l('Identity Proof', 'hotelreservationsystem'),
|
||||
self::GRC_ID_NUMBER => $this->moduleInstance->l('ID Number', 'hotelreservationsystem'),
|
||||
self::GRC_ID_PASSPORT_NO => $this->moduleInstance->l('Passport No.', 'hotelreservationsystem'),
|
||||
self::GRC_ID_PLACE_OF_ISSUE => $this->moduleInstance->l('Place of Issue', 'hotelreservationsystem'),
|
||||
self::GRC_ID_DATE_OF_ISSUE => $this->moduleInstance->l('Date of Issue', 'hotelreservationsystem'),
|
||||
self::GRC_ID_DATE_OF_EXPIRY => $this->moduleInstance->l('Date of Expiry', 'hotelreservationsystem'),
|
||||
self::GRC_ID_VISA_NUMBER => $this->moduleInstance->l('Visa Number', 'hotelreservationsystem'),
|
||||
self::GRC_ID_VALID_UNTIL => $this->moduleInstance->l('Valid Until', 'hotelreservationsystem'),
|
||||
self::GRC_ID_ARRIVAL_DATE_IN_COUNTRY => $this->moduleInstance->l('Arrival Date in Country', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_ADDITIONAL_GUESTS => array(
|
||||
'name' => $this->moduleInstance->l('Additional Guests', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_ADD_GUEST_NAME => $this->moduleInstance->l('Guest Name', 'hotelreservationsystem'),
|
||||
self::GRC_ADD_GUEST_ID_TYPE => $this->moduleInstance->l('ID Type', 'hotelreservationsystem'),
|
||||
self::GRC_ADD_GUEST_ID_NUMBER => $this->moduleInstance->l('ID Number', 'hotelreservationsystem'),
|
||||
self::GRC_ADD_GUEST_NATIONALITY => $this->moduleInstance->l('Nationality', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_BILLING_CORPORATE => array(
|
||||
'name' => $this->moduleInstance->l('Billing & Corporate Details', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_BILLING_COMPANY => $this->moduleInstance->l('Company / Agent', 'hotelreservationsystem'),
|
||||
self::GRC_BILLING_TAX_ID => $this->moduleInstance->l('Tax ID / VAT No.', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_PAYMENT_DEPOSIT => array(
|
||||
'name' => $this->moduleInstance->l('Payment & Deposit', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_PAYMENT_METHOD => $this->moduleInstance->l('Payment Method', 'hotelreservationsystem'),
|
||||
self::GRC_PAYMENT_CARD_NUMBER => $this->moduleInstance->l('Credit Card Number', 'hotelreservationsystem'),
|
||||
self::GRC_PAYMENT_SECURITY_DEPOSIT => $this->moduleInstance->l('Security Deposit', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_GUEST_SIGNATURE => array(
|
||||
'name' => $this->moduleInstance->l('Guest Signature', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_SIG_SIGNATURE => $this->moduleInstance->l('Signature', 'hotelreservationsystem'),
|
||||
self::GRC_SIG_DATE => $this->moduleInstance->l('Date', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_PROPERTY_REGS => array(
|
||||
'name' => $this->moduleInstance->l('Property Regulations', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_PROP_CHECKIN_CHECKOUT_TIME => $this->moduleInstance->l('Check-in / Check-out Time', 'hotelreservationsystem'),
|
||||
self::GRC_PROP_HOTEL_POLICIES => $this->moduleInstance->l('Hotel Policies', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
self::GRC_SECTION_OFFICE_USE_ONLY => array(
|
||||
'name' => $this->moduleInstance->l('For Office Use Only', 'hotelreservationsystem'),
|
||||
'fields' => array(
|
||||
self::GRC_OFFICE_STAFF_NAME => $this->moduleInstance->l('Staff Name', 'hotelreservationsystem'),
|
||||
self::GRC_OFFICE_CHECKIN_TIME => $this->moduleInstance->l('Check-in Time', 'hotelreservationsystem'),
|
||||
self::GRC_OFFICE_ID_VERIFIED => $this->moduleInstance->l('ID Verified', 'hotelreservationsystem'),
|
||||
self::GRC_OFFICE_REG_NO => $this->moduleInstance->l('Registration No.', 'hotelreservationsystem'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Hook::exec('actionGuestRegCardInfoModifier', array(
|
||||
'guest_registration_info' => &$guestRegCardInfo,
|
||||
));
|
||||
|
||||
return $guestRegCardInfo;
|
||||
}
|
||||
}
|
||||
|
||||
146
modules/hotelreservationsystem/classes/HotelBranchAmenities.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/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 support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a 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
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3.0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
class HotelBranchAmenities extends ObjectModel
|
||||
{
|
||||
public $id_hotel;
|
||||
public $amenity_id;
|
||||
public $is_featured;
|
||||
public $date_add;
|
||||
public $date_upd;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'htl_branch_amenity',
|
||||
'primary' => 'id_branch_amenity',
|
||||
'fields' => array(
|
||||
'id_hotel' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'amenity_id' => array('type' => self::TYPE_INT),
|
||||
'is_featured' => array('type' => self::TYPE_INT),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* @param int $idHotel
|
||||
* @param int $idLang defaults to current context language
|
||||
* @param bool $featuredOnly true = is_featured=1 only; false = all active child amenities
|
||||
* @return array
|
||||
*/
|
||||
public static function getAmenities($idHotel, $idLang = 0, $featuredOnly = false)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
$filter = $featuredOnly ? 'AND hba.`is_featured` = 1' : '';
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
|
||||
'SELECT ha.`id_amenity` AS `id`, ha.`logo_type`, ha.`logo`, hal.`name`
|
||||
FROM `'._DB_PREFIX_.'htl_branch_amenity` hba
|
||||
INNER JOIN `'._DB_PREFIX_.'htl_amenity` ha
|
||||
ON (ha.`id_amenity` = hba.`amenity_id`)
|
||||
INNER JOIN `'._DB_PREFIX_.'htl_amenity_lang` hal
|
||||
ON (hal.`id_amenity` = hba.`amenity_id` AND hal.`id_lang` = '.(int)$idLang.')
|
||||
WHERE hba.`id_hotel` = '.(int)$idHotel.'
|
||||
AND ha.`active` = 1
|
||||
AND ha.`id_parent` > 0
|
||||
'.$filter.'
|
||||
ORDER BY ha.`position` ASC, hal.`name` ASC'
|
||||
) ?: array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare amenities tree data for a hotel form, with selection state.
|
||||
*
|
||||
* @param int $idHotel
|
||||
* @param int $idLang defaults to current context language
|
||||
* @return array
|
||||
*/
|
||||
public static function getBranchAmenitiesTreeData($idHotel, $idLang = 0)
|
||||
{
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
$objHotelAmenities = new HotelAmenities();
|
||||
$amenities = $objHotelAmenities->hotelBranchSelectedAmenities(
|
||||
array_column(self::getAmenities($idHotel), 'id'),
|
||||
$idLang
|
||||
);
|
||||
|
||||
if (!$amenities) {
|
||||
return array();
|
||||
}
|
||||
|
||||
foreach ($amenities as $idAmenity => &$amenity) {
|
||||
$amenity['value'] = $idAmenity;
|
||||
$amenity['input_name'] = 'id_amenity_parents';
|
||||
|
||||
$selectedChildAmenities = 0;
|
||||
if (!empty($amenity['children'])) {
|
||||
foreach ($amenity['children'] as &$childAmenity) {
|
||||
$childAmenity['value'] = $childAmenity['id'];
|
||||
$childAmenity['input_name'] = 'id_amenities';
|
||||
if (!empty($childAmenity['selected'])) {
|
||||
$selectedChildAmenities++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($selectedChildAmenities === count($amenity['children'])) {
|
||||
$amenity['selected'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $amenities;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete existing assignments then save new ones for a hotel.
|
||||
*
|
||||
* @param int $idHotel
|
||||
* @param array $amenityIds
|
||||
* @param array $featuredIds amenity IDs that should be marked is_featured=1
|
||||
* @return bool
|
||||
*/
|
||||
public function saveBranchAmenities($idHotel, array $amenityIds, array $featuredIds = array())
|
||||
{
|
||||
Db::getInstance()->delete('htl_branch_amenity', '`id_hotel` = '.(int)$idHotel);
|
||||
|
||||
$featuredSet = array_flip(array_map('intval', $featuredIds));
|
||||
|
||||
foreach ($amenityIds as $amenityId) {
|
||||
$objHotelBranchAmenities = new self();
|
||||
$objHotelBranchAmenities->id_hotel = (int)$idHotel;
|
||||
$objHotelBranchAmenities->amenity_id = (int)$amenityId;
|
||||
$objHotelBranchAmenities->is_featured = isset($featuredSet[$amenityId]) ? 1 : 0;
|
||||
if (!$objHotelBranchAmenities->save()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||