Merge branch 'develop' into gli-1739
This commit is contained in:
@@ -96,3 +96,20 @@
|
||||
right: 0
|
||||
left: unset
|
||||
font-size: 14px
|
||||
|
||||
#order-details-price
|
||||
.icon-bold
|
||||
font-weight: 600
|
||||
#convenience_services, #order_tax_details
|
||||
.panel
|
||||
.table
|
||||
tr
|
||||
&:last-child td
|
||||
border-bottom: none
|
||||
td
|
||||
background-color: #F5F8F9
|
||||
padding: 10px
|
||||
background-color: #F5F8F9
|
||||
// Adding transparent border for display while printing screen
|
||||
border: solid 1px transparent
|
||||
border-radius: 0
|
||||
@@ -7,6 +7,7 @@
|
||||
font-size: $icon-size-base
|
||||
.tree
|
||||
list-style: none
|
||||
overflow: auto
|
||||
@include padding(0, 0, 0, 20px)
|
||||
input
|
||||
vertical-align: baseline
|
||||
@@ -42,6 +43,14 @@
|
||||
&:hover
|
||||
color: #ccc
|
||||
background-color: none
|
||||
.node-hint
|
||||
font-style: italic
|
||||
color: #959595
|
||||
margin-left: 30px
|
||||
margin-top: -4px
|
||||
margin-bottom: 4px
|
||||
.badge
|
||||
margin-left: 5px
|
||||
.tree-actions
|
||||
display: inline-block
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
$('input[name=lastname]').val(infos[1]);
|
||||
$('input[name=company]').val(infos[2]);
|
||||
$('input[name=id_customer]').val(infos[3]);
|
||||
$('input[name=phone]').val(infos[4]);
|
||||
} else {
|
||||
resetCustomerRelatedAddressFields();
|
||||
}
|
||||
|
||||
@@ -54,6 +54,12 @@
|
||||
<p class="form-control-static">{if $gender->name}{$gender->name}{else}{l s='Unknown'}{/if}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">{l s='Phone'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$customer->phone}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">{l s='Age'}</label>
|
||||
<div class="col-lg-9">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{if $module_confirmation}
|
||||
<div class="alert alert-success clearfix">
|
||||
{l s='Your .CSV file has been successfully imported into your shop. Don\'t forget to re-build the products\' search index.'}
|
||||
{l s='Your .CSV file has been successfully imported to your website.'}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
@@ -63,7 +63,6 @@
|
||||
<div class="alert alert-warning import_products_categories">
|
||||
<ul>
|
||||
<li>{l s='Note that the Category import does not support having two categories with the same name.'}</li>
|
||||
<li>{l s='Note that you can have several products with the same reference.'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="alert alert-warning import_supply_orders_details">
|
||||
@@ -166,12 +165,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="csv_file_selected" style="display: none;">
|
||||
<div class="alert alert-success clearfix">
|
||||
<div class="alert alert-success clearfix" style="display:flex; align-items:center;">
|
||||
<input type="hidden" value="{$csv_selected}" name="csv" id="csv_selected_value" />
|
||||
<div class="col-lg-8">
|
||||
<div class="col-xs-8">
|
||||
<span id="csv_selected_filename">{$csv_selected|escape:'html':'UTF-8'}</span>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="col-xs-4">
|
||||
<div class="btn-group pull-right">
|
||||
<button id="file-remove-button" type="button" class="btn btn-default">
|
||||
<i class="icon-refresh"></i>
|
||||
@@ -199,42 +198,40 @@
|
||||
<div class="form-group">
|
||||
<label for="convert" class="control-label col-lg-4">{l s='ISO 8859-1 encoded file?'}</label>
|
||||
<div class="col-lg-8">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input name="convert" id="convert" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes'}</span>
|
||||
<span>{l s='No'}</span>
|
||||
</span>
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="convert" id="convert_on" value="1">
|
||||
<label for="convert_on">{l s='Yes'}</label>
|
||||
<input type="radio" name="convert" id="convert_off" value="0" checked="checked">
|
||||
<label for="convert_off">{l s='No'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="separator" class="control-label col-lg-4">{l s='Field separator'}</label>
|
||||
<div class="col-lg-8">
|
||||
<input id="separator" name="separator" class="fixed-width-xs form-control" type="text" value="{if isset($separator_selected)}{$separator_selected|escape:'html':'UTF-8'}{else};{/if}" />
|
||||
<div class="help-block">{l s='e.g. '} 1; Blouse; 129.90; 5</div>
|
||||
<div class="help-block">{l s='e.g. '} 6; 1; The Sunshine Luxury</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="multiple_value_separator" class="control-label col-lg-4">{l s='Multiple value separator'}</label>
|
||||
<div class="col-lg-8">
|
||||
<input id="multiple_value_separator" name="multiple_value_separator" class="fixed-width-xs form-control" type="text" value="{if isset($multiple_value_separator_selected)}{$multiple_value_separator_selected|escape:'html':'UTF-8'}{else},{/if}" />
|
||||
<div class="help-block">{l s='e.g. '} Blouse; red.jpg, blue.jpg, green.jpg; 129.90</div>
|
||||
<div class="help-block">{l s='e.g. '} The Sunshine Luxury; News Paper:2.jpg, Gym:7.jpg</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="form-group">
|
||||
<label for="truncate" class="control-label col-lg-4">{l s='Delete all'} <span id="entitie">{l s='categories'}</span> {l s='before import'} </label>
|
||||
<div class="col-lg-8">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input id="truncate" name="truncate" type="checkbox"/>
|
||||
<span>
|
||||
<span>{l s='Yes'}</span>
|
||||
<span>{l s='No'}</span>
|
||||
</span>
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="truncate" id="truncate_on" value="1">
|
||||
<label for="truncate_on">{l s='Yes'}</label>
|
||||
<input type="radio" name="truncate" id="truncate_off" value="0" checked="checked">
|
||||
<label for="truncate_off">{l s='No'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="display: none">
|
||||
@@ -244,52 +241,49 @@
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-8">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input id="match_ref" name="match_ref" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes'}</span>
|
||||
<span>{l s='No'}</span>
|
||||
</span>
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="match_ref" id="match_ref_on" value="1">
|
||||
<label for="match_ref_on">{l s='Yes'}</label>
|
||||
<input type="radio" name="match_ref" id="match_ref_off" value="0" checked="checked">
|
||||
<label for="match_ref_off">{l s='No'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="regenerate" class="control-label col-lg-4">{l s='Skip thumbnails regeneration'}</label>
|
||||
<div class="col-lg-8">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input id="regenerate" name="regenerate" type="checkbox" />
|
||||
<span>
|
||||
<span>{l s='Yes'}</span>
|
||||
<span>{l s='No'}</span>
|
||||
</span>
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="regenerate" id="regenerate_on" value="1">
|
||||
<label for="regenerate_on">{l s='Yes'}</label>
|
||||
<input type="radio" name="regenerate" id="regenerate_off" value="0" checked="checked">
|
||||
<label for="regenerate_off">{l s='No'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="forceIDs" class="control-label col-lg-4">
|
||||
<span data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='If you enable this option, your imported items\' ID number will be used as-is. If you do not enable this option, the imported ID number will be ignored, and PrestaShop will instead create auto-incremented ID numbers for all the imported items.'}">
|
||||
<span data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='If you enable this option, your imported items\' ID number will be used as-is. If you do not enable this option, the imported ID number will be ignored, and QloApps will instead create auto-incremented ID numbers for all the imported items.'}">
|
||||
{l s='Force all ID numbers'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-8">
|
||||
<label class="switch-light prestashop-switch fixed-width-lg">
|
||||
<input id="forceIDs" name="forceIDs" type="checkbox"/>
|
||||
<span>
|
||||
<span>{l s='Yes'}</span>
|
||||
<span>{l s='No'}</span>
|
||||
</span>
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="forceIDs" id="forceIDs_on" value="1">
|
||||
<label for="forceIDs_on">{l s='Yes'}</label>
|
||||
<input type="radio" name="forceIDs" id="forceIDs_off" value="0" checked="checked">
|
||||
<label for="forceIDs_off">{l s='No'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<!--
|
||||
{*if empty($files_to_import)*}
|
||||
<div class="alert alert-info">{l s='You must upload a file in order to proceed to the next step'}</div>
|
||||
{*if !count($files_to_import)*}
|
||||
<p>{l s='There is no CSV file available. Please upload one using the \'Upload\' button above.'}</p>
|
||||
-->
|
||||
-->
|
||||
<div class="panel-footer">
|
||||
<button type="submit" name="submitImportFile" id="submitImportFile" class="btn btn-default pull-right" >
|
||||
<i class="process-icon-next"></i> <span>{l s='Next step'}</span>
|
||||
@@ -317,29 +311,26 @@
|
||||
</div>
|
||||
|
||||
<div class="list-group">
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/hotels_import.csv">
|
||||
{l s='Sample Hotels file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/room_types_import.csv">
|
||||
{l s='Sample Room Types file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/rooms_import.csv">
|
||||
{l s='Sample Rooms file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/service_products_import.csv">
|
||||
{l s='Sample Service Products file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/categories_import.csv">
|
||||
{l s='Sample Categories file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/products_import.csv">
|
||||
{l s='Sample Products file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/combinations_import.csv">
|
||||
{l s='Sample Combinations file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/customers_import.csv">
|
||||
{l s='Sample Customers file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/addresses_import.csv">
|
||||
{l s='Sample Addresses file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/manufacturers_import.csv">
|
||||
{l s='Sample Manufacturers file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/suppliers_import.csv">
|
||||
{l s='Sample Suppliers file'}
|
||||
</a>
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/alias_import.csv">
|
||||
{l s='Sample Aliases file'}
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/bookings_import.csv">
|
||||
{l s='Sample Bookings file'}
|
||||
</a>
|
||||
{if $PS_ADVANCED_STOCK_MANAGEMENT}
|
||||
<a class="list-group-item _blank" href="../docs/csv_import/supply_orders_import.csv">
|
||||
@@ -352,9 +343,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
function humanizeSize(bytes) {
|
||||
if (typeof bytes !== 'number')
|
||||
@@ -506,12 +497,13 @@
|
||||
else {
|
||||
$("#match_ref").closest('.form-group').hide();
|
||||
}
|
||||
if ($("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 0) {
|
||||
if ($("#entity > option:selected").val() == 3) {
|
||||
$(".import_products_categories").show();
|
||||
}
|
||||
else {
|
||||
$(".import_products_categories").hide();
|
||||
}
|
||||
|
||||
if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 ||
|
||||
$("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6) {
|
||||
$("#regenerate").closest('.form-group').show();
|
||||
|
||||
@@ -37,11 +37,12 @@
|
||||
{/if}
|
||||
</p>
|
||||
<div class="panel-action clearfix">
|
||||
<span class="module-price">{if isset($element->price)}{if $element->price|floatval == 0}{l s='Free'}{else}{$element->price_formatted}{/if}{else}{l s='Free'}{/if}</span>
|
||||
{if isset($element->type) && $element->type == 'addonsMustHave' && !$element->not_on_disk} <span class="label label-primary">{l s='In Module Directory'}</span>{/if}
|
||||
{if isset($element->type) && $element->type == 'addonsMustHave' && $element->not_on_disk}
|
||||
<span class="module-price">{if isset($element->price)}{if $element->price|floatval == 0}{l s='Free'}{elseif isset($element->id_currency)}{displayPrice price=$element->price currency=$element->id_currency}{/if}{/if}</span>
|
||||
<a class="btn button-action pull-right btn-primary _blank" href="{$element->addons_buy_url|replace:' ':'+'|escape:'html':'UTF-8'}">{l s='Explore'}</a>
|
||||
{else}
|
||||
<a class="btn button-action pull-right btn-primary{if !$element->trusted} untrustedaddon{/if}" {if !$element->trusted} data-target="#moduleNotTrusted" data-toggle="modal"{/if} data-link="{$element->options.install_url|escape:'html':'UTF-8'}" data-module-display-name="{$element->displayName|escape:'html':'UTF-8'}" data-module-name="{$element->name|escape:'html':'UTF-8'}" data-module-image="{if isset($element->image)}{$element->image}{else}{$modules_uri}/{$element->name}/{$element->logo}{/if}" data-author-name="{$element->author|escape:'html':'UTF-8'}" data-author-uri="{if isset($element->author_uri)}{$element->author_uri|escape:'html':'UTF-8'}{/if}" href="{if !$element->trusted}#{else}{$element->options.install_url|escape:'html':'UTF-8'}{/if}" title="{l s='Install'}">{l s='Install'}</a>
|
||||
<a class="btn button-action pull-right btn-primary{if !$element->trusted} untrustedaddon{/if}" {if !$element->trusted} data-target="#moduleNotTrusted" data-toggle="modal"{/if} data-link="{$element->options.install_url|escape:'html':'UTF-8'}" data-module-display-name="{$element->displayName|escape:'html':'UTF-8'}" data-module-name="{$element->name|escape:'html':'UTF-8'}" data-module-image="{if isset($element->image)}{$element->image}{else}{$modules_uri}/{$element->name}/{$element->logo}{/if}" data-author-name="{$element->author|escape:'html':'UTF-8'}" data-author-uri="{if isset($element->author_uri)}{$element->author_uri|escape:'html':'UTF-8'}{/if}" href="{if !$element->trusted}#{else}{$element->options.install_url|escape:'html':'UTF-8'}{/if}" title="{l s='Install'}">{l s='Install'}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
{extends file="helpers/tree/tree.tpl"}
|
||||
<script>
|
||||
{block name="script" append}
|
||||
$(document).ready(function () {
|
||||
$('#{$id|escape:'html':'UTF-8'}').find('[name="hotel_box[]"]').on('click', function(){
|
||||
if ($(this).is(":checked")) {
|
||||
$(this).closest('.tree-folder').find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', true);
|
||||
$(this).parent().addClass('tree-selected');
|
||||
});
|
||||
} else {
|
||||
$(this).closest('.tree-folder').find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', false);
|
||||
$(this).parent().removeClass('tree-selected');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
{/block}
|
||||
</script>
|
||||
@@ -1,200 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="panel">
|
||||
{if isset($header)}{$header}{/if}
|
||||
{if isset($nodes)}
|
||||
<ul id="{$id|escape:'html':'UTF-8'}" class="cattree tree">
|
||||
{$nodes}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var currentToken="{$token|@addslashes}";
|
||||
var treeClickFunc = function() {
|
||||
var newURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
|
||||
var queryString = window.location.search.replace(/&id_category=[0-9]*/, "") + "&id_category=" + $(this).val();
|
||||
location.href = newURL+queryString; // hash part is dropped: window.location.hash
|
||||
};
|
||||
function addDefaultCategory(elem)
|
||||
{
|
||||
$('select#id_category_default').append('<option value="' + elem.val()+'">' + (elem.val() !=1 ? elem.parent().find('label').html() : home) + '</option>');
|
||||
if ($('select#id_category_default option').length > 0)
|
||||
{
|
||||
$('select#id_category_default').closest('.form-group').show();
|
||||
$('#no_default_category').hide();
|
||||
}
|
||||
}
|
||||
|
||||
{if isset($use_checkbox) && $use_checkbox == true}
|
||||
function checkAllAssociatedHotels($tree)
|
||||
{
|
||||
$tree.find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', true);
|
||||
$(this).parent().addClass('tree-selected');
|
||||
});
|
||||
}
|
||||
|
||||
function uncheckAllAssociatedHotels($tree)
|
||||
{
|
||||
$tree.find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', false);
|
||||
$(this).parent().removeClass('tree-selected');
|
||||
});
|
||||
}
|
||||
|
||||
function checkAllRoomTypeOfHotel(node)
|
||||
{
|
||||
$(node).find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', true);
|
||||
$(this).parent().addClass('tree-selected');
|
||||
});
|
||||
}
|
||||
|
||||
function unCheckAllRoomTypeOfHotel(node)
|
||||
{
|
||||
$(node).find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', false);
|
||||
$(this).parent().removeClass('tree-selected');
|
||||
});
|
||||
}
|
||||
{/if}
|
||||
$('#{$id|escape:'html':'UTF-8'}').find('.select_hotel').on('click', function(){
|
||||
if ($(this).is(":checked")) {
|
||||
checkAllRoomTypeOfHotel($(this).closest('li.tree-folder').find('ul.tree'));
|
||||
} else {
|
||||
unCheckAllRoomTypeOfHotel($(this).closest('li.tree-folder').find('ul.tree'));
|
||||
}
|
||||
});
|
||||
|
||||
$('#{$id|escape:'html':'UTF-8'}').find(':input[type=checkbox].select_room_type').on('change', function(){
|
||||
var totalNodes = $(this).closest('ul.tree').find('li.tree-item');
|
||||
var checkedNodes = $(this).closest('ul.tree').find('li.tree-item :input[type=checkbox].select_room_type:checked');
|
||||
if (totalNodes.length == checkedNodes.length) {
|
||||
$(this).closest('li.tree-folder').find(':input[type=checkbox].select_hotel').prop('checked', true).parent().addClass('tree-selected');
|
||||
} else {
|
||||
$(this).closest('li.tree-folder').find(':input[type=checkbox].select_hotel').prop('checked', false).parent().removeClass('tree-selected');
|
||||
}
|
||||
});
|
||||
{if isset($use_search) && $use_search == true}
|
||||
$('#{$id|escape:'html':'UTF-8'}-categories-search').bind('typeahead:selected', function(obj, datum){
|
||||
var match = $('#{$id|escape:'html':'UTF-8'}').find(':input[value="'+datum.id_category+'"]').first();
|
||||
if (match.length)
|
||||
{
|
||||
match.each(function(){
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
addDefaultCategory($(this));
|
||||
}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
var selected = [];
|
||||
that = this;
|
||||
$('#{$id|escape:'html':'UTF-8'}').find('.tree-selected input').each(
|
||||
function()
|
||||
{
|
||||
selected.push($(this).val());
|
||||
}
|
||||
);
|
||||
{literal}
|
||||
$.get(
|
||||
'ajax-tab.php',
|
||||
{controller:'AdminNormalProducts',token:currentToken,action:'getCategoryTree', fullTree:1, selected:selected},
|
||||
function(content) {
|
||||
{/literal}
|
||||
$('#{$id|escape:'html':'UTF-8'}').html(content);
|
||||
$('#{$id|escape:'html':'UTF-8'}').tree('init');
|
||||
$('#{$id|escape:'html':'UTF-8'}').find(':input[value="'+datum.id_category+'"]').each(function(){
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
full_loaded = true;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
{/if}
|
||||
function startTree() {
|
||||
if (typeof $.fn.tree === 'undefined') {
|
||||
setTimeout(startTree, 100);
|
||||
return;
|
||||
}
|
||||
|
||||
$('#{$id|escape:'html':'UTF-8'}').tree('expandAll');
|
||||
$('#expand-all-{$id|escape:'html':'UTF-8'}').hide();
|
||||
$('#{$id|escape:'html':'UTF-8'}').find(':input[type=radio]').click(treeClickFunc);
|
||||
|
||||
{if isset($selected_hotels)}
|
||||
$('#no_default_category').hide();
|
||||
{assign var=imploded_selected_hotels value='","'|implode:$selected_hotels}
|
||||
var selected_hotels = new Array("{$imploded_selected_hotels}");
|
||||
|
||||
|
||||
|
||||
$('#{$id|escape:'html':'UTF-8'}').find(':input.select_hotel').each(function(){
|
||||
if ($.inArray($(this).val(), selected_hotels) != -1)
|
||||
{
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
}
|
||||
});
|
||||
{/if}
|
||||
|
||||
{if isset($selected_roomtypes)}
|
||||
$('#no_default_category').hide();
|
||||
{assign var=imploded_selected_hotels value='","'|implode:$selected_roomtypes}
|
||||
var selected_roomtypes = new Array("{$imploded_selected_hotels}");
|
||||
|
||||
|
||||
|
||||
$('#{$id|escape:'html':'UTF-8'}').find(':input.select_room_type').each(function(){
|
||||
if ($.inArray($(this).val(), selected_roomtypes) != -1)
|
||||
{
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
}
|
||||
});
|
||||
{/if}
|
||||
}
|
||||
startTree();
|
||||
</script>
|
||||
@@ -1,31 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="tree-actions pull-right">
|
||||
{if isset($actions)}
|
||||
{foreach from=$actions item=action}
|
||||
{$action->render()}
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
@@ -234,13 +234,13 @@
|
||||
</div>
|
||||
<div class="form-group" id="associated_hotel_rooms_tree" {if $product->service_product_type == Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE}style="display:none;"{/if}>
|
||||
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="category_box" type="category_box"}</span></div>
|
||||
<label class="control-label col-lg-2" for="category_block">
|
||||
<label class="control-label col-lg-2" for="hotel_block">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select room type and hotels for which this service will be available.'}">
|
||||
{l s='Associated Hotels and Room Types'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div id="category_block">
|
||||
<div id="hotel_block">
|
||||
{$hotel_tree}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1459,22 +1459,12 @@
|
||||
$('#address_delivery, #address_invoice').show();
|
||||
}
|
||||
|
||||
/*Changed by webkul to make delivery and invoice addresses same*/
|
||||
$('#id_address_delivery').html(addresses_delivery_options).hide();
|
||||
$('#id_address_invoice').html(addresses_delivery_options).hide();
|
||||
$('#address_delivery_detail').html(address_delivery_detail);
|
||||
$('#address_invoice_detail').html(address_delivery_detail);
|
||||
$('#edit_delivery_address').attr('href', delivery_address_edit_link);
|
||||
$('#edit_invoice_address').attr('href', delivery_address_edit_link);
|
||||
/*END*/
|
||||
|
||||
/*Original*/
|
||||
/*$('#id_address_delivery').html(addresses_delivery_options);
|
||||
$('#id_address_invoice').html(addresses_invoice_options);
|
||||
$('#id_address_invoice').html(addresses_invoice_options).hide();
|
||||
$('#address_delivery_detail').html(address_delivery_detail);
|
||||
$('#address_invoice_detail').html(address_invoice_detail);
|
||||
$('#edit_delivery_address').attr('href', delivery_address_edit_link);
|
||||
$('#edit_invoice_address').attr('href', invoice_address_edit_link);*/
|
||||
$('#edit_invoice_address').attr('href', invoice_address_edit_link);
|
||||
}
|
||||
|
||||
function updateAddresses()
|
||||
@@ -2004,7 +1994,7 @@
|
||||
<div id="addresses_err" class="alert alert-warning" style="display:none;"></div>
|
||||
|
||||
<div class="row">
|
||||
<div id="address_delivery" class="col-xs-6 col-sm-6">
|
||||
<div id="address_delivery" class="col-xs-6 col-sm-6 hidden">
|
||||
<h4>
|
||||
<i class="icon-map-marker"></i>
|
||||
{l s='Customer Address'}
|
||||
@@ -2017,7 +2007,7 @@
|
||||
<div id="address_delivery_detail"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="address_invoice" class="col-lg-6 hidden">
|
||||
<div id="address_invoice" class="col-lg-6">
|
||||
<h4>
|
||||
<i class="icon-file-text"></i>
|
||||
{l s='Invoice'}
|
||||
|
||||
@@ -554,11 +554,10 @@
|
||||
|
||||
<dd><i class="icon-user"></i> <b><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}">{$customer->firstname} {$customer->lastname}</a></b></dd>
|
||||
<dd><i class="icon-envelope"></i> <b><a href="mailto:{$customer->email}">{$customer->email}</a></b></dd>
|
||||
{if $addresses.invoice->phone_mobile || $addresses.invoice->phone}
|
||||
<dd><i class="icon-phone"></i> <b><a href="tel:{if $addresses.invoice->phone_mobile}{$addresses.invoice->phone_mobile}{else}{$addresses.invoice->phone}{/if}">{if $addresses.invoice->phone_mobile}{$addresses.invoice->phone_mobile}{else}{$addresses.invoice->phone}{/if}</a></b></dd>
|
||||
{if $customer->phone}
|
||||
<dd><i class="icon-phone"></i> <b><a href="tel:{$customer->phone}">{$customer->phone}</a></b></dd>
|
||||
{/if}
|
||||
</dl>
|
||||
|
||||
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&id_order={$order->id|intval}&token={getAdminToken tab='AdminCustomers'}">
|
||||
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
|
||||
<input class="btn btn-primary" type="submit" name="submitGuestToCustomer" value="{l s='Transform this guest into a customer'}" />
|
||||
@@ -575,8 +574,8 @@
|
||||
|
||||
<dd><i class="icon-user"></i> <b><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}">{$customer->firstname} {$customer->lastname}</a></b></dd>
|
||||
<dd><i class="icon-envelope"></i> <b><a href="mailto:{$customer->email}">{$customer->email}</a></b></dd>
|
||||
{if $addresses.invoice->phone_mobile || $addresses.invoice->phone}
|
||||
<dd><i class="icon-phone"></i> <b><a href="tel:{if $addresses.invoice->phone_mobile}{$addresses.invoice->phone_mobile}{else}{$addresses.invoice->phone}{/if}">{if $addresses.invoice->phone_mobile}{$addresses.invoice->phone_mobile}{else}{$addresses.invoice->phone}{/if}</a></b></dd>
|
||||
{if $customer->phone}
|
||||
<dd><i class="icon-phone"></i> <b><a href="tel:{$customer->phone}">{$customer->phone}</a></b></dd>
|
||||
{/if}
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
@@ -837,7 +836,7 @@
|
||||
<div class="col-lg-4 col-sm-6 col-xs-12 pull-right">
|
||||
<div class="panel panel-total">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<table class="table" id="order-details-price">
|
||||
{* Assign order price *}
|
||||
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
|
||||
{assign var=order_product_price value=($order->total_products)}
|
||||
@@ -889,50 +888,82 @@
|
||||
|
||||
{if isset($convenience_fee_price_tax_excl) && $convenience_fee_price_tax_excl > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Convenience Fee (Tax excl.)'}</td>
|
||||
<td class="text-right">
|
||||
{l s='Convenience Fee (Tax excl.)'}
|
||||
{if isset($booking_auto_added_services) && count($booking_auto_added_services)}
|
||||
<span role="button" id="view_convenience_services" class="pull-left"><i class="icon-angle-down icon-bold"></i><i class="icon-angle-up icon-bold" style="display:none;"></i></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=$convenience_fee_price_tax_excl currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{if isset($booking_auto_added_services) && count($booking_auto_added_services)}
|
||||
<tr id="convenience_services" style="display:none;">
|
||||
<td colspan="3" class="panel">
|
||||
<table class="table table-responsive">
|
||||
<tbody>
|
||||
{foreach $booking_auto_added_services as $service}
|
||||
<tr>
|
||||
<td class="text-left"><span>{$service.name}</span></td>
|
||||
<td class="text-right"><span>{displayPrice price=$service.total_price_tax_excl currency=$currency->id}</span></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if $room_price_tax_excl}
|
||||
<tr id="total_tax_order">
|
||||
<td class="text-right">{l s='Total Rooms Tax'}</td>
|
||||
<td class="text-right nowrap">
|
||||
{displayPrice price=($room_price_tax_incl - $room_price_tax_excl) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0}
|
||||
<tr id="total_tax_order">
|
||||
<td class="text-right">{l s='Extra services Tax'}</td>
|
||||
<td class="text-right nowrap">
|
||||
{displayPrice price=(($additional_service_price_tax_incl - $additional_service_price_tax_excl) - ($convenience_fee_price_tax_incl - $convenience_fee_price_tax_excl)) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($convenience_fee_price_tax_excl) && $convenience_fee_price_tax_excl > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Convenience Fee Tax'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=($convenience_fee_price_tax_incl - $convenience_fee_price_tax_excl) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{* {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} *}
|
||||
<tr id="total_taxes">
|
||||
<td class="text-right"><strong>{l s='Total Taxes'}</strong>
|
||||
<td class="text-right">
|
||||
<strong>{l s='Total Taxes'} </strong>
|
||||
{if ($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0}
|
||||
<span role="button" id="view_order_tax_details" class="pull-left"><i class="icon-angle-down icon-bold"></i><i class="icon-angle-up icon-bold" style="display:none;"></i></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="amount text-right nowrap" ><strong>{displayPrice price=(($order->total_paid_tax_incl + $order->total_discounts_tax_incl) - ($order->total_paid_tax_excl + $order->total_discounts_tax_excl)) currency=$currency->id}</strong>
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{if ($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0}
|
||||
<tr id="order_tax_details" style="display:none;">
|
||||
<td colspan="3" class="panel">
|
||||
<table class="table table-responsive">
|
||||
<tbody>
|
||||
{if $room_price_tax_excl}
|
||||
<tr>
|
||||
<td class="text-left">{l s='Total Rooms Tax'}</td>
|
||||
<td class="text-right">
|
||||
{displayPrice price=($room_price_tax_incl - $room_price_tax_excl) currency=$currency->id}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($additional_service_price_tax_incl) && (($additional_service_price_tax_incl - $additional_service_price_tax_excl) - ($convenience_fee_price_tax_incl - $convenience_fee_price_tax_excl)) > 0}
|
||||
<tr>
|
||||
<td class="text-left">{l s='Extra services Tax'}</td>
|
||||
<td class="text-right nowrap">
|
||||
{displayPrice price=(($additional_service_price_tax_incl - $additional_service_price_tax_excl) - ($convenience_fee_price_tax_incl - $convenience_fee_price_tax_excl)) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($convenience_fee_price_tax_excl) && $convenience_fee_price_tax_excl > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-left">{l s='Convenience Fee Tax'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=($convenience_fee_price_tax_incl - $convenience_fee_price_tax_excl) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* {/if} *}
|
||||
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td class="text-right"><strong>{l s='Total Booking Amount'}</strong></td>
|
||||
|
||||
@@ -22,11 +22,84 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="panel">
|
||||
{if isset($header)}{$header}{/if}
|
||||
{if isset($nodes)}
|
||||
<ul id="{$id|escape:'html':'UTF-8'}" class="tree">
|
||||
{$nodes}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{block name="tree_panel"}
|
||||
|
||||
<div class="panel">
|
||||
{block name="tree_header"}
|
||||
{if isset($header)}{$header}{/if}
|
||||
{/block}
|
||||
{block name="tree"}
|
||||
{if isset($nodes)}
|
||||
<ul id="{$id|escape:'html':'UTF-8'}" class="tree top" style="max-height: {$max_height}px;">
|
||||
{$nodes}
|
||||
</ul>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
<script type="text/javascript">
|
||||
{block name="script"}
|
||||
{if isset($use_checkbox) && $use_checkbox == true}
|
||||
function checkAll($tree)
|
||||
{
|
||||
$tree.find(":input[type=checkbox]").each(
|
||||
function()
|
||||
{
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function uncheckAll($tree)
|
||||
{
|
||||
$tree.find(":input[type=checkbox]").each(
|
||||
function()
|
||||
{
|
||||
$(this).prop("checked", false);
|
||||
$(this).parent().removeClass("tree-selected");
|
||||
}
|
||||
);
|
||||
}
|
||||
{/if}
|
||||
{if isset($use_search) && $use_search == true}
|
||||
$("#{$id|escape:'html':'UTF-8'}-search").bind("typeahead:selected", function(obj, datum) {
|
||||
$("#{$id|escape:'html':'UTF-8'}").find(":input").each(
|
||||
function()
|
||||
{
|
||||
if ($(this).val() == datum.value)
|
||||
{
|
||||
{if (!(isset($use_checkbox) && $use_checkbox == true))}
|
||||
$("#{$id|escape:'html':'UTF-8'} label").removeClass("tree-selected");
|
||||
{/if}
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
{/if}
|
||||
|
||||
$(document).ready(function () {
|
||||
var tree = $("#{$id|escape:'html':'UTF-8'}").tree('collapseAll');
|
||||
|
||||
|
||||
if ($("#{$id|escape:'html':'UTF-8'}").find(":input:checked").length > 1)
|
||||
$('#expand-all-{$id|escape:'html':'UTF-8'}').hide();
|
||||
else
|
||||
$('#collapse-all-{$id|escape:'html':'UTF-8'}').hide();
|
||||
|
||||
$("#{$id|escape:'html':'UTF-8'}").find(":input:checked").each(function(){
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
});
|
||||
});
|
||||
{/block}
|
||||
</script>
|
||||
@@ -69,7 +69,7 @@
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<div class="panel">
|
||||
{if isset($header)}{$header}{/if}
|
||||
{if isset($nodes)}
|
||||
<ul id="{$id|escape:'html':'UTF-8'}" class="cattree tree">
|
||||
{$nodes}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var currentToken="{$token|@addslashes}";
|
||||
{if isset($use_checkbox) && $use_checkbox == true}
|
||||
function checkAllAssociatedCategories($tree)
|
||||
{
|
||||
$tree.find(":input[type=checkbox]").each(
|
||||
function()
|
||||
{
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function uncheckAllAssociatedCategories($tree)
|
||||
{
|
||||
$tree.find(":input[type=checkbox]").each(
|
||||
function()
|
||||
{
|
||||
$(this).prop("checked", false);
|
||||
$(this).parent().removeClass("tree-selected");
|
||||
}
|
||||
);
|
||||
}
|
||||
{/if}
|
||||
{if isset($use_search) && $use_search == true}
|
||||
$("#{$id|escape:'html':'UTF-8'}-categories-search").bind("typeahead:selected", function(obj, datum) {
|
||||
$("#{$id|escape:'html':'UTF-8'}").find(":input").each(
|
||||
function()
|
||||
{
|
||||
if ($(this).val() == datum.id_category)
|
||||
{
|
||||
{if (!(isset($use_checkbox) && $use_checkbox == true))}
|
||||
$("#{$id|escape:'html':'UTF-8'} label").removeClass("tree-selected");
|
||||
{/if}
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
{/if}
|
||||
$(document).ready(function () {
|
||||
$("#{$id|escape:'html':'UTF-8'}").tree("collapseAll");
|
||||
|
||||
{if isset($selected_categories)}
|
||||
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
|
||||
var selected_categories = new Array("{$imploded_selected_categories}");
|
||||
|
||||
$("#{$id|escape:'html':'UTF-8'}").find(":input").each(
|
||||
function()
|
||||
{
|
||||
if ($.inArray($(this).val(), selected_categories) != -1)
|
||||
{
|
||||
$(this).prop("checked", true);
|
||||
$(this).parent().addClass("tree-selected");
|
||||
$(this).parents('ul.tree').each(function(){
|
||||
$(this).show();
|
||||
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
{/if}
|
||||
});
|
||||
</script>
|
||||
@@ -27,6 +27,12 @@
|
||||
<i class="icon-folder-close"></i>
|
||||
<label class="tree-toggler">{$node['name']|escape:'html':'UTF-8'}</label>
|
||||
</span>
|
||||
{if isset($node['badge'])}
|
||||
<span class="badge {if isset($node['badge']['class'])}{$node['badge']['class']}{/if}">{$node['badge']['title']}</span>
|
||||
{/if}
|
||||
{if isset($node['hint'])}
|
||||
<div class="node-hint">{$node['hint']}</div>
|
||||
{/if}
|
||||
<ul class="tree">
|
||||
{$children|escape:'UTF-8'}
|
||||
</ul>
|
||||
|
||||
@@ -24,12 +24,18 @@
|
||||
*}
|
||||
<li class="tree-folder">
|
||||
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
|
||||
{if isset($node['id_category']) && $node['id_category'] != $root_category}
|
||||
<input type="checkbox" name="{$input_name}[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
{if !isset($selectable) || $selectable}
|
||||
<input type="checkbox" name="{$node['input_name']}[]" value="{$node['value']}"{if isset($node['selected']) && $node['selected'] == true} checked="checked"{/if}{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
{/if}
|
||||
<i class="icon-folder-close"></i>
|
||||
<label class="tree-toggler">{if isset($node['name'])}{$node['name']|escape:'html':'UTF-8'}{/if}{if isset($node['selected_childs']) && (int)$node['selected_childs'] > 0} {l s='(%s selected)' sprintf=$node['selected_childs']}{/if}</label>
|
||||
</span>
|
||||
{if isset($node['badge'])}
|
||||
<span class="badge {if isset($node['badge']['class'])}{$node['badge']['class']}{/if}">{$node['badge']['title']}</span>
|
||||
{/if}
|
||||
{if isset($node['hint'])}
|
||||
<div class="node-hint">{$node['hint']}</div>
|
||||
{/if}
|
||||
<ul class="tree">
|
||||
{$children|escape:'UTF-8'}
|
||||
</ul>
|
||||
|
||||
@@ -24,12 +24,18 @@
|
||||
*}
|
||||
<li class="tree-folder">
|
||||
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
|
||||
{if $node['id_category'] != $root_category}
|
||||
<input type="radio" name="{$input_name}" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
{if !isset($selectable) || $selectable}
|
||||
<input type="radio" name="{$node['input_name']}" value="{$node['value']}"{if isset($node['selected']) && $node['selected'] == true} checked="checked"{/if}{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
{/if}
|
||||
<i class="icon-folder-close"></i>
|
||||
<label class="tree-toggler">{$node['name']|escape:'html':'UTF-8'}</label>
|
||||
</span>
|
||||
{if isset($node['badge'])}
|
||||
<span class="badge {if isset($node['badge']['class'])}{$node['badge']['class']}{/if}">{$node['badge']['title']}</span>
|
||||
{/if}
|
||||
{if isset($node['hint'])}
|
||||
<div class="node-hint">{$node['hint']}</div>
|
||||
{/if}
|
||||
<ul class="tree">
|
||||
{$children}
|
||||
</ul>
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<li class="tree-folder">
|
||||
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
|
||||
{if isset($node['id_hotel'])}
|
||||
<input type="checkbox" class="select_hotel" name="{$input_name}[]" value="{$node['id_hotel']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
{* {if isset($node['id_category']) && $node['id_category'] != $root_category} *}
|
||||
{/if}
|
||||
<i class="icon-folder-close"></i>
|
||||
<label class="tree-toggler">{if isset($node['name'])}{$node['name']|escape:'html':'UTF-8'}{/if}{if isset($node['selected_childs']) && (int)$node['selected_childs'] > 0} {l s='(%s selected)' sprintf=$node['selected_childs']}{/if}</label>
|
||||
</span>
|
||||
<ul class="tree">
|
||||
{$children|escape:'UTF-8'}
|
||||
</ul>
|
||||
</li>
|
||||
@@ -1,31 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
|
||||
<span class="tree-item-name{if isset($node['disabled']) && $node['disabled'] == true} tree-item-name-disable{/if}">
|
||||
<input type="checkbox" class="select_room_type" name="{$input_name}[]" value="{$node['id_product']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
<i class="tree-dot"></i>
|
||||
<label class="tree-toggler">{$node['room_type']}</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -28,4 +28,10 @@
|
||||
<i class="tree-dot"></i>
|
||||
<label class="tree-toggler">{$node['name']}</label>
|
||||
</span>
|
||||
{if isset($node['badge'])}
|
||||
<span class="badge {if isset($node['badge']['class'])}{$node['badge']['class']}{/if}">{$node['badge']['title']}</span>
|
||||
{/if}
|
||||
{if isset($node['hint'])}
|
||||
<div class="node-hint">{$node['hint']}</div>
|
||||
{/if}
|
||||
</li>
|
||||
@@ -24,8 +24,14 @@
|
||||
*}
|
||||
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
|
||||
<span class="tree-item-name{if isset($node['disabled']) && $node['disabled'] == true} tree-item-name-disable{/if}">
|
||||
<input type="checkbox" name="{$input_name}[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
<input type="checkbox" name="{$node['input_name']}[]" value="{$node['value']}"{if isset($node['selected']) && $node['selected'] == true} checked="checked"{/if}{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
<i class="tree-dot"></i>
|
||||
<label class="tree-toggler">{$node['name']}</label>
|
||||
</span>
|
||||
</li>
|
||||
{if isset($node['badge'])}
|
||||
<span class="badge {if isset($node['badge']['class'])}{$node['badge']['class']}{/if}">{$node['badge']['title']}</span>
|
||||
{/if}
|
||||
{if isset($node['hint'])}
|
||||
<div class="node-hint">{$node['hint']}</div>
|
||||
{/if}
|
||||
</li>
|
||||
|
||||
@@ -24,8 +24,14 @@
|
||||
*}
|
||||
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
|
||||
<span class="tree-item-name">
|
||||
<input type="radio" name="{$input_name}" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
<input type="radio" name="{$node['input_name']}" value="{$node['value']}"{if isset($node['selected']) && $node['selected'] == true} checked="checked"{/if}{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
|
||||
<i class="tree-dot"></i>
|
||||
<label class="tree-toggler">{$node['name']}</label>
|
||||
</span>
|
||||
{if isset($node['badge'])}
|
||||
<span class="badge {if isset($node['badge']['class'])}{$node['badge']['class']}{/if}">{$node['badge']['title']}</span>
|
||||
{/if}
|
||||
{if isset($node['hint'])}
|
||||
<div class="node-hint">{$node['hint']}</div>
|
||||
{/if}
|
||||
</li>
|
||||
@@ -1078,8 +1078,6 @@ class CartCore extends ObjectModel
|
||||
if (Context::getContext()->customer->id) {
|
||||
if ($id_address_delivery == 0 && (int)$this->id_address_delivery) { // The $id_address_delivery is null, use the cart delivery address
|
||||
$id_address_delivery = $this->id_address_delivery;
|
||||
} elseif ($id_address_delivery == 0) { // The $id_address_delivery is null, get the default customer address
|
||||
$id_address_delivery = (int)Address::getFirstCustomerAddressId((int)Context::getContext()->customer->id);
|
||||
} elseif (!Customer::customerHasAddress(Context::getContext()->customer->id, $id_address_delivery)) { // The $id_address_delivery must be linked with customer
|
||||
$id_address_delivery = 0;
|
||||
}
|
||||
@@ -4109,7 +4107,7 @@ class CartCore extends ObjectModel
|
||||
$cart->id_shop_group = $this->id_shop_group;
|
||||
|
||||
if (!Customer::customerHasAddress((int)$cart->id_customer, (int)$cart->id_address_delivery)) {
|
||||
$cart->id_address_delivery = (int)Address::getFirstCustomerAddressId((int)$cart->id_customer);
|
||||
$cart->id_address_delivery = 0;
|
||||
}
|
||||
|
||||
if (!Customer::customerHasAddress((int)$cart->id_customer, (int)$cart->id_address_invoice)) {
|
||||
@@ -4501,11 +4499,9 @@ class CartCore extends ObjectModel
|
||||
public function autosetProductAddress()
|
||||
{
|
||||
$id_address_delivery = 0;
|
||||
// Get the main address of the customer
|
||||
|
||||
if ((int)$this->id_address_delivery > 0) {
|
||||
$id_address_delivery = (int)$this->id_address_delivery;
|
||||
} else {
|
||||
$id_address_delivery = (int)Address::getFirstCustomerAddressId(Context::getContext()->customer->id);
|
||||
}
|
||||
|
||||
if (!$id_address_delivery) {
|
||||
|
||||
@@ -63,6 +63,45 @@ class CartCustomerGuestDetailCore extends ObjectModel
|
||||
);
|
||||
}
|
||||
|
||||
public static function getCustomerDefaultDetails($email)
|
||||
{
|
||||
return Db::getInstance()->getRow(
|
||||
'SELECT * FROM `'._DB_PREFIX_.'cart_customer_guest_detail`
|
||||
WHERE `id_cart` = 0 AND `email` = "'.pSQL($email).'"'
|
||||
);
|
||||
}
|
||||
|
||||
public static function updateCustomerPhoneNumber($email, $phone)
|
||||
{
|
||||
if ($customerDetail = self::getCustomerDefaultDetails($email)) {
|
||||
$objCartCustomerGuestDetail = new CartCustomerGuestDetail($customerDetail['id_customer_guest_detail']);
|
||||
$objCartCustomerGuestDetail->phone = $phone;
|
||||
return $objCartCustomerGuestDetail->save();
|
||||
} else {
|
||||
$objCustomer = new Customer();
|
||||
if (Validate::isLoadedObject($customer = $objCustomer->getByEmail($email, null, false))) {
|
||||
$objCartCustomerGuestDetail = new CartCustomerGuestDetail();
|
||||
$objCartCustomerGuestDetail->id_cart = 0;
|
||||
$objCartCustomerGuestDetail->id_gender = $customer->id_gender;
|
||||
$objCartCustomerGuestDetail->firstname = $customer->firstname;
|
||||
$objCartCustomerGuestDetail->lastname = $customer->lastname;
|
||||
$objCartCustomerGuestDetail->email = $customer->email;
|
||||
$objCartCustomerGuestDetail->phone = $phone;
|
||||
return $objCartCustomerGuestDetail->save();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getCustomerPhone($email)
|
||||
{
|
||||
return Db::getInstance()->getValue(
|
||||
'SELECT `phone` FROM `'._DB_PREFIX_.'cart_customer_guest_detail`
|
||||
WHERE `id_cart` = 0 AND `email` = "'.pSQL($email).'"'
|
||||
);
|
||||
}
|
||||
|
||||
public function validateGuestInfo()
|
||||
{
|
||||
$isValid = true;
|
||||
|
||||
@@ -410,6 +410,8 @@ class CartRuleCore extends ObjectModel
|
||||
}
|
||||
unset($cart_rule);
|
||||
|
||||
Hook::exec('actionCustomerCartRulesModifier', array('cart_rules' => &$result, 'id_customer' => (int)$id_customer));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -518,6 +520,38 @@ class CartRuleCore extends ObjectModel
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* If null is provided, default validation will be processed. Useful if you want your own conditions,
|
||||
* but also want to retain functionality of the core.
|
||||
*
|
||||
* If true is provided, the validation ends here and the rule is VALID, ignoring the rest of core validation.
|
||||
*
|
||||
* If false is provided, the validation ends here and the rule is not VALID, ignoring the rest of core validation.
|
||||
* In this case, it's recommended to properly alter the isValidatedByModulesError error message so the user knows why.
|
||||
*/
|
||||
$isValidatedByModules = null;
|
||||
$isValidatedByModulesError = Tools::displayError('This voucher is not valid.');
|
||||
Hook::exec(
|
||||
'actionValidateCartRule',
|
||||
array(
|
||||
'cart_rule' => $this,
|
||||
'context' => $context,
|
||||
'alreadyInCart' => $alreadyInCart,
|
||||
'display_error' => $display_error,
|
||||
'check_carrier' => $check_carrier,
|
||||
'isValidatedByModules' => &$isValidatedByModules,
|
||||
'isValidatedByModulesError' => &$isValidatedByModulesError,
|
||||
)
|
||||
);
|
||||
|
||||
if ($isValidatedByModules === false) {
|
||||
return (!$display_error) ? false : $isValidatedByModulesError;
|
||||
}
|
||||
|
||||
if ($isValidatedByModules === true) {
|
||||
return (!$display_error) ? true : null;
|
||||
}
|
||||
|
||||
if (!$this->active) {
|
||||
return (!$display_error) ? false : Tools::displayError('This voucher is disabled');
|
||||
}
|
||||
|
||||
@@ -326,8 +326,6 @@ class ContextCore
|
||||
$this->cart->setDeliveryOption(null);
|
||||
}
|
||||
$this->cart->id_customer = (int) $customer->id;
|
||||
$this->cart->updateAddressId($this->cart->id_address_delivery, (int) Address::getFirstCustomerAddressId((int) ($customer->id)));
|
||||
$this->cart->id_address_delivery = (int) Address::getFirstCustomerAddressId((int) ($customer->id));
|
||||
$this->cart->id_address_invoice = (int) Address::getFirstCustomerAddressId((int) ($customer->id));
|
||||
|
||||
// update id guest in htl_cart_booking_data for bookings added to the cart as a visitor
|
||||
|
||||
@@ -135,6 +135,8 @@ class CustomerCore extends ObjectModel
|
||||
|
||||
public $groupBox;
|
||||
|
||||
public $phone;
|
||||
|
||||
const STATUS_BANNED = 1;
|
||||
const STATUS_DELETED = 2;
|
||||
|
||||
@@ -202,6 +204,10 @@ class CustomerCore extends ObjectModel
|
||||
{
|
||||
$this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP');
|
||||
parent::__construct($id);
|
||||
|
||||
if ($this->email) {
|
||||
$this->phone = CartCustomerGuestDetail::getCustomerPhone($this->email);
|
||||
}
|
||||
}
|
||||
|
||||
public function add($autodate = true, $null_values = true)
|
||||
@@ -484,6 +490,18 @@ class CustomerCore extends ObjectModel
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
public static function getPhone($id_customer)
|
||||
{
|
||||
|
||||
return Db::getInstance()->getValue(
|
||||
'SELECT cgd.`phone`
|
||||
FROM `'._DB_PREFIX_.'customer` c
|
||||
INNER JOIN `'._DB_PREFIX_.'cart_customer_guest_detail` cgd
|
||||
ON (cgd.`email` = c.`email`)
|
||||
WHERE `id_cart` = 0 AND c.`id_customer` = '.(int)($id_customer)
|
||||
);
|
||||
}
|
||||
|
||||
public static function getCustomerIdAddress($id_customer, $use_cache = true)
|
||||
{
|
||||
$cache_id = 'Customer::getCustomerIdAddress'.(int)$id_customer;
|
||||
|
||||
@@ -1163,16 +1163,6 @@ abstract class PaymentModuleCore extends Module
|
||||
$this->context->currency,
|
||||
false
|
||||
),
|
||||
'{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"),
|
||||
'{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"),
|
||||
'{delivery_block_html}' => $this->_getFormatedAddress($delivery, '<br />', array(
|
||||
'firstname' => '<span style="font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="font-weight:bold;">%s</span>'
|
||||
)),
|
||||
'{invoice_block_html}' => $this->_getFormatedAddress($invoice, '<br />', array(
|
||||
'firstname' => '<span style="font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="font-weight:bold;">%s</span>'
|
||||
)),
|
||||
'{delivery_company}' => $delivery->company,
|
||||
'{delivery_firstname}' => $delivery->firstname,
|
||||
'{delivery_lastname}' => $delivery->lastname,
|
||||
|
||||
@@ -534,7 +534,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isPhoneNumber($number)
|
||||
{
|
||||
return preg_match('/^[+0-9. ()-]*$/', $number);
|
||||
return preg_match('/^\+?[\s\d.()-]*\d+$/', $number);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -365,13 +365,13 @@ class FrontControllerCore extends Controller
|
||||
$cart->update();
|
||||
}
|
||||
/* Select an address if not set */
|
||||
if (isset($cart) && (!isset($cart->id_address_delivery) || $cart->id_address_delivery == 0 ||
|
||||
!isset($cart->id_address_invoice) || $cart->id_address_invoice == 0) && $this->context->cookie->id_customer) {
|
||||
if (isset($cart)
|
||||
&& (!isset($cart->id_address_invoice)
|
||||
|| $cart->id_address_invoice == 0
|
||||
)
|
||||
&& $this->context->cookie->id_customer
|
||||
) {
|
||||
$to_update = false;
|
||||
if (!isset($cart->id_address_delivery) || $cart->id_address_delivery == 0) {
|
||||
$to_update = true;
|
||||
$cart->id_address_delivery = (int)Address::getFirstCustomerAddressId($cart->id_customer);
|
||||
}
|
||||
if (!isset($cart->id_address_invoice) || $cart->id_address_invoice == 0) {
|
||||
$to_update = true;
|
||||
$cart->id_address_invoice = (int)Address::getFirstCustomerAddressId($cart->id_customer);
|
||||
@@ -391,8 +391,7 @@ class FrontControllerCore extends Controller
|
||||
$cart->id_shop = $this->context->shop->id;
|
||||
if ($this->context->cookie->id_customer) {
|
||||
$cart->id_customer = (int)$this->context->cookie->id_customer;
|
||||
$cart->id_address_delivery = (int)Address::getFirstCustomerAddressId($cart->id_customer);
|
||||
$cart->id_address_invoice = (int)$cart->id_address_delivery;
|
||||
$cart->id_address_invoice = (int)Address::getFirstCustomerAddressId($cart->id_customer);
|
||||
} else {
|
||||
$cart->id_address_delivery = 0;
|
||||
$cart->id_address_invoice = 0;
|
||||
|
||||
146
classes/helper/HelperTree.php
Normal file
146
classes/helper/HelperTree.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
/**
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
class HelperTreeCore extends TreeCore
|
||||
{
|
||||
|
||||
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_radio.tpl';
|
||||
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_radio.tpl';
|
||||
|
||||
|
||||
private $_use_search;
|
||||
private $_use_bulk_actions;
|
||||
private $_use_checkbox;
|
||||
private $_show_collapse_expand_button = true;
|
||||
private $_max_height = 350;
|
||||
|
||||
|
||||
public function setUseSearch($value)
|
||||
{
|
||||
$this->_use_search = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function useSearch()
|
||||
{
|
||||
return (isset($this->_use_search) && $this->_use_search);
|
||||
}
|
||||
|
||||
public function setUseBulkActions($value)
|
||||
{
|
||||
$this->_use_bulk_actions = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function useBulkActions()
|
||||
{
|
||||
return (isset($this->_use_bulk_actions) && $this->_use_bulk_actions);
|
||||
}
|
||||
|
||||
public function setUseCheckBox($value)
|
||||
{
|
||||
$this->_use_checkbox = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function useCheckBox()
|
||||
{
|
||||
return (isset($this->_use_checkbox) && $this->_use_checkbox);
|
||||
}
|
||||
|
||||
public function setShowCollapseExpandButton($value)
|
||||
{
|
||||
$this->_show_collapse_expand_button = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMaxHeight($value)
|
||||
{
|
||||
$this->_max_height = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function maxHeight()
|
||||
{
|
||||
return $this->_max_height;
|
||||
}
|
||||
|
||||
|
||||
public function showCollapseExpandButton()
|
||||
{
|
||||
return (isset($this->_show_collapse_expand_button) && $this->_show_collapse_expand_button);
|
||||
}
|
||||
|
||||
public function render($data = null)
|
||||
{
|
||||
if ($this->useCheckBox()) {
|
||||
if($this->useBulkActions()) {
|
||||
$check_all = new TreeToolbarLink(
|
||||
'Check All',
|
||||
'#',
|
||||
'checkAll($(\'#'.$this->getId().'\')); return false;',
|
||||
'icon-check-sign');
|
||||
$check_all->setAttribute('id', 'check-all-'.$this->getId());
|
||||
$uncheck_all = new TreeToolbarLink(
|
||||
'Uncheck All',
|
||||
'#',
|
||||
'uncheckAll($(\'#'.$this->getId().'\')); return false;',
|
||||
'icon-check-empty');
|
||||
$uncheck_all->setAttribute('id', 'uncheck-all-'.$this->getId());
|
||||
$this->addAction($check_all);
|
||||
$this->addAction($uncheck_all);
|
||||
}
|
||||
$this->setNodeFolderTemplate('tree_node_folder_checkbox.tpl');
|
||||
$this->setNodeItemTemplate('tree_node_item_checkbox.tpl');
|
||||
$this->setAttribute('use_checkbox', $this->useCheckBox());
|
||||
}
|
||||
|
||||
if ($this->useSearch()) {
|
||||
$this->addAction(new TreeToolbarSearch(
|
||||
$this->getId().' search',
|
||||
$this->getId().'-search')
|
||||
);
|
||||
$this->setAttribute('use_search', $this->useSearch());
|
||||
}
|
||||
|
||||
if ($this->showCollapseExpandButton()) {
|
||||
$collapse_all = new TreeToolbarLink(
|
||||
'Collapse All',
|
||||
'#',
|
||||
'$(\'#'.$this->getId().'\').tree(\'collapseAll\');$(\'#collapse-all-'.$this->getId().'\').hide();$(\'#expand-all-'.$this->getId().'\').show(); return false;',
|
||||
'icon-collapse-alt');
|
||||
$collapse_all->setAttribute('id', 'collapse-all-'.$this->getId());
|
||||
$expand_all = new TreeToolbarLink(
|
||||
'Expand All',
|
||||
'#',
|
||||
'$(\'#'.$this->getId().'\').tree(\'expandAll\');$(\'#collapse-all-'.$this->getId().'\').show();$(\'#expand-all-'.$this->getId().'\').hide(); return false;',
|
||||
'icon-expand-alt');
|
||||
$expand_all->setAttribute('id', 'expand-all-'.$this->getId());
|
||||
$this->addAction($collapse_all);
|
||||
$this->addAction($expand_all);
|
||||
}
|
||||
|
||||
$this->setAttribute('max_height', $this->maxHeight());
|
||||
$this->setAttribute('root_selectable', $this->rootElementSelectable());
|
||||
|
||||
|
||||
return parent::render($data);
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
|
||||
private $_disabled_categories;
|
||||
private $_input_name;
|
||||
private $_input_id;
|
||||
private $_lang;
|
||||
private $_root_category;
|
||||
private $_selected_categories;
|
||||
@@ -69,6 +70,8 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
foreach ($categories[$rootCategoryId] as $category) {
|
||||
$categoryId = (int)$category['id_category'];
|
||||
$tree[$categoryId] = $category;
|
||||
$tree[$categoryId]['value'] = $category['id_category'];
|
||||
$tree[$categoryId]['input_name'] = 'categoryBox';
|
||||
|
||||
if (Category::hasChildren($categoryId, $this->getLang(), false, $this->getShop()->id)) {
|
||||
$categoryChildren = Category::getChildren(
|
||||
@@ -144,7 +147,8 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
}
|
||||
|
||||
$tree = Category::getCategoryInformations(array($root_category), $lang);
|
||||
|
||||
$tree[$root_category]['value'] = $tree[$root_category]['id_category'];
|
||||
$tree[$root_category]['input_name'] = 'categoryBox';
|
||||
$children = $this->fillTree($categories, $root_category);
|
||||
|
||||
if (!empty($children)) {
|
||||
@@ -214,6 +218,21 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
return $this->_input_name;
|
||||
}
|
||||
|
||||
public function setInputId($value)
|
||||
{
|
||||
$this->_input_id = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getInputId()
|
||||
{
|
||||
if (!isset($this->_input_id)) {
|
||||
$this->setInputId('id_category');
|
||||
}
|
||||
|
||||
return $this->_input_id;
|
||||
}
|
||||
|
||||
public function setLang($value)
|
||||
{
|
||||
$this->_lang = $value;
|
||||
@@ -229,24 +248,6 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
return $this->_lang;
|
||||
}
|
||||
|
||||
public function getNodeFolderTemplate()
|
||||
{
|
||||
if (!isset($this->_node_folder_template)) {
|
||||
$this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_folder_template;
|
||||
}
|
||||
|
||||
public function getNodeItemTemplate()
|
||||
{
|
||||
if (!isset($this->_node_item_template)) {
|
||||
$this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_item_template;
|
||||
}
|
||||
|
||||
public function setRootCategory($value)
|
||||
{
|
||||
if (!Validate::isInt($value)) {
|
||||
@@ -304,15 +305,6 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
return $this->_shop;
|
||||
}
|
||||
|
||||
public function getTemplate()
|
||||
{
|
||||
if (!isset($this->_template)) {
|
||||
$this->setTemplate(self::DEFAULT_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_template;
|
||||
}
|
||||
|
||||
public function setUseCheckBox($value)
|
||||
{
|
||||
$this->_use_checkbox = (bool)$value;
|
||||
@@ -430,7 +422,7 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
}
|
||||
|
||||
/* Override */
|
||||
public function renderNodes($data = null)
|
||||
public function renderNodes($data = null, $root = false)
|
||||
{
|
||||
if (!isset($data)) {
|
||||
$data = $this->getData();
|
||||
@@ -449,6 +441,7 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
$this->getContext()->smarty
|
||||
)->assign(array(
|
||||
'input_name' => $this->getInputName(),
|
||||
'input_id' => $this->getInputId(),
|
||||
'children' => $this->renderNodes($item['children']),
|
||||
'node' => $item
|
||||
))->fetch();
|
||||
@@ -458,6 +451,7 @@ class HelperTreeCategoriesCore extends TreeCore
|
||||
$this->getContext()->smarty
|
||||
)->assign(array(
|
||||
'input_name' => $this->getInputName(),
|
||||
'input_id' => $this->getInputId(),
|
||||
'node' => $item
|
||||
))->fetch();
|
||||
}
|
||||
|
||||
@@ -1,485 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class HelperTreeHotelsCore extends TreeCore
|
||||
{
|
||||
const DEFAULT_TEMPLATE = 'tree_categories.tpl';
|
||||
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_radio.tpl';
|
||||
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_radio.tpl';
|
||||
|
||||
private $_disabled_categories;
|
||||
private $_input_name;
|
||||
private $_lang;
|
||||
private $_root_category;
|
||||
private $_selected_hotels;
|
||||
private $_selected_room_types;
|
||||
private $_full_tree = false;
|
||||
private $_shop;
|
||||
private $_use_checkbox;
|
||||
private $_use_bulk_actions = true;
|
||||
private $_use_search;
|
||||
private $_use_shop_restriction;
|
||||
private $_rooms_only = false;
|
||||
private $_disable_all_categories = false;
|
||||
private $_accessed_hotels = false;
|
||||
|
||||
public function __construct($id, $title = null, $root_category = null,
|
||||
$lang = null, $use_shop_restriction = true)
|
||||
{
|
||||
parent::__construct($id);
|
||||
|
||||
if (isset($title)) {
|
||||
$this->setTitle($title);
|
||||
}
|
||||
|
||||
if (isset($root_category)) {
|
||||
$this->setRootCategory($root_category);
|
||||
}
|
||||
|
||||
$this->setLang($lang);
|
||||
$this->setUseShopRestriction($use_shop_restriction);
|
||||
}
|
||||
|
||||
private function fillTree($hotels, $onlyRoomType = false)
|
||||
{
|
||||
$tree = array();
|
||||
$idLang = Context::getContext()->language->id;
|
||||
$objRoomType = new HotelRoomType();
|
||||
foreach($hotels as $hotel) {
|
||||
|
||||
if (!$onlyRoomType) {
|
||||
$tree[$hotel['id_hotel']] = array(
|
||||
'id_hotel' => $hotel['id_hotel'],
|
||||
'id_category' => $hotel['id_category'],
|
||||
'name' => $hotel['hotel_name'],
|
||||
'children' => array()
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($roomTypes = $objRoomType->getRoomTypeByHotelId($hotel['id_hotel'], $idLang))) {
|
||||
if ($onlyRoomType) {
|
||||
$tree = array_merge($tree, $roomTypes);
|
||||
} else {
|
||||
$tree[$hotel['id_hotel']]['children'] = array_merge($tree[$hotel['id_hotel']]['children'], $roomTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $tree;
|
||||
}
|
||||
|
||||
public function getData()
|
||||
{
|
||||
if (!isset($this->_data)) {
|
||||
$shop = $this->getShop();
|
||||
$lang = $this->getLang();
|
||||
$root_category = (int)$this->getRootCategory();
|
||||
if (($hotels = $this->getAccessedHotels()) === false) {
|
||||
$objHotelBanch = new HotelBranchInformation();
|
||||
$hotels = $objHotelBanch->hotelBranchesInfo();
|
||||
}
|
||||
$tree = $this->fillTree($hotels, $this->_rooms_only);
|
||||
if (!empty($children)) {
|
||||
$tree[$root_category]['children'] = $children;
|
||||
}
|
||||
|
||||
$this->setData($tree);
|
||||
$this->setDataSearch(Category::getAllCategoriesName($root_category, $lang, false, null, $this->useShopRestriction()));
|
||||
}
|
||||
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
public function setRoomsOnly($value)
|
||||
{
|
||||
$this->_rooms_only = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFullTree($value)
|
||||
{
|
||||
$this->_full_tree = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFullTree()
|
||||
{
|
||||
return $this->_full_tree;
|
||||
}
|
||||
|
||||
|
||||
public function setDisabledCategories($value)
|
||||
{
|
||||
$this->_disabled_categories = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setAccessedHotels($values)
|
||||
{
|
||||
$this->_accessed_hotels = $values;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAccessedHotels()
|
||||
{
|
||||
return $this->_accessed_hotels;
|
||||
}
|
||||
|
||||
public function setDisablAllCategories($value)
|
||||
{
|
||||
$this->_disable_all_categories = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDisabledCategories()
|
||||
{
|
||||
return $this->_disabled_categories;
|
||||
}
|
||||
|
||||
public function getDisablAllCategories()
|
||||
{
|
||||
return $this->_disable_all_categories;
|
||||
}
|
||||
|
||||
public function setInputName($value)
|
||||
{
|
||||
$this->_input_name = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getInputName()
|
||||
{
|
||||
if (!isset($this->_input_name)) {
|
||||
$this->setInputName('categoryBox');
|
||||
}
|
||||
|
||||
return $this->_input_name;
|
||||
}
|
||||
|
||||
public function setLang($value)
|
||||
{
|
||||
$this->_lang = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLang()
|
||||
{
|
||||
if (!isset($this->_lang)) {
|
||||
$this->setLang($this->getContext()->employee->id_lang);
|
||||
}
|
||||
|
||||
return $this->_lang;
|
||||
}
|
||||
|
||||
public function getNodeFolderTemplate()
|
||||
{
|
||||
if (!isset($this->_node_folder_template)) {
|
||||
$this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_folder_template;
|
||||
}
|
||||
|
||||
public function getNodeItemTemplate()
|
||||
{
|
||||
if (!isset($this->_node_item_template)) {
|
||||
$this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_item_template;
|
||||
}
|
||||
|
||||
public function setRootCategory($value)
|
||||
{
|
||||
if (!Validate::isInt($value)) {
|
||||
throw new PrestaShopException('Root category must be an integer value');
|
||||
}
|
||||
|
||||
$this->_root_category = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRootCategory()
|
||||
{
|
||||
return $this->_root_category;
|
||||
}
|
||||
|
||||
public function setSelectedHotels($value)
|
||||
{
|
||||
if (!is_array($value)) {
|
||||
throw new PrestaShopException('Selected categories value must be an array');
|
||||
}
|
||||
|
||||
$this->_selected_hotels = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSelectedHotels()
|
||||
{
|
||||
if (!isset($this->_selected_hotels)) {
|
||||
$this->_selected_hotels = array();
|
||||
}
|
||||
|
||||
return $this->_selected_hotels;
|
||||
}
|
||||
|
||||
public function setSelectedRoomTypes($value)
|
||||
{
|
||||
if (!is_array($value)) {
|
||||
throw new PrestaShopException('Selected categories value must be an array');
|
||||
}
|
||||
|
||||
$this->_selected_room_types = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSelectedRoomTypes()
|
||||
{
|
||||
if (!isset($this->_selected_room_types)) {
|
||||
$this->_selected_room_types = array();
|
||||
}
|
||||
|
||||
return $this->_selected_room_types;
|
||||
}
|
||||
|
||||
public function setShop($value)
|
||||
{
|
||||
$this->_shop = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getShop()
|
||||
{
|
||||
if (!isset($this->_shop)) {
|
||||
if (Tools::isSubmit('id_shop')) {
|
||||
$this->setShop(new Shop(Tools::getValue('id_shop')));
|
||||
} elseif ($this->getContext()->shop->id) {
|
||||
$this->setShop(new Shop($this->getContext()->shop->id));
|
||||
} elseif (!Shop::isFeatureActive()) {
|
||||
$this->setShop(new Shop(Configuration::get('PS_SHOP_DEFAULT')));
|
||||
} else {
|
||||
$this->setShop(new Shop(0));
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_shop;
|
||||
}
|
||||
|
||||
public function getTemplate()
|
||||
{
|
||||
if (!isset($this->_template)) {
|
||||
$this->setTemplate(self::DEFAULT_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_template;
|
||||
}
|
||||
|
||||
public function setUseCheckBox($value)
|
||||
{
|
||||
$this->_use_checkbox = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUseBulkActions($value)
|
||||
{
|
||||
$this->_use_bulk_actions = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUseSearch($value)
|
||||
{
|
||||
$this->_use_search = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUseShopRestriction($value)
|
||||
{
|
||||
$this->_use_shop_restriction = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function useCheckBox()
|
||||
{
|
||||
return (isset($this->_use_checkbox) && $this->_use_checkbox);
|
||||
}
|
||||
|
||||
public function useBulkActions()
|
||||
{
|
||||
return (isset($this->_use_bulk_actions) && $this->_use_bulk_actions);
|
||||
}
|
||||
|
||||
public function useSearch()
|
||||
{
|
||||
return (isset($this->_use_search) && $this->_use_search);
|
||||
}
|
||||
|
||||
public function useShopRestriction()
|
||||
{
|
||||
return (isset($this->_use_shop_restriction) && $this->_use_shop_restriction);
|
||||
}
|
||||
|
||||
public function render($data = null)
|
||||
{
|
||||
if (!isset($data)) {
|
||||
$data = $this->getData();
|
||||
}
|
||||
|
||||
if (isset($this->_disabled_categories)
|
||||
&& !empty($this->_disabled_categories)) {
|
||||
$this->_disableCategories($data, $this->getDisabledCategories());
|
||||
}
|
||||
|
||||
if($this->getDisablAllCategories()) {
|
||||
$this->_disableCategories($data);
|
||||
}
|
||||
|
||||
//Default bootstrap style of search is push-right, so we add this button first
|
||||
if ($this->useSearch()) {
|
||||
$this->addAction(new TreeToolbarSearchCategories(
|
||||
'Find a category:',
|
||||
$this->getId().'-categories-search')
|
||||
);
|
||||
$this->setAttribute('use_search', $this->useSearch());
|
||||
}
|
||||
|
||||
$collapse_all = new TreeToolbarLink(
|
||||
'Collapse All',
|
||||
'#',
|
||||
'$(\'#'.$this->getId().'\').tree(\'collapseAll\');$(\'#collapse-all-'.$this->getId().'\').hide();$(\'#expand-all-'.$this->getId().'\').show(); return false;',
|
||||
'icon-collapse-alt');
|
||||
$collapse_all->setAttribute('id', 'collapse-all-'.$this->getId());
|
||||
|
||||
$expand_all = new TreeToolbarLink(
|
||||
'Expand All',
|
||||
'#',
|
||||
'$(\'#'.$this->getId().'\').tree(\'expandAll\');$(\'#collapse-all-'.$this->getId().'\').show();$(\'#expand-all-'.$this->getId().'\').hide(); return false;',
|
||||
'icon-expand-alt');
|
||||
$expand_all->setAttribute('id', 'expand-all-'.$this->getId());
|
||||
$this->addAction($collapse_all);
|
||||
$this->addAction($expand_all);
|
||||
|
||||
if ($this->useCheckBox()) {
|
||||
if ($this->useBulkActions()) {
|
||||
$check_all = new TreeToolbarLink(
|
||||
'Check All',
|
||||
'#',
|
||||
'checkAllAssociatedHotels($(\'#'.$this->getId().'\'));return false;',
|
||||
'icon-check-sign');
|
||||
$check_all->setAttribute('id', 'check-all-'.$this->getId());
|
||||
$uncheck_all = new TreeToolbarLink(
|
||||
'Uncheck All',
|
||||
'#',
|
||||
'uncheckAllAssociatedHotels($(\'#'.$this->getId().'\'));return false;',
|
||||
'icon-check-empty');
|
||||
$uncheck_all->setAttribute('id', 'uncheck-all-'.$this->getId());
|
||||
$this->addAction($check_all);
|
||||
$this->addAction($uncheck_all);
|
||||
}
|
||||
|
||||
$this->setNodeFolderTemplate('tree_node_hotel_folder_checkbox.tpl');
|
||||
$this->setNodeItemTemplate('tree_node_hotel_item_checkbox.tpl');
|
||||
$this->setAttribute('use_checkbox', $this->useCheckBox());
|
||||
}
|
||||
|
||||
$this->setAttribute('selected_hotels', $this->getSelectedHotels());
|
||||
$this->setAttribute('selected_roomtypes', $this->getSelectedRoomTypes());
|
||||
$this->getContext()->smarty->assign('root_category', Configuration::get('PS_ROOT_CATEGORY'));
|
||||
$this->getContext()->smarty->assign('token', Tools::getAdminTokenLite('AdminProducts'));
|
||||
return parent::render($data);
|
||||
}
|
||||
|
||||
/* Override */
|
||||
public function renderNodes($data = null)
|
||||
{
|
||||
if (!isset($data)) {
|
||||
$data = $this->getData();
|
||||
}
|
||||
|
||||
if (!is_array($data) && !$data instanceof Traversable) {
|
||||
throw new PrestaShopException('Data value must be an traversable array');
|
||||
}
|
||||
|
||||
$html = '';
|
||||
foreach ($data as $item) {
|
||||
if (array_key_exists('children', $item)) {
|
||||
$html .= $this->getContext()->smarty->createTemplate(
|
||||
$this->getTemplateFile($this->getNodeFolderTemplate()),
|
||||
$this->getContext()->smarty
|
||||
)->assign(array(
|
||||
'input_name' => 'hotelBox',
|
||||
'children' => $this->renderNodes($item['children']),
|
||||
'node' => $item
|
||||
))->fetch();
|
||||
} else {
|
||||
$html .= $this->getContext()->smarty->createTemplate(
|
||||
$this->getTemplateFile($this->getNodeItemTemplate()),
|
||||
$this->getContext()->smarty
|
||||
)->assign(array(
|
||||
'input_name' => 'roomTypeBox',
|
||||
'node' => $item
|
||||
))->fetch();
|
||||
}
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
private function _disableCategories(&$categories, $disabled_categories = null)
|
||||
{
|
||||
foreach ($categories as &$category) {
|
||||
if (!isset($disabled_categories) || in_array($category['id_category'], $disabled_categories)) {
|
||||
$category['disabled'] = true;
|
||||
if (array_key_exists('children', $category) && is_array($category['children'])) {
|
||||
self::_disableCategories($category['children']);
|
||||
}
|
||||
} elseif (array_key_exists('children', $category) && is_array($category['children'])) {
|
||||
self::_disableCategories($category['children'], $disabled_categories);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function _getSelectedChildNumbers(&$categories, $selected, &$parent = null)
|
||||
{
|
||||
$selected_childs = 0;
|
||||
|
||||
foreach ($categories as $key => &$category) {
|
||||
if (isset($parent) && in_array($category['id_category'], $selected)) {
|
||||
$selected_childs++;
|
||||
}
|
||||
|
||||
if (isset($category['children']) && !empty($category['children'])) {
|
||||
$selected_childs += $this->_getSelectedChildNumbers($category['children'], $selected, $category);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($parent['selected_childs'])) {
|
||||
$parent['selected_childs'] = 0;
|
||||
}
|
||||
|
||||
$parent['selected_childs'] = $selected_childs;
|
||||
return $selected_childs;
|
||||
}
|
||||
}
|
||||
@@ -68,24 +68,6 @@ class HelperTreeShopsCore extends TreeCore
|
||||
return $this->_lang;
|
||||
}
|
||||
|
||||
public function getNodeFolderTemplate()
|
||||
{
|
||||
if (!isset($this->_node_folder_template)) {
|
||||
$this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_folder_template;
|
||||
}
|
||||
|
||||
public function getNodeItemTemplate()
|
||||
{
|
||||
if (!isset($this->_node_item_template)) {
|
||||
$this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_item_template;
|
||||
}
|
||||
|
||||
public function setSelectedShops($value)
|
||||
{
|
||||
if (!is_array($value)) {
|
||||
@@ -105,15 +87,6 @@ class HelperTreeShopsCore extends TreeCore
|
||||
return $this->_selected_shops;
|
||||
}
|
||||
|
||||
public function getTemplate()
|
||||
{
|
||||
if (!isset($this->_template)) {
|
||||
$this->setTemplate(self::DEFAULT_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_template;
|
||||
}
|
||||
|
||||
public function render($data = null, $use_default_actions = true, $use_selected_shop = true)
|
||||
{
|
||||
if (!isset($data)) {
|
||||
@@ -153,7 +126,7 @@ class HelperTreeShopsCore extends TreeCore
|
||||
return parent::render($data);
|
||||
}
|
||||
|
||||
public function renderNodes($data = null)
|
||||
public function renderNodes($data = null, $root = false)
|
||||
{
|
||||
if (!isset($data)) {
|
||||
$data = $this->getData();
|
||||
|
||||
@@ -1665,17 +1665,9 @@ abstract class ModuleCore
|
||||
if ($item->type == 'addonsMustHave') {
|
||||
$item->addons_buy_url = strip_tags((string)$modaddons->url);
|
||||
$prices = (array)$modaddons->price;
|
||||
$id_default_currency = Configuration::get('PS_CURRENCY_DEFAULT');
|
||||
|
||||
foreach ($prices as $currency => $price) {
|
||||
if ($id_currency = Currency::getIdByIsoCode($currency)) {
|
||||
$item->price = (float)$price;
|
||||
$item->id_currency = (int)$id_currency;
|
||||
|
||||
if ($id_default_currency == $id_currency) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach ($prices as $key => $value) {
|
||||
$item->{$key} = $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -317,6 +317,8 @@ class OrderHistoryCore extends ObjectModel
|
||||
// if order is created by API then create a direct object instead of creating an object from module
|
||||
if ($order->module == 'wsorder') {
|
||||
$payment_method = new WebserviceOrder();
|
||||
} else if ($order->module == 'bo_order') {
|
||||
$payment_method = new BoOrder();
|
||||
} else {
|
||||
$payment_method = Module::getInstanceByName($order->module);
|
||||
}
|
||||
|
||||
@@ -397,6 +397,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
$type_value['id_order_detail']
|
||||
);
|
||||
$cart_htl_data[$type_key]['date_diff'][$date_join]['extra_demands_price_ti'] = $objBookingDemand->getRoomTypeBookingExtraDemands(
|
||||
@@ -408,6 +409,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
$type_value['id_order_detail']
|
||||
);
|
||||
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
|
||||
|
||||
@@ -42,6 +42,8 @@ class TreeCore
|
||||
protected $_node_folder_template;
|
||||
protected $_node_item_template;
|
||||
protected $_template;
|
||||
private $_root_element_selectable = true;
|
||||
|
||||
|
||||
/** @var string */
|
||||
private $_template_directory;
|
||||
@@ -191,7 +193,7 @@ class TreeCore
|
||||
public function getHeaderTemplate()
|
||||
{
|
||||
if (!isset($this->_headerTemplate)) {
|
||||
$this->setHeaderTemplate(self::DEFAULT_HEADER_TEMPLATE);
|
||||
$this->setHeaderTemplate(static::DEFAULT_HEADER_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_headerTemplate;
|
||||
@@ -217,7 +219,7 @@ class TreeCore
|
||||
public function getNodeFolderTemplate()
|
||||
{
|
||||
if (!isset($this->_node_folder_template)) {
|
||||
$this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE);
|
||||
$this->setNodeFolderTemplate(static::DEFAULT_NODE_FOLDER_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_folder_template;
|
||||
@@ -232,7 +234,7 @@ class TreeCore
|
||||
public function getNodeItemTemplate()
|
||||
{
|
||||
if (!isset($this->_node_item_template)) {
|
||||
$this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE);
|
||||
$this->setNodeItemTemplate(static::DEFAULT_NODE_ITEM_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_node_item_template;
|
||||
@@ -247,7 +249,7 @@ class TreeCore
|
||||
public function getTemplate()
|
||||
{
|
||||
if (!isset($this->_template)) {
|
||||
$this->setTemplate(self::DEFAULT_TEMPLATE);
|
||||
$this->setTemplate(static::DEFAULT_TEMPLATE);
|
||||
}
|
||||
|
||||
return $this->_template;
|
||||
@@ -271,7 +273,7 @@ class TreeCore
|
||||
{
|
||||
if (!isset($this->_template_directory)) {
|
||||
$this->_template_directory = $this->_normalizeDirectory(
|
||||
self::DEFAULT_TEMPLATE_DIRECTORY);
|
||||
static::DEFAULT_TEMPLATE_DIRECTORY);
|
||||
}
|
||||
|
||||
return $this->_template_directory;
|
||||
@@ -342,6 +344,17 @@ class TreeCore
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setRootElementSelectable($value)
|
||||
{
|
||||
$this->_root_element_selectable = (bool)$value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function rootElementSelectable()
|
||||
{
|
||||
return (isset($this->_root_element_selectable) && $this->_root_element_selectable);
|
||||
}
|
||||
|
||||
public function getToolbar()
|
||||
{
|
||||
if (isset($this->_toolbar)) {
|
||||
@@ -419,14 +432,14 @@ class TreeCore
|
||||
//Assign Tree nodes
|
||||
$template->assign($this->getAttributes())->assign(array(
|
||||
'id' => $this->getId(),
|
||||
'nodes' => $this->renderNodes($data),
|
||||
'nodes' => $this->renderNodes($data, true),
|
||||
'id_tree' => $this->getIdTree()
|
||||
));
|
||||
|
||||
return (isset($html) ? $html : '').$template->fetch();
|
||||
}
|
||||
|
||||
public function renderNodes($data = null)
|
||||
public function renderNodes($data = null, $root = false)
|
||||
{
|
||||
if (!isset($data)) {
|
||||
$data = $this->getData();
|
||||
@@ -446,14 +459,16 @@ class TreeCore
|
||||
$this->getContext()->smarty
|
||||
)->assign(array(
|
||||
'children' => $this->renderNodes($item['children']),
|
||||
'node' => $item
|
||||
'node' => $item,
|
||||
'selectable' => !$root || $this->rootElementSelectable()
|
||||
))->fetch();
|
||||
} else {
|
||||
$html .= $this->getContext()->smarty->createTemplate(
|
||||
$this->getTemplateFile($this->getNodeItemTemplate()),
|
||||
$this->getContext()->smarty
|
||||
)->assign(array(
|
||||
'node' => $item
|
||||
'node' => $item,
|
||||
'selectable' => !$root || $this->rootElementSelectable()
|
||||
))->fetch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,7 +544,8 @@ class AdminAddressesControllerCore extends AdminController
|
||||
$customer = Customer::searchByName($email);
|
||||
if (!empty($customer)) {
|
||||
$customer = $customer['0'];
|
||||
echo json_encode(array('infos' => pSQL($customer['firstname']).'_'.pSQL($customer['lastname']).'_'.pSQL($customer['company']).'_'.pSQL($customer['id_customer'])));
|
||||
$phone = Customer::getPhone($customer['id_customer']);
|
||||
echo json_encode(array('infos' => pSQL($customer['firstname']).'_'.pSQL($customer['lastname']).'_'.pSQL($customer['company']).'_'.pSQL($customer['id_customer']).'_'.pSQL($phone)));
|
||||
}
|
||||
}
|
||||
die;
|
||||
|
||||
@@ -395,19 +395,19 @@ class AdminCartsControllerCore extends AdminController
|
||||
$this->context->cart->id_currency = (($id_currency = (int)Tools::getValue('id_currency')) ? $id_currency : Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
}
|
||||
|
||||
$addresses = $customer->getAddresses((int)$this->context->cart->id_lang);
|
||||
$id_address_delivery = (int)Tools::getValue('id_address_delivery');
|
||||
$id_address_invoice = (int)Tools::getValue('id_address_invoice');
|
||||
if (Validate::isLoadedObject($customer)) {
|
||||
$addresses = $customer->getAddresses((int)$this->context->cart->id_lang);
|
||||
$id_address_delivery = (int)Tools::getValue('id_address_delivery');
|
||||
$id_address_invoice = (int)Tools::getValue('id_address_invoice');
|
||||
|
||||
if (!$this->context->cart->id_address_invoice && isset($addresses[0])) {
|
||||
$this->context->cart->id_address_invoice = (int)$addresses[0]['id_address'];
|
||||
} elseif ($id_address_invoice) {
|
||||
$this->context->cart->id_address_invoice = (int)$id_address_delivery;
|
||||
}
|
||||
if (!$this->context->cart->id_address_delivery && isset($addresses[0])) {
|
||||
$this->context->cart->id_address_delivery = $addresses[0]['id_address'];
|
||||
} elseif ($id_address_delivery) {
|
||||
$this->context->cart->id_address_delivery = (int)$id_address_delivery;
|
||||
if (!$this->context->cart->id_address_invoice && isset($addresses[0])) {
|
||||
$this->context->cart->id_address_invoice = (int)$addresses[0]['id_address'];
|
||||
} elseif ($id_address_invoice) {
|
||||
$this->context->cart->id_address_invoice = (int)$id_address_delivery;
|
||||
}
|
||||
if ($id_address_delivery) {
|
||||
$this->context->cart->id_address_delivery = (int)$id_address_delivery;
|
||||
}
|
||||
}
|
||||
$this->context->cart->setNoMultishipping();
|
||||
|
||||
@@ -417,7 +417,6 @@ class AdminCartsControllerCore extends AdminController
|
||||
$this->context->cart->secure_key = $this->context->customer->secure_key;
|
||||
$addresses = $customer->getAddresses((int)$this->context->cart->id_lang);
|
||||
$this->context->cart->id_address_invoice = (int)$addresses[0]['id_address'];
|
||||
$this->context->cart->id_address_delivery = (int)$addresses[0]['id_address'];
|
||||
$this->context->cart->setNoMultishipping();
|
||||
}
|
||||
/*END*/
|
||||
|
||||
@@ -64,7 +64,7 @@ class AdminCustomerPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_ONE_PHONE_AT_LEAST' => array(
|
||||
'title' => $this->l('Phone number is mandatory'),
|
||||
'hint' => $this->l('If you chose yes, your customer will have to provide at least one phone number to register.'),
|
||||
'hint' => $this->l('If you chose yes, your customer will have to provide phone number to register.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
|
||||
@@ -431,6 +431,15 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'required' => true,
|
||||
'autocomplete' => false
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'prefix' => '<i class="icon-phone"></i>',
|
||||
'label' => $this->l('Phone'),
|
||||
'name' => 'phone',
|
||||
'col' => '4',
|
||||
'required' => true,
|
||||
'autocomplete' => false
|
||||
),
|
||||
array(
|
||||
'type' => 'password',
|
||||
'label' => $this->l('Password'),
|
||||
@@ -990,11 +999,19 @@ class AdminCustomersControllerCore extends AdminController
|
||||
// If customer is going to be deleted permanently then if customer has orders the change this customer as an anonymous customer
|
||||
if (Validate::isLoadedObject($objCustomer = $this->loadObject())) {
|
||||
if ($this->delete_mode == 'real' && Order::getCustomerOrders($objCustomer->id, true)) {
|
||||
$customerEmail = $objCustomer->email;
|
||||
$objCustomer->email = 'anonymous'.'-'.$objCustomer->id.'@'.Tools::link_rewrite(Configuration::get('PS_SHOP_NAME')).'_anonymous.com';
|
||||
$objCustomer->deleted = Customer::STATUS_DELETED;
|
||||
if (!$objCustomer->update()) {
|
||||
$this->errors[] = Tools::displayError('Some error ocurred while deleting the Customer');
|
||||
return;
|
||||
} else {
|
||||
if ($customerDetail = CartCustomerGuestDetail::getCustomerDefaultDetails($customerEmail)) {
|
||||
$objCartCustomerGuestDetail = new CartCustomerGuestDetail($customerDetail['id_customer_guest_detail']);
|
||||
$objCartCustomerGuestDetail->phone = preg_replace('/[0-9]/', '0', $objCustomer->phone);
|
||||
$objCartCustomerGuestDetail->email = $objCustomer->email;
|
||||
$objCartCustomerGuestDetail->save();
|
||||
}
|
||||
}
|
||||
|
||||
$this->redirect_after = self::$currentIndex.'&conf=1&token='.$this->token;
|
||||
@@ -1088,6 +1105,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('Password can not be empty.');
|
||||
$this->display = 'edit';
|
||||
} elseif ($customer = parent::processAdd()) {
|
||||
CartCustomerGuestDetail::updateCustomerPhoneNumber($customer->email, Tools::getValue('phone'));
|
||||
$this->context->smarty->assign('new_customer', $customer);
|
||||
return $customer;
|
||||
}
|
||||
@@ -1119,7 +1137,10 @@ class AdminCustomersControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
return parent::processUpdate();
|
||||
if ($res = parent::processUpdate()) {
|
||||
CartCustomerGuestDetail::updateCustomerPhoneNumber($this->object->email, Tools::getValue('phone'));
|
||||
return $res;
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('An error occurred while loading the object.').'
|
||||
<b>'.$this->table.'</b> '.Tools::displayError('(cannot load object)');
|
||||
@@ -1149,6 +1170,21 @@ class AdminCustomersControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
$phone = Tools::getValue('phone');
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST')) {
|
||||
if ($phone == '') {
|
||||
$this->errors[] = Tools::displayError('Phone number is required.');
|
||||
}
|
||||
}
|
||||
$className = 'CartCustomerGuestDetail';
|
||||
$rules = call_user_func(array($className, 'getValidationRules'), $className);
|
||||
if ($phone && !Validate::isPhoneNumber($phone)) {
|
||||
$this->errors[] = Tools::displayError('Invaid phone number.');
|
||||
} elseif ($phone && Tools::strlen($phone) > $rules['size']['phone']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Phone number is too long. (%s chars max).'), $rules['size']['phone']);
|
||||
}
|
||||
|
||||
|
||||
$customer = new Customer();
|
||||
$this->errors = array_merge($this->errors, $customer->validateFieldsRequiredDatabase());
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -256,15 +256,23 @@ class AdminModulesCatalogControllerCore extends AdminController
|
||||
if ($criteria == 'name') {
|
||||
return strnatcasecmp($a->displayName, $b->displayName);
|
||||
} else if ($criteria == 'price_increasing') {
|
||||
if (isset($a->price) && isset($b->price))
|
||||
return $a->price > $b->price;
|
||||
else if (isset($b->price) && $b->price)
|
||||
return true;
|
||||
$priceA = $priceB = 0;
|
||||
if (isset($a->price)) {
|
||||
$priceA = $a->price;
|
||||
}
|
||||
if (isset($b->price)) {
|
||||
$priceB = $b->price;
|
||||
}
|
||||
return $priceA > $priceB;
|
||||
} else if ($criteria == 'price_decreasing') {
|
||||
if (isset($a->price) && isset($b->price))
|
||||
return $a->price < $b->price;
|
||||
else if (isset($b->price) && $b->price)
|
||||
return true;
|
||||
$priceA = $priceB = 0;
|
||||
if (isset($a->price)) {
|
||||
$priceA = $a->price;
|
||||
}
|
||||
if (isset($b->price)) {
|
||||
$priceB = $b->price;
|
||||
}
|
||||
return $priceA < $priceB;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -2875,9 +2875,9 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
{
|
||||
if (Validate::isLoadedObject($product)) {
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
$associatedRoomTypes = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id)['room_types'];
|
||||
$associatedRoomTypes = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id)['room_type'];
|
||||
if (Product::SERVICE_PRODUCT_WITH_ROOMTYPE == $product->service_product_type) {
|
||||
$selectedRoomTypes = Tools::getValue('roomTypeBox');
|
||||
$selectedRoomTypes = Tools::getValue('room_type_box');
|
||||
|
||||
// Generate list of new associations
|
||||
$newRoomTypes = array();
|
||||
@@ -3499,18 +3499,16 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
$selectedElements = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product->id);
|
||||
$tree = new HelperTreeHotels('associated-hotels-tree', 'Associated hotels');
|
||||
$tree->setTemplate('tree_associated_hotels.tpl')
|
||||
->setHeaderTemplate('tree_associated_header.tpl')
|
||||
->setRootCategory((int)Configuration::get('PS_LOCATIONS_CATEGORY'))
|
||||
->setUseCheckBox(true)
|
||||
->setFullTree(true)
|
||||
->setRoomsOnly(false)
|
||||
->setSelectedHotels($selectedElements['hotels'])
|
||||
->setSelectedRoomTypes($selectedElements['room_types'])
|
||||
->setUseBulkActions(true)
|
||||
->setAccessedHotels(HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 0));
|
||||
|
||||
$tree = new HelperTree('hotels-tree');
|
||||
$tree->setData(HotelHelper::generateTreeData([
|
||||
'rootNode' => HotelHelper::NODE_HOTEL,
|
||||
'leafNode' => HotelHelper::NODE_ROOM_TYPE,
|
||||
'selectedElements' => $selectedElements
|
||||
]))
|
||||
->setUseCheckBox(true)
|
||||
->setUseBulkActions(true)
|
||||
->setUseSearch(true);
|
||||
$data->assign('hotel_tree', $tree->render());
|
||||
|
||||
// TinyMCE
|
||||
|
||||
@@ -352,6 +352,19 @@ class AdminOrdersControllerCore extends AdminController
|
||||
return Tools::displayPrice($echo, (int)$idCurrency);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display)) {
|
||||
$this->page_header_toolbar_btn['new_order'] = array(
|
||||
'href' => self::$currentIndex.'&addorder&token='.$this->token,
|
||||
'desc' => $this->l('Add new order', null, null, false),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
{
|
||||
if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP && Shop::isFeatureActive()) {
|
||||
@@ -2747,6 +2760,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$totalDemandsPriceTE = 0;
|
||||
$totalDemandsPriceTI = 0;
|
||||
$totalRefundedRooms = 0;
|
||||
$bookingAutoAddedServices = array();
|
||||
if ($order_detail_data = $objBookingDetail->getOrderFormatedBookinInfoByIdOrder($order->id)) {
|
||||
$objBookingDemand = new HotelBookingDemands();
|
||||
$objHotelRoomType = new HotelRoomType();
|
||||
@@ -2882,6 +2896,34 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$order_detail_data = array();
|
||||
}
|
||||
|
||||
if ($orderedRooms = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
|
||||
$order->id,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
1,
|
||||
Product::PRICE_ADDITION_TYPE_INDEPENDENT
|
||||
)) {
|
||||
foreach($orderedRooms as $orderedRoom) {
|
||||
if (isset($orderedRoom['additional_services']) && $orderedRoom['additional_services']) {
|
||||
foreach ($orderedRoom['additional_services'] as $service) {
|
||||
if (isset($bookingAutoAddedServices[$service['id_product']])) {
|
||||
$bookingAutoAddedServices[$service['id_product']]['total_price_tax_excl'] += $service['total_price_tax_excl'];
|
||||
} else {
|
||||
$bookingAutoAddedServices[$service['id_product']]['name'] = $service['name'];
|
||||
$bookingAutoAddedServices[$service['id_product']]['total_price_tax_excl'] = $service['total_price_tax_excl'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$objOrderReturn = new OrderReturn();
|
||||
$refundedAmount = 0;
|
||||
if ($refundReqBookings = $objOrderReturn->getOrderRefundRequestedBookings($order->id, 0, 1, 0, 1)) {
|
||||
@@ -3037,6 +3079,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'ROOM_STATUS_CHECKED_IN' => HotelBookingDetail::STATUS_CHECKED_IN,
|
||||
'ROOM_STATUS_CHECKED_OUT' => HotelBookingDetail::STATUS_CHECKED_OUT,
|
||||
'ALLOTMENT_MANUAL' => HotelBookingDetail::ALLOTMENT_MANUAL,
|
||||
'booking_auto_added_services' => $bookingAutoAddedServices,
|
||||
);
|
||||
|
||||
return parent::renderView();
|
||||
@@ -4613,8 +4656,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$res = true;
|
||||
$id_order = (int) Tools::getValue('id_order');
|
||||
$order = new Order($id_order);
|
||||
$cart = new Cart($order->id_cart);
|
||||
$customer = new Cart($order->id_customer);
|
||||
//$order_detail = new OrderDetail((int)Tools::getValue('product_id_order_detail'));
|
||||
$order_detail = new OrderDetail((int) Tools::getValue('id_order_detail'));//by webkul id_order_detail from our table
|
||||
$this->doEditRoomValidation($order_detail, $order, isset($order_invoice) ? $order_invoice : null);
|
||||
@@ -4623,6 +4664,9 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$order_invoice = new OrderInvoice((int) Tools::getValue('product_invoice'));
|
||||
}
|
||||
/*By webkul To edit Order and cart entries when edit rooms from the orderLine when editing the order*/
|
||||
$obj_booking_detail = new HotelBookingDetail((int) Tools::getValue('id_booking_detail'));
|
||||
$cart = new Cart($obj_booking_detail->id_cart);
|
||||
|
||||
$product_informations = $_POST['edit_product'];
|
||||
$new_date_from = trim(date('Y-m-d', strtotime($product_informations['date_from'])));
|
||||
$new_date_to = trim(date('Y-m-d', strtotime($product_informations['date_to'])));
|
||||
@@ -4632,7 +4676,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$id_room = trim(Tools::getValue('id_room'));
|
||||
$id_product = trim(Tools::getValue('id_product'));
|
||||
$room_unit_price = trim(Tools::getValue('room_unit_price'));
|
||||
$obj_booking_detail = new HotelBookingDetail();
|
||||
$product_quantity = (int) $obj_booking_detail->getNumberOfDays($new_date_from, $new_date_to);
|
||||
$old_product_quantity = (int) $obj_booking_detail->getNumberOfDays($old_date_from, $old_date_to);
|
||||
$qty_diff = $product_quantity - $old_product_quantity;
|
||||
@@ -4814,6 +4857,17 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$res &= $order_invoice->update();
|
||||
}
|
||||
|
||||
if ($qty_diff != 0) {
|
||||
$cartQty = $qty_diff;
|
||||
$op = 'up';
|
||||
if ($qty_diff < 0) {
|
||||
$op = 'down';
|
||||
$cartQty = -$cartQty;
|
||||
}
|
||||
|
||||
$cart->updateQty($cartQty, $obj_booking_detail->id_product, null, false, $op, 0, null, true);
|
||||
}
|
||||
|
||||
// Update product available quantity
|
||||
StockAvailable::updateQuantity($order_detail->product_id, $order_detail->product_attribute_id, ($old_quantity - $order_detail->product_quantity), $order->id_shop);
|
||||
|
||||
@@ -4883,7 +4937,10 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$id_room,
|
||||
0,
|
||||
null,
|
||||
null
|
||||
null,
|
||||
null,
|
||||
0,
|
||||
$obj_booking_detail->id
|
||||
);
|
||||
|
||||
$extraDemands = $objBookingDemand->getRoomTypeBookingExtraDemands(
|
||||
@@ -4891,7 +4948,11 @@ class AdminOrdersControllerCore extends AdminController
|
||||
0,
|
||||
$id_room,
|
||||
$old_date_from,
|
||||
$old_date_to
|
||||
$old_date_to,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
$obj_booking_detail->id
|
||||
);
|
||||
|
||||
// set occupancy details
|
||||
@@ -4907,7 +4968,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'tax_incl' => $totalRoomPriceAfterTI,
|
||||
);
|
||||
|
||||
if ($update_htl_tables = $obj_booking_detail->UpdateHotelCartHotelOrderOnOrderEdit(
|
||||
if ($obj_booking_detail->updateHotelCartHotelOrderOnOrderEdit(
|
||||
$id_order,
|
||||
$id_room,
|
||||
$old_date_from,
|
||||
@@ -4915,7 +4976,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$new_date_from,
|
||||
$new_date_to,
|
||||
$occupancy,
|
||||
$new_total_price
|
||||
$new_total_price,
|
||||
$obj_booking_detail->id
|
||||
)) {
|
||||
// update extra demands total prices if dates are changes (price calc method for each day)
|
||||
if ($extraDemands) {
|
||||
@@ -5452,6 +5514,10 @@ class AdminOrdersControllerCore extends AdminController
|
||||
// delete refund request of the room if exists.
|
||||
OrderReturnDetail::deleteReturnDetailByIdBookingDetail($id_order, $idHotelBooking);
|
||||
|
||||
// Reducing the quantity from the cart after removing the room from the order
|
||||
$objCart = new Cart($objBookingDetail->id_cart);
|
||||
$objCart->updateQty($product_quantity, $objBookingDetail->id_product, null, false, 'down', 0, null, true);
|
||||
|
||||
// Assign to smarty informations in order to show the new product line
|
||||
$this->context->smarty->assign(array(
|
||||
'order' => $order,
|
||||
@@ -6195,7 +6261,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$oldTotalPriceTaxExcl = $objRoomTypeServiceProductOrderDetail->total_price_tax_excl;
|
||||
$oldTotalPriceTaxIncl = $objRoomTypeServiceProductOrderDetail->total_price_tax_incl;
|
||||
$oldQuantity = $objRoomTypeServiceProductOrderDetail->quantity;
|
||||
if ($oldPriceTaxExcl > 0) {
|
||||
if ($oldUnitPriceTaxExcl > 0) {
|
||||
$oldTaxMultiplier = $oldUnitPriceTaxIncl / $oldUnitPriceTaxExcl;
|
||||
} else {
|
||||
$oldTaxMultiplier = 1;
|
||||
@@ -6381,10 +6447,10 @@ class AdminOrdersControllerCore extends AdminController
|
||||
);
|
||||
|
||||
// add services in room
|
||||
$order = new Order($objHotelBookingDetail->id_order);
|
||||
if (!$response['hasError']) {
|
||||
$this->context->currency = new Currency($order->id_currency);
|
||||
foreach ($selectedServices as $service) {
|
||||
$order = new Order($objHotelBookingDetail->id_order);
|
||||
|
||||
// Create new cart
|
||||
$cart = new Cart();
|
||||
$cart->id_shop_group = $order->id_shop_group;
|
||||
@@ -6456,49 +6522,33 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$roomHtlCartInfo['id'])
|
||||
) {
|
||||
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail((int) $id_room_type_service_product_cart_detail);
|
||||
$totalPriceChangeTaxExcl += $totalPriceTaxExcl = $objRoomTypeServiceProductPrice->getServicePrice(
|
||||
(int)$product['id_product'],
|
||||
0,
|
||||
$objRoomTypeServiceProductCartDetail->quantity,
|
||||
$objHotelBookingDetail->date_from,
|
||||
$objHotelBookingDetail->date_to,
|
||||
false,
|
||||
$cart->id
|
||||
);
|
||||
$totalPriceChangeTaxIncl += $totalPriceTaxIncl = $objRoomTypeServiceProductPrice->getServicePrice(
|
||||
(int)$product['id_product'],
|
||||
0,
|
||||
$objRoomTypeServiceProductCartDetail->quantity,
|
||||
$objHotelBookingDetail->date_from,
|
||||
$objHotelBookingDetail->date_to,
|
||||
true,
|
||||
$cart->id
|
||||
);
|
||||
|
||||
$numDays = 1;
|
||||
if (Product::getProductPriceCalculation($product['id_product']) == Product::PRICE_CALCULATION_METHOD_PER_DAY) {
|
||||
$numDays = HotelHelper::getNumberOfDays($objHotelBookingDetail->date_from, $objHotelBookingDetail->date_to);
|
||||
}
|
||||
$product['cart_quantity'] = $objRoomTypeServiceProductCartDetail->quantity * $numDays;
|
||||
|
||||
$product['cart_quantity'] = $objRoomTypeServiceProductCartDetail->quantity * $numDays;
|
||||
$unitPriceTaxExcl = $objRoomTypeServiceProductPrice->getServicePrice(
|
||||
(int)$product['id_product'],
|
||||
0,
|
||||
$roomHtlCartInfo['id_product'],
|
||||
1,
|
||||
$objHotelBookingDetail->date_from,
|
||||
$objHotelBookingDetail->date_to,
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
$cart->id
|
||||
)/ $numDays;
|
||||
);
|
||||
$unitPriceTaxIncl = $objRoomTypeServiceProductPrice->getServicePrice(
|
||||
(int)$product['id_product'],
|
||||
0,
|
||||
$roomHtlCartInfo['id_product'],
|
||||
1,
|
||||
$objHotelBookingDetail->date_from,
|
||||
$objHotelBookingDetail->date_to,
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
$cart->id
|
||||
)/ $numDays;
|
||||
);
|
||||
|
||||
$totalPriceChangeTaxExcl += $totalPriceTaxExcl = ($unitPriceTaxExcl * $product['cart_quantity']);
|
||||
$totalPriceChangeTaxIncl += $totalPriceTaxIncl = ($unitPriceTaxIncl * $product['cart_quantity']);
|
||||
switch (Configuration::get('PS_ROUND_TYPE')) {
|
||||
case Order::ROUND_TOTAL:
|
||||
$product['total'] = $totalPriceTaxExcl;
|
||||
|
||||
@@ -375,7 +375,7 @@ class AdminPatternsControllerCore extends AdminController
|
||||
'root_category' => 1,
|
||||
'id' => 'id_category',
|
||||
'name' => 'name_category',
|
||||
'selected_categories' => array(3),
|
||||
'selected_categories' => array(3, 8),
|
||||
)
|
||||
),
|
||||
array(
|
||||
|
||||
@@ -246,7 +246,7 @@ class AdminSearchControllerCore extends AdminController
|
||||
}
|
||||
} else if ($associatedData = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product['id_product'])) {
|
||||
$count = 0;
|
||||
foreach ($associatedData['room_types'] as $id_room_type) {
|
||||
foreach ($associatedData['room_type'] as $id_room_type) {
|
||||
$objRoomType = new HotelRoomType($id_room_type);
|
||||
if (in_array($objRoomType->id_hotel, $accessibleHotels)) {
|
||||
$count += 1;
|
||||
|
||||
@@ -76,6 +76,7 @@ class AddressControllerCore extends FrontController
|
||||
$_POST['firstname'] = $this->context->customer->firstname;
|
||||
$_POST['lastname'] = $this->context->customer->lastname;
|
||||
$_POST['company'] = $this->context->customer->company;
|
||||
$_POST['phone'] = $this->context->customer->phone;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -409,8 +409,10 @@ class AuthControllerCore extends FrontController
|
||||
$customer = new Customer();
|
||||
$lastnameAddress = Tools::getValue('lastname');
|
||||
$firstnameAddress = Tools::getValue('firstname');
|
||||
$phoneAddress = Tools::getValue('phone');
|
||||
$_POST['lastname'] = Tools::getValue('customer_lastname', $lastnameAddress);
|
||||
$_POST['firstname'] = Tools::getValue('customer_firstname', $firstnameAddress);
|
||||
$_POST['phone'] = Tools::getValue('customer_phone', $phoneAddress);
|
||||
$addresses_types = [];
|
||||
if (Configuration::get('PS_REGISTRATION_PROCESS_TYPE')) {
|
||||
$addresses_types[] = 'address';
|
||||
@@ -420,24 +422,18 @@ class AuthControllerCore extends FrontController
|
||||
$addresses_types[] = 'address_invoice';
|
||||
}
|
||||
|
||||
$error_phone = false;
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST')) {
|
||||
if (Tools::isSubmit('submitGuestAccount') || !Tools::getValue('is_new_customer')) {
|
||||
if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')) {
|
||||
$error_phone = true;
|
||||
}
|
||||
} elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Configuration::get('PS_ORDER_PROCESS_TYPE'))
|
||||
|| (Configuration::get('PS_ORDER_PROCESS_TYPE') && !Tools::getValue('email_create'))
|
||||
|| (Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Tools::getValue('email_create')))
|
||||
&& (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))) {
|
||||
$error_phone = true;
|
||||
$className = 'CartCustomerGuestDetail';
|
||||
$rules = call_user_func(array($className, 'getValidationRules'), $className);
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !Tools::getValue('phone')) {
|
||||
$this->errors[] = Tools::displayError('Phone number is required.');
|
||||
} else {
|
||||
if (Tools::getValue('phone') && !Validate::isPhoneNumber(Tools::getValue('phone'))) {
|
||||
$this->errors[] = Tools::displayError('Invald phone number.');
|
||||
} elseif (Tools::getValue('phone') && Tools::strlen(Tools::getValue('phone')) > $rules['size']['phone']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Phone number is too long. (%s chars max).'), $rules['size']['phone']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($error_phone) {
|
||||
$this->errors[] = Tools::displayError('You must register at least one phone number.');
|
||||
}
|
||||
|
||||
if (!Tools::getValue('is_new_customer', 1)) {
|
||||
if ($idCustomer = Customer::customerExists(Tools::getValue('email'), true, false)) {
|
||||
$customer = new Customer($idCustomer);
|
||||
@@ -468,6 +464,8 @@ class AuthControllerCore extends FrontController
|
||||
|
||||
if (!count($this->errors)) {
|
||||
if ($customer->add()) {
|
||||
$phone = Tools::getValue('phone');
|
||||
CartCustomerGuestDetail::updateCustomerPhoneNumber($customer->email, $phone);
|
||||
if (!$customer->is_guest) {
|
||||
if (!$this->sendConfirmationMail($customer)) {
|
||||
$this->errors[] = Tools::displayError('The email cannot be sent.');
|
||||
@@ -614,6 +612,11 @@ class AuthControllerCore extends FrontController
|
||||
if (!$customer->save()) {
|
||||
$this->errors[] = Tools::displayError('An error occurred while creating your account.');
|
||||
} else {
|
||||
// save customer phone number in cart_customer_guest_detail
|
||||
$phone = Tools::getValue('phone');
|
||||
CartCustomerGuestDetail::updateCustomerPhoneNumber($customer->email, $phone);
|
||||
$_POST['phone'] = $phoneAddress;
|
||||
|
||||
foreach ($addresses_types as $addresses_type) {
|
||||
$$addresses_type->id_customer = (int)$customer->id;
|
||||
if ($addresses_type == 'address_invoice') {
|
||||
@@ -648,7 +651,6 @@ class AuthControllerCore extends FrontController
|
||||
$customer->addGroups(array((int)Configuration::get('PS_GUEST_GROUP')));
|
||||
}
|
||||
|
||||
$this->context->cart->id_address_delivery = (int)Address::getFirstCustomerAddressId((int)$customer->id);
|
||||
$this->context->cart->id_address_invoice = (int)Address::getFirstCustomerAddressId((int)$customer->id);
|
||||
if (isset($address_invoice) && Validate::isLoadedObject($address_invoice)) {
|
||||
$this->context->cart->id_address_invoice = (int)$address_invoice->id;
|
||||
|
||||
@@ -82,6 +82,20 @@ class IdentityControllerCore extends FrontController
|
||||
$this->errors = array_merge($this->errors, $this->customer->validateController());
|
||||
}
|
||||
|
||||
$phone = Tools::getValue('phone');
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST')) {
|
||||
if ($phone == '') {
|
||||
$this->errors[] = Tools::displayError('Phone number is required.');
|
||||
}
|
||||
}
|
||||
$className = 'CartCustomerGuestDetail';
|
||||
$rules = call_user_func(array($className, 'getValidationRules'), $className);
|
||||
if ($phone && !Validate::isPhoneNumber($phone)) {
|
||||
$this->errors[] = Tools::displayError('Invaid phone number.');
|
||||
} elseif ($phone && Tools::strlen($phone) > $rules['size']['phone']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Phone number is too long. (%s chars max).'), $rules['size']['phone']);;
|
||||
}
|
||||
|
||||
if (!count($this->errors)) {
|
||||
$this->customer->id_default_group = (int)$prev_id_default_group;
|
||||
$this->customer->firstname = Tools::ucwords($this->customer->firstname);
|
||||
@@ -109,6 +123,7 @@ class IdentityControllerCore extends FrontController
|
||||
$this->context->cookie->passwd = $this->customer->passwd;
|
||||
}
|
||||
if ($this->customer->update()) {
|
||||
CartCustomerGuestDetail::updateCustomerPhoneNumber($this->customer->email, $phone);
|
||||
$this->context->cookie->customer_lastname = $this->customer->lastname;
|
||||
$this->context->cookie->customer_firstname = $this->customer->firstname;
|
||||
$this->context->smarty->assign('confirmation', 1);
|
||||
@@ -118,6 +133,7 @@ class IdentityControllerCore extends FrontController
|
||||
}
|
||||
} else {
|
||||
$_POST = array_map('stripslashes', $this->customer->getFields());
|
||||
$_POST['phone'] = $this->customer->phone;
|
||||
}
|
||||
|
||||
return $this->customer;
|
||||
|
||||
@@ -115,6 +115,18 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->context->customer->birthday = (int)Tools::getValue('years').'-'.(int)Tools::getValue('months').'-'.(int)Tools::getValue('days');
|
||||
}
|
||||
|
||||
$phone = Tools::getValue('phone');
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !$phone) {
|
||||
$this->errors[] = Tools::displayError('Phone number is a required field.', false);
|
||||
}
|
||||
$className = 'CartCustomerGuestDetail';
|
||||
$rules = call_user_func(array($className, 'getValidationRules'), $className);
|
||||
if (!Validate::isPhoneNumber($phone)) {
|
||||
$this->errors[] = Tools::displayError('Please enter a valid Mobile phone number.', false);
|
||||
} elseif (Tools::strlen($phone) > $rules['size']['phone']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Mobile phone number is too long. (%s chars max).'), $rules['size']['phone']);
|
||||
}
|
||||
|
||||
$_POST['lastname'] = $_POST['customer_lastname'];
|
||||
$_POST['firstname'] = $_POST['customer_firstname'];
|
||||
$this->errors = array_merge($this->errors, $this->context->customer->validateController());
|
||||
@@ -125,18 +137,9 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
if ($idAddressDelivery = Tools::getValue('opc_id_address_delivery')) {
|
||||
$objAddress = new Address($idAddressDelivery);
|
||||
if (Validate::isLoadedObject($objAddress)) {
|
||||
$phoneMobile = Tools::getValue('phone_mobile');
|
||||
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !$phoneMobile) {
|
||||
$this->errors[] = Tools::displayError('Mobile phone number is a required field.', false);
|
||||
}
|
||||
|
||||
if (!Validate::isPhoneNumber($phoneMobile)) {
|
||||
$this->errors[] = Tools::displayError('Please enter a valid Mobile phone number.', false);
|
||||
}
|
||||
|
||||
if (!count($this->errors)) {
|
||||
$objAddress->phone_mobile = $phoneMobile;
|
||||
$objAddress->phone_mobile = $phone;
|
||||
$objAddress->firstname = $this->context->customer->firstname;
|
||||
$objAddress->lastname = $this->context->customer->lastname;
|
||||
if (!$objAddress->save()) {
|
||||
@@ -154,6 +157,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
);
|
||||
if (!count($this->errors)) {
|
||||
$return['isSaved'] = (bool)$this->context->customer->update();
|
||||
CartCustomerGuestDetail::updateCustomerPhoneNumber($this->context->customer->email, $phone);
|
||||
|
||||
} else {
|
||||
$return['isSaved'] = false;
|
||||
}
|
||||
@@ -686,6 +691,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
'id_country' => (int)$address_delivery->id_country,
|
||||
'id_state' => (int)$address_delivery->id_state,
|
||||
'id_gender' => (int)$customer->id_gender,
|
||||
'phone' => (int)$customer->phone,
|
||||
'sl_year' => $birthday[0],
|
||||
'sl_month' => $birthday[1],
|
||||
'sl_day' => $birthday[2],
|
||||
|
||||
@@ -423,25 +423,6 @@ class ParentOrderControllerCore extends FrontController
|
||||
|
||||
$customerAddresses = array_values($customerAddresses);
|
||||
|
||||
if (!count($customerAddresses) && !Tools::isSubmit('ajax')) {
|
||||
$bad_delivery = false;
|
||||
if (($bad_delivery = (bool)!Address::isCountryActiveById((int)$this->context->cart->id_address_delivery)) || !Address::isCountryActiveById((int)$this->context->cart->id_address_invoice)) {
|
||||
$params = array();
|
||||
if ($this->step) {
|
||||
$params['step'] = (int)$this->step;
|
||||
}
|
||||
if ($multi = (int)Tools::getValue('multi-shipping')) {
|
||||
$params['multi-shipping'] = $multi;
|
||||
}
|
||||
$back_url = $this->context->link->getPageLink('order', true, (int)$this->context->language->id, $params);
|
||||
|
||||
$params = array('back' => $back_url, 'id_address' => ($bad_delivery ? (int)$this->context->cart->id_address_delivery : (int)$this->context->cart->id_address_invoice));
|
||||
if ($multi) {
|
||||
$params['multi-shipping'] = $multi;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$this->context->smarty->assign(array(
|
||||
'addresses' => $customerAddresses,
|
||||
'formatedAddressFieldsValuesList' => $formatedAddressFieldsValuesList)
|
||||
@@ -450,10 +431,6 @@ class ParentOrderControllerCore extends FrontController
|
||||
|
||||
/* Setting default addresses for cart */
|
||||
if (count($customerAddresses)) {
|
||||
if ((!isset($this->context->cart->id_address_delivery) || empty($this->context->cart->id_address_delivery)) || !Address::isCountryActiveById((int)$this->context->cart->id_address_delivery)) {
|
||||
$this->context->cart->id_address_delivery = (int)$customerAddresses[0]['id_address'];
|
||||
$update = 1;
|
||||
}
|
||||
if ((!isset($this->context->cart->id_address_invoice) || empty($this->context->cart->id_address_invoice)) || !Address::isCountryActiveById((int)$this->context->cart->id_address_invoice)) {
|
||||
$this->context->cart->id_address_invoice = (int)$customerAddresses[0]['id_address'];
|
||||
$update = 1;
|
||||
|
||||
@@ -653,7 +653,18 @@ class ProductControllerCore extends FrontController
|
||||
// calculate room type price first
|
||||
$useTax = HotelBookingDetail::useTax();
|
||||
$totalPrice = 0;
|
||||
$productPriceWithoutReduction = $objProduct->getPriceWithoutReduct(!$useTax);
|
||||
$priceWithoutDiscount = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
);
|
||||
$roomTypeDateRangePrice = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
@@ -669,6 +680,8 @@ class ProductControllerCore extends FrontController
|
||||
true
|
||||
);
|
||||
$roomTypeDateRangePrice = $roomTypeDateRangePrice['total_price_tax_incl'];
|
||||
$totalPriceWithoutDiscount = $priceWithoutDiscount['total_price_tax_incl'];
|
||||
|
||||
} else {
|
||||
$featurePrice = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay(
|
||||
$idProduct,
|
||||
@@ -677,9 +690,10 @@ class ProductControllerCore extends FrontController
|
||||
false
|
||||
);
|
||||
$roomTypeDateRangePrice = $roomTypeDateRangePrice['total_price_tax_excl'];
|
||||
$totalPriceWithoutDiscount = $priceWithoutDiscount['total_price_tax_excl'];
|
||||
}
|
||||
$featurePriceDiff = (float) ($productPriceWithoutReduction - $featurePrice);
|
||||
|
||||
$totalPriceWithoutDiscount *= $quantity;
|
||||
$totalRoomPrice = $roomTypeDateRangePrice * $quantity;
|
||||
// calculate demand price now
|
||||
$demandsPricePerRoom = 0;
|
||||
@@ -788,6 +802,7 @@ class ProductControllerCore extends FrontController
|
||||
$smartyVars['has_room_type_demands'] = $roomTypeDemands ? true : false; // whether to show price breakup
|
||||
$smartyVars['rooms_price'] = $totalRoomPrice;
|
||||
$smartyVars['demands_price_per_room'] = $demandsPricePerRoom;
|
||||
$smartyVars['total_price_without_discount'] = $totalPriceWithoutDiscount + $demandsPrice;
|
||||
$smartyVars['demands_price'] = $demandsPrice;
|
||||
$smartyVars['total_price'] = $totalPrice;
|
||||
$this->context->smarty->assign($smartyVars);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Alias ID;Alias *;Search *;Active (0/1)
|
||||
1;ano, anno, nona;nano;1
|
||||
2;ipdo, idop, podi;ipod;1
|
||||
3;McBook, Mbcook;MacBook;1
|
||||
4;Blekin;Belkin;1
|
||||
1;htl, hotle;Hotel;1
|
||||
2;rom, roms;Room;1
|
||||
2;romblk, romblk;Room Block;1
|
||||
3;ordre;Order;1
|
||||
|
||||
|
4
docs/csv_import/bookings_import.csv
Normal file
4
docs/csv_import/bookings_import.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
Order Reference ID;Customer ID;Room Type ID;Duration(yyyy-mm-dd);Number Of Rooms;Order Price;Due Amount;Currency ID;Order Status ID;Service Product IDs (x:n, y:n, z:n,..);Additional Facilities IDs (x:a, y:b, z:c,...)
|
||||
1;1;1;2025-03-09,2025-03-10;1;1250;;1;2;20:2;2:1
|
||||
1;1;2;2025-03-09,2025-03-10;2;2000;;;2;20;1
|
||||
2;2;1;2024-03-09,2024-03-10;2;1250;250;;8;20;
|
||||
|
@@ -1,4 +1,3 @@
|
||||
Category ID;Active (0/1);Name *;Parent category;Root category (0/1);Description;Meta title;Meta keywords;Meta description;URL rewritten;Image URL
|
||||
10;1;iPods;Home;0;Now that you can buy movies from the iTunes Store and sync them to your iPod, the whole world is your theater.;Meta title-iPods;Meta keywords-iPods;Meta description-iPods;music-ipods;http://yourlinktotheimage.com/img1000.jpg
|
||||
11;1;Accessories;Home;0;Wonderful accessories for your iPod;Meta title-Accessories;Meta keywords-Accessories;Meta description-Accessories;accessories-ipod;http://yourlinktotheimage.com/img1001.jpg
|
||||
12;1;Laptops;Home;0;The latest Intel processor, a bigger hard drive, plenty of memory, and even more new features all fit inside just one liberating inch. The new Mac laptops have the performance, power, and connectivity of a desktop computer. Without the desk part.;Meta title-Laptops;Meta keywords-Laptops;Meta description-Laptops;laptops;http://yourlinktotheimage.com/img1002.jpg
|
||||
Category ID;Active (0/1);Name *;Parent Category
|
||||
100;1;Travel;Services
|
||||
101;1;Food;Services
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
Customer ID;Active (0/1);Titles ID (Mr = 1, Ms = 2, else 0);Email *;Password *;Birthday (yyyy-mm-dd);Last Name *;First Name *;Newsletter (0/1);Opt-in (0/1);Groups (x,y,z...);Default group ID
|
||||
1;1;1;Peter.Pan@prestashop.com;123456789;1987-04-02;Pan;Peter;1;0;Customer;3
|
||||
2;1;2;Wendy.Moira.Darling@prestashop.com;123456789;1989-11-12;Darling;Wendy Moira;1;0;Customer;3
|
||||
3;1;2;Tiger.Lily@prestashop.com;123456789;1982-02-28;Lily;Tiger;1;0;Customer;3
|
||||
4;1;1;James.Hook@prestashop.com;123456789;1952-12-04;Hook;James;0;1;Customer, Carribean;4
|
||||
5;1;2;Tinker.Bell@prestashop.com;123456789;1900-01-01;Bell;Tinker;1;1;Customer;3
|
||||
6;1;1;Bob.Smee@prestashop.com;123456789;1971-10-21;Smee;Bob;1;1;Customer;3
|
||||
7;1;1;Tictac.Crocodile@prestashop.com;123456789;1991-09-27;Crocodile;Tictac;0;0;Customer, Carribean;4
|
||||
8;1;1;Jack.Banning@prestashop.com;123456789;2003-07-05;Banning;Jack;0;0;Kids;5
|
||||
9;0;2;Maggie.Banning@prestashop.com;123456789;2006-02-27;Banning;Maggie;0;0;Kids;5
|
||||
Customer ID;Active (0/1);Titles ID (Mr = 1, Mrs = 2, else 0);Email *;Password *;Birthday (yyyy-mm-dd);Last Name *;First Name *;Newsletter (0/1);Opt-in (0/1);Groups (x,y,z...);Default Group ID
|
||||
1;1;1;peterpan@qloapps.com;123456789;1987-04-02;Pan;Peter;1;0;Customer;3
|
||||
2;1;2;monkeydluffy@qloapps.com;123456789;1989-11-12;Luffy;Monkey D;1;0;Customer;3
|
||||
3;1;2;tigerlily@qloapps.com;123456789;1982-02-28;Lily;Tiger;1;0;Customer;3
|
||||
4;1;1;jameshook@qloapps.com;123456789;1952-12-04;Hook;James;0;1;Guest;2
|
||||
5;1;2;tinkerbell@qloapps.com;123456789;1900-01-01;Bell;Tinker;1;1;Customer;3
|
||||
6;1;1;bobsmee@qloapps.com;123456789;1971-10-21;Smee;Bob;1;1;Customer;3
|
||||
7;1;1;tictaccrocodile@qloapps.com;123456789;1991-09-27;Crocodile;Tictac;0;0;Guest;2
|
||||
8;1;1;jackbanning@qloapps.com;123456789;2003-07-05;Banning;Jack;0;0;Visitor;1
|
||||
9;0;2;maggiedoe@qloapps.com;123456789;2006-02-27;Doe;Maggie;0;0;Visitor;1
|
||||
|
||||
|
3
docs/csv_import/hotels_import.csv
Normal file
3
docs/csv_import/hotels_import.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
Hotel ID;Active(0/1);Hotel Name;Short Description;Description;Mobile Phone;Email;Address;Rating;Check-In;Check-Out;Country ID;State ID;City;Zip Code;Hotel Policies;Allow Refund(0/1);Refund IDs (x,y,z...);Max Order Date;Prepration Time;Image URLs (x,y,z...);Delete Existing Images (0 = No, 1 = Yes)
|
||||
2;1;The Kings Hotel;The Kings Hotel with king size rooms. visit for a wonderful experience.;The Kings Hotel with king-size rooms. visit for a wonderful experience.;0900000009;kingshotel@demo.com;Greene St, New York, NY 10003, USA;3;12:00;11:00;21;32;New York;10003;1. intelligentsia tattooed pop-up salvia asymmetrical mixtape meggings tousled ramps VHS cred.2. intelligentsia tattooed pop-up salvia asymmetrical mixtape meggings tousled ramps VHS cred.;1;1;2024-01-01;0;http://localhost/hotelcommerce/modules/hotelreservationsystem/views/img/hotel_img/1/1.jpg;0
|
||||
3;1;The Sunshine Palace Inn;The Sunshine Palace Inn is a beautiful hotel in japan.;The Sunshine Palace Inn is a beautiful hotel in japan.;0900000009;sunshine@demo.com;Shingashi, Itabashi, Tokyo;4;09:00;08:00;11;306;Tokyo;611-0043;1.loremipsertmkjbg ag mixtape meggings tousled ramps VHS cred.;0;0;;3;http://localhost/hotelcommerce/modules/hotelreservationsystem/views/img/hotel_img/1/2.jpg,http://localhost/hotelcommerce/modules/hotelreservationsystem/views/img/hotel_img/1/3.jpg;0
|
||||
|
3
docs/csv_import/room_types_import.csv
Normal file
3
docs/csv_import/room_types_import.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
Product ID;Active(0/1);Name;Hotel ID;Pre-Tax Retail Price;Pre-Tax Operating Cost;Tax Rule ID;Allow Advance Payment;Room Type Advance Payement (0/1/2);Advance Payment Value;Include Tax With Advance Payment;Minimum Lenght Of Stay;Maximum Lenght Of Stay;Base Adults;Base Children;Maximum Adults;Maximum Children;Maximmum Guest;Show At Front;Additional Facilities IDs;Service Products IDs (x, y, z...);Feature IDs (x, y, z...);Short Description;Description;Meta Title;Meta Keywords;Meta Description;URL Rewritten;Image URLs (x,y,z...);Delete Existing Images (0 = No, 1 = Yes)
|
||||
6;1;The Sunshine Luxury;1;2200;0;1;1;1;10;0;1;0;2;0;2;2;4;1;1;12;1,2,3,4;The Sunshine Luxury;The Sunshine Luxury;;;;the-sunshine-luxury;http://localhost/hotelcommerce/img/p/4/4.jpg;0
|
||||
10;1;King Premium Rooms;1;3200;0;1;;0;;;2;7;2;0;2;2;4;1;;;1,2,3,4;King Premium Rooms;King Premium Rooms;;;;king-premium-rooms;http://localhost/hotelcommerce/img/p/3/3.jpg;0
|
||||
|
3
docs/csv_import/rooms_import.csv
Normal file
3
docs/csv_import/rooms_import.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
Room No;Floor;Product ID;Room Status (1 = Active, 2 = Inactive, 3 = Temporarily Inactive);Extra Information;Disabled Dates And Reason Incase Of Temporary Inactive
|
||||
GR-109;First;1;3;Newly added room;2024-01-01:2024-01-02:Reason1, 2023-02-03:2023-02-02:Reason2
|
||||
DR-107;First;2;1;;
|
||||
|
4
docs/csv_import/service_products_import.csv
Normal file
4
docs/csv_import/service_products_import.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
ID;Active(0/1);Name;Categories (x,y,z...);Associated Room Types IDs (x,y,z...);Pre-Tax Retail Price;Pre-tax Operating Cost;Tax Rule ID;Auto add to cart (0 = No,1 = Yes);Price display preference (If auto add to cart);Show at front office (0 = No,1 = Yes);Price calculation method(1 = Once per booking,2 = Each day);Short description;Image URLs (x,y,z...);Delete existing images (0 = No,1 = Yes)
|
||||
30;1;Room Maintenance Fee;;1,2;250;0;1;1;1;;;;http://localhost/hotelcommerce/img/p/1/0/10.jpg;0
|
||||
;1;Breakfast;;1,2;350;0;1;0;;1;2;;http://localhost/hotelcommerce/img/p/9/9.jpg;0
|
||||
;1;Cab on demand;;1,3;200;0;1;0;;1;1;;http://localhost/hotelcommerce/img/p/9/9.jpg;0
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -777,7 +777,7 @@
|
||||
<value>localhost</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_NAME" name="PS_SHOP_NAME">
|
||||
<value>PrestaShop</value>
|
||||
<value>QloApps</value>
|
||||
</configuration>
|
||||
<configuration id="PS_SHOP_EMAIL" name="PS_SHOP_EMAIL">
|
||||
<value>pub@qloapps.com</value>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
$localizationPacksRoot = realpath(dirname(__FILE__) . '/../../localization');
|
||||
|
||||
if (!$localizationPacksRoot) {
|
||||
die("Could not find the folder containing the localization files (should be 'localization' at the root of the PrestaShop folder).\n");
|
||||
die("Could not find the folder containing the localization files (should be 'localization' at the root of the QloApps folder).\n");
|
||||
}
|
||||
|
||||
$euLocalizationFiles = array();
|
||||
|
||||
14
install/fixtures/fashion/data/cart_customer_guest_detail.xml
Normal file
14
install/fixtures/fashion/data/cart_customer_guest_detail.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entity_cart_customer_guest_detail>
|
||||
<fields id="email" class="CartCustomerGuestDetail">
|
||||
<field name="id_cart" />
|
||||
<field name="id_gender" />
|
||||
<field name="firstname" />
|
||||
<field name="lastname" />
|
||||
<field name="email"/>
|
||||
<field name="phone" />
|
||||
</fields>
|
||||
<entities>
|
||||
<cart_customer_guest_detail id="customer_guest_1" id_cart="0" id_gender="1" firstname="John" lastname="Doe" email="pub@qloapps.com" phone="1234567890" />
|
||||
</entities>
|
||||
</entity_cart_customer_guest_detail>
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>PrestaShop দ্বারা চালিত</description>
|
||||
<title>হোটেল প্রাইম</title>
|
||||
<description>এটি এমন একটি স্থান যেখানে আরাম এবং বিলাসিতা প্রকৃতির সাথে মিলিত হয়েছে!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>entrar-em-contato-conosco</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>Loja desenvolvida pela PrestaShop</description>
|
||||
<keywords>shop, prestashop</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Um lugar onde o conforto e o luxo se misturam com a natureza!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id='manufacturer' id_shop='1'>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>napiste-nam</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul™</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Místo, kde se komfort a luxus mísí s přírodou!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>kontaktieren-sie-uns</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<keywords>Shop, prestashop</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Ein Ort, an dem Komfort und Luxus mit der Natur verschmelzen!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id="manufacturer" id_shop="1">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<template>payment_error</template>
|
||||
</order_state>
|
||||
<order_state id="Payment_remotely_accepted">
|
||||
<name>Zahlung ausserhalb von PrestaShop eingegangen</name>
|
||||
<name>Fernzahlung akzeptiert</name>
|
||||
<template>payment_accepted</template>
|
||||
</order_state>
|
||||
<order_state id="Awaiting_remote_payment">
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>contactanos</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>Tienda creada con PrestaShop</description>
|
||||
<keywords>tienda, prestashop</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>¡Un lugar donde el confort y el lujo se mezclan con la naturaleza!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id='manufacturer' id_shop='1'>
|
||||
|
||||
@@ -8,4 +8,4 @@ Tu información personal en {shop_name} es:
|
||||
{shop_name} - {shop_url}
|
||||
|
||||
|
||||
{shop_url} desarrollado por PrestaShop®
|
||||
{shop_url} impulsado por Webkul™
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>فروشگاه قدرت گرفته از پرستاشاپ</description>
|
||||
<title>هتل پرایم</title>
|
||||
<description>مکانی که در آن راحتی و لوکس بودن با طبیعت ترکیب شدهاند!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>nous-contacter</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>Boutique propulsée par PrestaShop</description>
|
||||
<title>Hôtel Prime</title>
|
||||
<description>Un endroit où le confort et le luxe se mélangent avec la nature !</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>צור-קשר</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>החנות מופעלת באמצעות פרסטהשופ</description>
|
||||
<title>מלון פריים</title>
|
||||
<description>מקום שבו נוחות ולוקסוס משתלבים עם הטבע!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>hubungi-kami</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>didukung oleh PrestaShop</description>
|
||||
<keywords>shop, prestashop</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Tempat di mana kenyamanan dan kemewahan berpadu dengan alam!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id='manufacturer' id_shop='1'>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>contattarci</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>Negozio powered by Webkul</description>
|
||||
<keywords>negozio, prestashop</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Un luogo dove il comfort e il lusso si mescolano con la natura!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id='manufacturer' id_shop='1'>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Vieta, kur komfortas ir prabanga dera su gamta!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>contact-met-ons-opnemen</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>Winkel gerund met behulp van PrestaShop</description>
|
||||
<keywords>shop, prestashop</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Een plek waar comfort en luxe samengaan met de natuur!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id='manufacturer' id_shop='1'>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>kontakt</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Sklep na oprogramowaniu PrestaShop</description>
|
||||
<keywords>sklep, prestashop</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Miejsce, gdzie komfort i luksus łączą się z naturą!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id="manufacturer" id_shop="1">
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>contacte-nos</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Loja powered by Webkul</description>
|
||||
<keywords>loja</keywords>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Um lugar onde o conforto e o luxo se misturam com a natureza!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id="manufacturer" id_shop="1">
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>nous-contacter</url_rewrite>
|
||||
</meta>
|
||||
<meta id='index' id_shop='1'>
|
||||
<title/>
|
||||
<description>Boutique propulsée par PrestaShop</description>
|
||||
<title>Hôtel Prime</title>
|
||||
<description>Un endroit où le confort et le luxe se mêlent à la nature !</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Magazin motorizat de PrestaShop</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>Un loc unde confortul și luxul se îmbină cu natura!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Магазин создан на PrestaShop</description>
|
||||
<keywords>магазин, prestashop</keywords>
|
||||
<title>Отель Прайм</title>
|
||||
<description>Место, где комфорт и роскошь сочетаются с природой!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id="manufacturer" id_shop="1">
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>網站以 PrestaShop 建置</description>
|
||||
<keywords>shop, prestashop</keywords>
|
||||
<title>Prime 酒店</title>
|
||||
<description>一個舒適與奢華與自然融合的地方!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
<meta id="manufacturer" id_shop="1">
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul™</description>
|
||||
<title>Khách sạn Prime</title>
|
||||
<description>Nơi mà sự thoải mái và sang trọng hòa quyện với thiên nhiên!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<url_rewrite>contact-us</url_rewrite>
|
||||
</meta>
|
||||
<meta id="index" id_shop="1">
|
||||
<title/>
|
||||
<description>Website powered by Webkul</description>
|
||||
<title>Hotel Prime</title>
|
||||
<description>A place where comfort and luxury are blended with nature!</description>
|
||||
<keywords/>
|
||||
<url_rewrite/>
|
||||
</meta>
|
||||
|
||||
@@ -69,7 +69,7 @@ div.field .userInfos{
|
||||
padding:7px 0 8px 15px;
|
||||
background:transparent url(img/bg-phone_block.png) no-repeat left top;
|
||||
}
|
||||
#header #PrestaShopLogo{
|
||||
#header #QloAppsLogo{
|
||||
float:right;
|
||||
margin:5px 10px 0 0;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user