Merge branch 'develop' into gli-689-2

This commit is contained in:
abhishek-webkul
2022-12-13 12:23:42 +05:30
committed by GitHub
174 changed files with 4102 additions and 1990 deletions

View File

@@ -459,7 +459,7 @@ $(document).ready(function() {
// reset form
/* global header_confirm_reset, body_confirm_reset, left_button_confirm_reset, right_button_confirm_reset */
$(".reset_ready").click(function () {
$(document).on('click', '.reset_ready', function () {
var href = $(this).attr('href');
confirm_modal( header_confirm_reset, body_confirm_reset, left_button_confirm_reset, right_button_confirm_reset,
function () {

View File

@@ -90,6 +90,7 @@
@import "controllers/carrier-wizard"
@import "controllers/dashboard"
@import "controllers/login"
@import "controllers/modules_catalog"
@import "controllers/modules"
@import "controllers/search"
@import "controllers/translations"

View File

@@ -0,0 +1,90 @@
#suggestion-wrapper-placeholder
.panel
text-align: center
#catalog-center-column
padding: 0 30px
.btn.btn-primary
background: #1292FF
border-radius: 5px
.pagination-container
text-align: center
margin-bottom: 12px
.list-container
.list-header
margin-bottom: 40px
.title
font-size: 24px
color: #000000
font-weight: 700
.sort-label
margin-top: 6px
.explore-panel
font-weight: 600
font-size: 16px
color: #000000
.bootstrap
#catalog-center-column
.list-empty
background-color: unset !important
#suggested-modules-list, #suggested-theme-list
.suggested-elements
display: -webkit-box
display: -webkit-flex
display: -ms-flexbox
display: flex
flex-wrap: wrap
margin: 0 -15px
.element-panel
display: flex
flex-direction: column
margin-bottom: 25px
> .panel
border: unset
box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.05)
margin: 0 10px
height: 100%
#suggested-modules-list
.module-info-wrapper
position: relative
height: 100%
.module-logo img
max-height: 60px
margin-bottom: 20px
margin-right: 10px
.panel-action
.module-price
font-size: 14px
font-weight: 700
#suggested-theme-list
.theme-info-wrapper
position: relative
height: 100%
.theme-logo
position: relative
width: 100%
padding-top: 70%
img
position: absolute
top: 0
left: 0
right: 0
bottom: 0
height: 100%
width: 100%
object-fit: cover
border-radius: 5px
.panel-action
.theme-price
font-size: 14px
font-weight: 700
#catalog-center-column
.explore-panel
margin-bottom: 60px

View File

@@ -204,3 +204,6 @@
.pointer
cursor: pointer
#recommendation-wrapper
margin-bottom: 20px

View File

@@ -102,6 +102,9 @@
</div>
</div>
</div>
{include file='recomended-banner.tpl'}
<div class="row" id="recommendation-wrapper" style="display:none">
</div>
<div class="row">
<div class="col-md-8 col-md-push-4 col-lg-7 col-lg-push-3" id="hookDashboardZoneTwo">
<div class='row'>
@@ -114,9 +117,16 @@
<div class="col-md-4 col-md-pull-8 col-lg-2 col-lg-pull-0" id="hookDashboardZoneThree">
<div class="row">
{$hookDashboardZoneThree}
{if isset($upgrade_info) && $upgrade_info}
<div class="col-sm-12">
<section class="widget panel">
{$upgrade_info->dash_upgrade_panel}
</section>
</div>
{/if}
<div class="col-sm-12">
<section class="dash_links widget panel">
<h3><i class="icon-link"></i> {l s="Useful links"}</h3>
<h3><i class="icon-link"></i> {l s="Help Center"}</h3>
<dl>
<dt><a href="https://qloapps.com/qlo-reservation-system/" class="_blank">{l s="Official Documentation"}</a></dt>
<dd>{l s="Qloapps User Guide"}</dd>

View File

@@ -28,7 +28,7 @@
<script type="text/javascript">
$(document).ready(function() {
$('#PS_CURRENCY_DEFAULT').change(function(e) {
alert('Before changing the default currency, we strongly recommend that you enable maintenance mode because any change on default currency requires manual adjustment of the price of each product');
alert('Before changing default currency, we strongly recommend that you enable maintenance mode from Preferences > Maintenance page because any change in default currency requires manual adjustment of price of each room type.');
});
});
</script>

View File

@@ -29,11 +29,6 @@
<div class="col-lg-8">
<div class="form-group">
<label>{l s='Filter by'}</label>
<select name="module_install" id="module_install_filter" class="form-control {if isset($showInstalledModules) && $showInstalledModules && $showInstalledModules != 'installedUninstalled' }active{/if}">
<option value="installedUninstalled" {if $showInstalledModules eq 'installedUninstalled'}selected="selected"{/if}>{l s='Installed & Not Installed'}</option>
<option value="installed" {if $showInstalledModules eq 'installed'}selected="selected"{/if}>{l s='Installed Modules'}</option>
<option value="uninstalled" {if $showInstalledModules eq 'uninstalled'}selected="selected"{/if}>{l s='Modules Not Installed '}</option>
</select>
</div>
<div class="form-group">
@@ -71,10 +66,10 @@
<!-- <span class="pull-right">
<button class="btn btn-default " type="submit" name="resetFilterModules">
<i class="icon-eraser"></i>
{l s='Reset'}
{l s='Reset'}
</button>
<button class="btn btn-default " name="filterModules" id="filterModulesButton" type="submit">
<i class="icon-filter"></i>
<i class="icon-filter"></i>
{l s='Filter'}
</button>
</span> -->

View File

@@ -72,7 +72,7 @@
if (module_name != '')
$.uiTableFilter($('#moduleContainer').find('table'), module_name);
$('#moduleQuicksearch').on('keyup', function(){
val = this.value;
if ($('#filter_all').hasClass('active'))
@@ -86,15 +86,15 @@
clearInterval(interval);
interval = null;
}
}, 100);
}).on('keydown', function(e){
if (e.keyCode == 13)
return false;
});
$('input[name="filtername"]').result(function(event, data, formatted) {
$('#filternameForm').submit();
});
@@ -114,7 +114,7 @@
$(this).attr("rel", "false");
$("input[name=modules]").removeAttr("checked");
}
});
});
// Method to reload filter in ajax
$('.categoryModuleFilterLink').click(function()
@@ -212,12 +212,12 @@
return false;
}
$(document).on('change', '#module_type_filter, #module_install_filter, #module_status_filter, #country_module_value_filter', function() {
setFilter();
$(document).on('change', '#module_type_filter, #module_install_filter, #module_status_filter, #country_module_value_filter', function() {
setFilter();
});
$('.moduleTabPreferencesChoise').change(function()
{
{
var value_pref = $(this).val();
var module_pref = $(this).attr('name');
module_pref = module_pref.substring(2, module_pref.length);
@@ -240,7 +240,7 @@
}
});
});
// Method to save favorites preferences
$('.moduleFavorite').change(function()
{
@@ -309,7 +309,7 @@
else
$('#favorite-count').html(total_favorites-1);
}
},
error: function(res,textStatus,jqXHR)
{

View File

@@ -186,7 +186,7 @@
</table>
<div class="btn-group pull-left">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{l s='bulk actions'}
{l s='Bulk actions'}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">

View File

@@ -27,9 +27,9 @@
<div class="modal-body">
<div class="alert alert-warning">
<h3>{l s='Do you want to install this module that could not be verified by PrestaShop?'}</h3>
<h3>{l s='Do you want to install this module that could not be verified by QloApps?'}</h3>
<p>{l s="This generally happens when the module isn't distributed through our official marketplace, PrestaShop Addons - or when your server failed to communicate with PrestaShop Addons."}</p>
<p>{l s="This generally happens when the module isn't distributed through our official marketplace, QloApps Addons - or when your server failed to communicate with QloApps Addons."}</p>
</div>
<div class="row">
@@ -59,7 +59,7 @@
<div class="modal-footer">
<div class="alert alert-info">
<p>
{l s='Since you may not have downloaded this module from PrestaShop Addons, we cannot assert that the module is not adding some undisclosed functionalities. We advise you to install it only if you trust the source of the content.'}
{l s='Since you may not have downloaded this module from QloApps Addons, we cannot assert that the module is not adding some undisclosed functionalities. We advise you to install it only if you trust the source of the content.'}
<a id="untrusted-show-risk" href="#"><strong>{l s="What's the risk?"}</strong></a>
</p>
</div>
@@ -74,13 +74,13 @@
<p>{l s="A module that hasn't been verified may be dangerous and could add hidden functionalities like backdoors, ads, hidden links, spam, etc. Don’t worry, this alert is simply a warning."}</p>
<p>{l s="PrestaShop, being an open-source software, has an awesome community with a long history of developing and sharing high quality modules. Before installing this module, making sure its author is a known community member is always a good idea (by checking [1]our forum[/1] for instance)." tags=['<a href="https://www.prestashop.com/forums/">']}</p>
<p>{l s="QloApps, being an open-source software, has an awesome community with a long history of developing and sharing high quality modules. Before installing this module, making sure its author is a known community member is always a good idea (by checking [1]our forum[/1] for instance)." tags=['<a href="https://forums.qloapps.com/">']}</p>
<h4>{l s='What Should I Do?'}</h4>
<p>{l s="If you trust or find the author of this module to be an active community member, you can proceed with the installation."}
<p>{l s="Otherwise you can look for similar modules on the official marketplace. [1]Click here to browse PrestaShop Addons[/1]." tags=['<a class="catalog-link" href="#">']}
<p>{l s="Otherwise you can look for similar modules on the official marketplace. [1]Click here to browse QloApps Addons[/1]." tags=['<a class="catalog-link" href="https://qloapps.com/addons/" target="_blank">']}
</div>

View File

@@ -22,17 +22,59 @@
* @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">
<ul class=" nav nav-pills">
<li><a href="#mod-alert" data-toggle="tab">{l s="Alert"}&nbsp;<span class="badge {if $module_alerts|@count}badge-danger{else}badge-success{/if}">{$module_alerts|@count}</span></a></li>
<li><a href="#mod-update" data-toggle="tab">{l s="Updates"}&nbsp;<span class="badge {if $upgrade_available|@count}badge-danger{else}badge-success{/if}">{$upgrade_available|@count}</span></a></li>
</ul>
<div class="tab-content">
<div id="mod-alert" class="tab-pane">
<hr>
{if $module_alerts|@count}
<div class="alert alert-warning">
{l s='There are %d alerts regarding your modules.' sprintf=count($module_alerts)}
<ul>
{foreach from=$module_alerts item='alert'}
<li>{$alert}</li>
{/foreach}
</ul>
</div>
{else}
<div class="alert alert-success">
{l s='There are no alerts regarding your modules.'}
</div>
{/if}
</div>
<div id="mod-update" class="tab-pane">
<hr>
{if $upgrade_available|@count}
<div class="alert alert-info">
{l s='An upgrade is available for some of your modules!'}
<ul>
{foreach from=$upgrade_available item='module'}
<li><a href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;anchor={$module.anchor|escape:'html':'UTF-8'}"><b>{$module.displayName|escape:'html':'UTF-8'}</b></a></li>
{/foreach}
</ul>
</div>
{else}
<div class="alert alert-success">
{l s='All modules are up to date!'}
</div>
{/if}
</div>
</div>
</div>
<div class="alert bg-info">
<div class="row modules-addons-info">
<h4>{l s='Explore all QloApps addons'} <a class="btn btn-default _blank" href="https://qloapps.com/addons/"> {l s='QloApps addons'}</a></h4>
</div>
</div>
{$kpis}
{if $add_permission eq '1'}
<div id="module_install" class="row" style="{if !isset($smarty.post.downloadflag)}display: none;{/if}">
<div class="panel col-lg-12">
<form action="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
<form id="module_install_form" action="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
<h3>{l s='Add a new module'}</h3>
<p class="alert alert-info">{l s='The module must either be a Zip file (.zip) or a tarball file (.tar, .tar.gz, .tgz).'}</p>
<div class="form-group">
@@ -60,26 +102,32 @@
</div>
<div class="form-group">
<div class="col-lg-9 col-lg-push-3">
<button class="btn btn-default" type="submit" name="download">
<button class="btn btn-default" type="submit" name="uploadAndInstall">
<i class="icon-upload-alt" ></i>
{l s='Upload this module'}
{l s='Upload and install this module'}
</button>
</div>
</div>
<div id="module_install_status" class="form-group" style="display:none">
<div class="col-lg-6 col-lg-push-3">
<ul class="list-unstyled">
<li class="mod_status_upload" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Uploading module.'}</li>
<li class="mod_status_check" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Checking module if module is trusted.'}</li>
<li class="mod_status_install" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Installing module.'}</li>
<li class="mod_status_update" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Module already installed, checking and installing updates.'}</li>
<li class="mod_status_rollback" style="display:none"><i class="icon-refresh icon-spin"></i>&nbsp;{l s='Rolling back changes.'}</li>
</ul>
<div class="install_msg"></div>
<div class="install_errors" style="display:none">
{l s='Errors.'}
<div class="list"></div>
</div>
</div>
</div>
</form>
</div>
</div>
{/if}
{if $upgrade_available|@count}
<div class="alert alert-info">
{l s='An upgrade is available for some of your modules!'}
<ul>
{foreach from=$upgrade_available item='module'}
<li><a href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;anchor={$module.anchor|escape:'html':'UTF-8'}"><b>{$module.displayName|escape:'html':'UTF-8'}</b></a></li>
{/foreach}
</ul>
</div>
{/if}
<div class="panel">
<div class="panel-heading">
<i class="icon-list-ul"></i>

View File

@@ -40,14 +40,19 @@
{assign var='modules' value=''}
{foreach from=$upgrade_available item='module'}
{assign var='modules' value=$modules|cat:$module.name:'|'}
{if $module.is_native}
{assign var='native_upgade' value=true}
{/if}
{/foreach}
{assign var='modules' value=$modules|substr:0:-1}
<li>
<a id="desc-module-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;updateAll=1" title="{l s='Update all'}">
<i class="process-icon-refresh"></i>
<div>{l s='Update all'}</div>
</a>
</li>
{if isset($native_upgade) && $native_upgade}
<li>
<a id="desc-module-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;updateAll=1" title="{l s='Update all'}">
<i class="process-icon-refresh"></i>
<div>{l s='Update all'}</div>
</a>
</li>
{/if}
{else}
<li>
<a id="desc-module-check-and-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;check=1" title="{l s='Check for update'}">
@@ -56,6 +61,12 @@
</a>
</li>
{/if}
<li>
<a id="desc-module-catalog" class="toolbar_btn anchor" href="{$link->getAdminLink('AdminModulesCatalog')}" title="{l s='Recommended Modules and Services'}">
<i class="process-icon-modules-list"></i>
<div>{l s='Recommended Modules and Services'}</div>
</a>
</li>
{if $add_permission eq '1' && ($context_mode != Context::MODE_HOST)}
<li>
<a id="desc-module-new" class="toolbar_btn anchor" href="#" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">

View File

@@ -72,7 +72,7 @@
{if $is_addons_partner}
<a class="btn btn-success btn-lg pull-right" href="{$url}">{l s='Install module'}</a>
{else}
<a class="btn btn-success btn-lg pull-right" href="{$url}" onclick="return !window.open(this.href);">{l s='View on PrestaShop Addons'}</a>
<a class="btn btn-success btn-lg pull-right" href="{$url}" onclick="return !window.open(this.href);">{l s='View on QloApps store'}</a>
{/if}
</div>
</div>

View File

@@ -35,8 +35,6 @@
<small class="text-muted">v{$module->version} - by {$module->author}</small>
{if isset($module->type) && $module->type == 'addonsBought'}
- <span class="module-badge-bought help-tooltip text-warning" data-title="{l s="You bought this module on QloApps Addons. Thank You."}"><i class="icon-pushpin"></i> <small>{l s="Bought"}</small></span>
{elseif isset($module->type) && $module->type == 'addonsMustHave'}
- <span class="module-badge-popular help-tooltip text-primary" data-title="{l s="This module is available on QloApps Addons"}"><i class="icon-group"></i> <small>{l s="Popular"}</small></span>
{elseif isset($module->type) && $module->type == 'addonsPartner'}
- <span class="module-badge-partner help-tooltip text-warning" data-title="{l s="This module is available for free thanks to our partner."}"><i class="icon-pushpin"></i> <small>{l s="Official"}</small></span>
{elseif isset($module->id) && $module->id gt 0}

View File

@@ -25,46 +25,16 @@
*}
{if isset($tab_modules_list) && !empty($tab_modules_list)}
<div class="row row-margin-bottom">
<div class="col-lg-12">
<ul class="nav nav-pills">
{if count($tab_modules_list.not_installed)}
<li class="active">
<a href="#tab_modules_list_not_installed" data-toggle="tab">
{l s='Not Installed'}
</a>
</li>
{/if}
{if count($tab_modules_list.installed)}
<li {if count($tab_modules_list.not_installed) == 0}class="active"{/if}>
<a href="#tab_modules_list_installed" data-toggle="tab">
{l s='Installed'}
</a>
</li>
{/if}
</ul>
</div>
</div>
<div id="modules_list_container_content" class="tab-content modal-content-overflow">
{if count($tab_modules_list.not_installed)}
<div class="tab-pane active" id="tab_modules_list_not_installed">
<table id="tab_modules_list_not_installed" class="table">
{foreach from=$tab_modules_list.not_installed item=module}
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}}
{/foreach}
</table>
</div>
{/if}
{if count($tab_modules_list.installed)}
<div class="tab-pane {if count($tab_modules_list.not_installed) == 0}active{/if}" id="tab_modules_list_installed">
<table id="tab_modules_list_installed" class="table">
{foreach from=$tab_modules_list.installed item=module}
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}}
{/foreach}
</table>
</div>
{/if}
</div>
<table id="tab_modules_list_not_installed" class="table">
{foreach from=$tab_modules_list.not_installed item=module}
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}}
{/foreach}
</table>
<table id="tab_modules_list_installed" class="table">
{foreach from=$tab_modules_list.installed item=module}
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",rowalt"}}
{/foreach}
</table>
{/if}
<div class="alert alert-addons row-margin-top">
<a href="https://qloapps.com/addons" onclick="return !window.open(this.href);">{l s='More modules on qloapps.com/addons/'}</a>

View File

@@ -0,0 +1,12 @@
<div id="ajax_confirmation" class="alert alert-success hide"></div>
{* ajaxBox allows*}
<div id="ajaxBox" style="display:none"></div>
{* {include file='controllers/modules_catalog/recomended-banner.tpl'} *}
{include file='recomended-banner.tpl'}
<div class="row">
<div class="col-lg-12">
{include file='controllers/modules_catalog/page.tpl'}
</div>
</div>

View File

@@ -0,0 +1,29 @@
<?php
/**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2022 Webkul IN
* @license https://store.webkul.com/license.html
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,51 @@
{*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2022 Webkul IN
* @license https://store.webkul.com/license.html
*}
<div class="suggested-elements row">
{foreach $elements as $element}
<div class="col-xs-12 col-sm-6 col-md-4 element-panel">
<div class="panel">
<div class="module-info-wrapper">
<div class="module-logo clearfix">
<img src="{if isset($element->image)}{$element->image}{else}{$modules_uri}/{$element->name}/{$element->logo}{/if}" title="{$element->displayName}" class="pull-left">
<h4 class="name" data-name="{$element->name}">{$element->displayName}</h4>
<p class="text-muted">{$element->version} {l s='By'} {$element->author}</p>
</div>
<p>
{if $element->description_full}
{$element->description_full|truncate:90:"..."}
{else}
{$element->description|truncate:90:"..."}
{/if}
{* <a href="{if $element->element_type == $element_type_module}{$currentIndex|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}&amp;ajax=1&amp;action=GetModuleQuickView&amp;module={$element->name|urlencode}{else}{$element->addons_buy_url|replace:' ':'+'|escape:'html':'UTF-8'}{/if}" class="fancybox-quick-view pull-right">{l s='Read more'}</a> *}
</p>
<div class="panel-action clearfix">
{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" 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="#" title="{l s='Install'}">{l s='Install'}</a>
{/if}
</div>
</div>
</div>
</div>
{/foreach}
</div>

View File

@@ -0,0 +1,116 @@
{*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2022 Webkul IN
* @license https://store.webkul.com/license.html
*}
<div id="catalog-center-column">
{if isset($modules) && $modules}
<div id="suggested-modules-list" class="row list-container">
<div class="col-sm-12">
<div class="row form-horizontal list-header">
<div class="pull-left col-sm-6 title">{l s='Suggested Modules'}&nbsp;</div>
<div class="pull-right col-sm-3">
<div class="input-group">
<input type="text" name="module-search" id="module-search" placeholder="{l s='Search module name...'}">
<span class="input-group-addon">
<i class="icon-search"></i>
</span>
</div>
</div>
{if isset($sort_criterta) && $sort_criterta}
<div class="pull-right col-sm-3">
<div class="row">
<label class="pull-left sort-label"><span>{l s='Sort By :'}</span></label>
<div class="col-sm-9">
<select name="module-sort" id="module-sort">
{foreach $sort_criterta as $criteria}
<option value="{$criteria['value']}" {if $criteria['value'] == $module_sort}selected{/if}>{$criteria['title']}</option>
{/foreach}
</select>
</div>
</div>
</div>
{/if}
</div>
{include file='controllers/modules_catalog/modules_list.tpl' elements=$modules}
<div class="list-empty" style="display:none">
<div class="list-empty-msg">
<i class="icon-warning-sign list-empty-icon"></i>
{l s='No modules found'}
</div>
</div>
<div class="pagination-container">
<ul class="pagination-block"></ul>
</div>
</div>
</div>
<div class="panel explore-panel text-center">
{l s='Explore all addon of Qloapps'}&nbsp;
<a href="https://qloapps.com/addons/" class="btn btn-primary btn-lg">{l s='QloApps Addons'}</a>
</div>
{/if}
{if isset($themes) && $themes}
<div id="suggested-theme-list" class="row list-container">
<div class="col-sm-12">
<div class="row form-horizontal list-header">
{* <div class="row"> *}
<div class="pull-left col-sm-6 title">{l s='Suggested Themes'}&nbsp;</div>
<div class="pull-right col-sm-3">
<div class="input-group">
<input type="text" name="theme-search" id="theme-search" placeholder="{l s='Search theme name...'}">
<span class="input-group-addon">
<i class="icon-search"></i>
</span>
</div>
</div>
{if isset($sort_criterta) && $sort_criterta}
<div class="pull-right col-sm-3">
<div class="row">
{* <div class="col-sm-3"> *}
<label class="pull-left sort-label"><span>{l s='Sort By :'}</span></label>
{* </div> *}
<div class="col-sm-9">
<select name="theme-sort" id="theme-sort">
{foreach $sort_criterta as $criteria}
<option value="{$criteria['value']}" {if $criteria['value'] == $theme_sort}selected{/if}>{$criteria['title']}</option>
{/foreach}
</select>
</div>
</div>
</div>
{/if}
{* </div> *}
</div>
{include file='controllers/modules_catalog/theme_list.tpl' elements=$themes}
<div class="list-empty" style="display:none">
<div class="list-empty-msg">
<i class="icon-warning-sign list-empty-icon"></i>
{l s='No themes found'}
</div>
</div>
<div class="pagination-container">
<ul class="pagination-block"></ul>
</div>
</div>
</div>
<div class="panel explore-panel text-center">
{l s='Explore all themes of Qloapps'}&nbsp;
<a href="https://store.webkul.com/Qloapps/responsive.html" class="btn btn-primary btn-lg">{l s='QloApps Themes'}</a>
</div>
{/if}
</div>

View File

@@ -0,0 +1,46 @@
{*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2022 Webkul IN
* @license https://store.webkul.com/license.html
*}
<div class="suggested-elements row">
{foreach $elements as $element}
<div class="col-sm-6 col-md-6 element-panel">
<div class="panel">
<div class="theme-info-wrapper">
<div class="theme-logo clearfix">
<img src="{if isset($element->image)}{$element->image}{else}{$modules_uri}/{$element->name}/{$element->logo}{/if}" title="{$element->displayName}">
</div>
<h4 class="name" data-name="{$element->name}">{$element->displayName}</h4>
<p class="text-muted">{$element->version} {l s='By'} {$element->author}</p>
<p>
{if $element->description_full}{$element->description_full|truncate:180:"..."}{else}{$element->description|truncate:180:"..."}{/if}
</p>
<div class="panel-action clearfix">
{if isset($element->type) && $element->type == 'addonsMustHave'}
<span class="theme-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" href="{$element->options.install_url|escape:'html':'UTF-8'}" title="{l s='Install'}">{l s='Install'}</a>
{/if}
</div>
</div>
</div>
</div>
{/foreach}
</div>

View File

@@ -174,7 +174,7 @@
{if $live_edit}
<p>{l s='You have to select a shop to use Live Edit'}</p>
{else}
<p>{l s='Click here to be redirected to the front office of your shop where you can move and delete modules directly.'}</p>
<p>{l s='Click here to be redirected to the front office of your website where you can move and delete modules directly.'}</p>
<a class="btn btn-default _blank" href="{$url_live_edit|escape:'html':'UTF-8'}">
<i class="icon-edit"></i>
{l s='Run Live Edit'}

View File

@@ -159,7 +159,7 @@
</td>
<td class="product_action text-right">
{* edit/delete controls *}
<div class="btn-group">
<div class="btn-group pull-right">
<button type="button" class="btn btn-default edit_product_change_link">
<i class="icon-pencil"></i>
{l s='Edit'}

View File

@@ -666,11 +666,11 @@
<div class="row">
<div class="col-xs-6">
{if ($customer->isGuest())}
{l s='This order has been placed by a guest.'}
<p>{l s='This booking has been created by a guest.'}</p>
{if (!Customer::customerExists($customer->email))}
<form method="post" action="index.php?tab=AdminCustomers&amp;id_customer={$customer->id}&amp;id_order={$order->id|intval}&amp;token={getAdminToken tab='AdminCustomers'}">
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
<input class="btn btn-default" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" />
<input class="btn btn-default" type="submit" name="submitGuestToCustomer" value="{l s='Transform this guest into a customer'}" />
<p class="help-block">{l s='This feature will generate a random password and send an email to the customer.'}</p>
</form>
{else}

View File

@@ -1,321 +0,0 @@
{if isset($product->id) && isset($htl_config)}
<div id="product-configuration" class="panel product-tab">
<input type="hidden" name="submitted_tabs[]" value="Booking"/>
<h3 class="tab"> <i class="icon-info"></i> {l s='Booking Information'}</h3>
<div class="form-group">
<div class="col-sm-1"></div>
<label for="from_date" class="control-label col-sm-1 required">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Booking date starts from'}">{l s='From'}</span>
</label>
<div class="col-sm-2">
<input type="hidden" id="checkTabClick" value="0" name="checkTabClick">
<input type="text" name="from_date" class="form-control" id="from_date" value="{$date_from}">
</div>
<label for="to_date" class="control-label col-sm-1 required">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Booking date upto'}">{l s='To'}</span>
</label>
<div class="col-sm-2">
<input type="text" name="to_date" class="form-control" id="to_date" value="{$date_to}">
</div>
<input type="hidden" id="product_id" name="id_product" value="{$product->id}">
<input type="hidden" id="hotel_id" name="id_hotel" value="{$rooms_info.id_hotel}">
<!-- <input type="hidden" id="num_adults" name="num_adults" value="{$rooms_info.adult}">
<input type="hidden" id="num_children" name="num_children" value="{$rooms_info.children}"> -->
</div>
<div class="form-group">
<div class="col-sm-1"></div>
<div class="hotel_date col-sm-6">
<div class="row margin-leftrgt-0">
<div class="col-sm-12 htl_date_header">
<div class="col-sm-4">
<p class="htl_date_disp">{$date_from|date_format:"%d"}</p>
<span class="htl_month_disp">{$date_from|date_format:"%b"}</span>
</div>
<div class="col-sm-2">
<p class="htl_date_disp">-</p>
</div>
<div class="col-sm-3">
<p class="htl_date_disp">{$date_to|date_format:"%d"}</p>
<span class="htl_month_disp">{$date_to|date_format:"%b"}</span>
</div>
</div>
</div>
</div>
<div class="col-sm-5 htl_room_data_cont">
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12 htl_room_cat_data">
<p class="room_cat_header">{l s='Total Rooms'}</p>
<p class="room_cat_data">{$booking_data['stats']['total_rooms']}</p>
</div>
</div>
<hr class="hr_style" />
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12 htl_room_cat_data no_border">
<p class="room_cat_header">{l s='Partially Available'}</p>
<p class="room_cat_data">{$booking_data['stats']['num_part_avai']}</p>
</div>
</div>
<hr class="hr_style" />
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12 htl_room_cat_data">
<p class="room_cat_header">{l s='Available Rooms'}</p>
<p class="room_cat_data">{$booking_data['stats']['num_avail']}</p>
</div>
</div>
<hr class="hr_style" />
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12 htl_room_cat_data no_border">
<p class="room_cat_header">{l s='Booked Rooms'}</p>
<p class="room_cat_data">{$booking_data['stats']['num_booked']}</p>
</div>
</div>
<hr class="hr_style" />
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12 htl_room_cat_data">
<p class="room_cat_header">{l s='Unavailable Rooms'}</p>
<p class="room_cat_data">{$booking_data['stats']['num_unavail']}</p>
</div>
</div>
<hr class="hr_style" />
</div>
</div>
<div class="row">
<div class="col-sm-6 indi_cont clearfix">
<div class="color_indicate bg-green"></div>
<span class="indi_label">{l s='Available Rooms'}</span>
</div>
<div class="col-sm-6 indi_cont clearfix">
<div class="color_indicate bg-yellow"></div>
<span class="indi_label">{l s='Partially Available'}</span>
</div>
<div class="col-sm-6 indi_cont clearfix">
<div class="color_indicate bg-red"></div>
<span class="indi_label">{l s='Unavailable Rooms'}</span>
</div>
</div>
</div>
</div>
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&amp;submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default">
<i class="process-icon-cancel"></i>
{l s='Cancel'}
</a>
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled" id="stayBookingTab">
<i class="process-icon-loading"></i>
{l s='Display Bookings'}
</button>
</div>
</div>
<div class="panel">
<h3 class="tab"> <i class="icon-list"></i> {l s='LIST OF HOTEL ROOMS'}</h3>
<div class="form-group">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>{l s='Room No.'}</th>
<th>{l s='Status'}</th>
<th>{l s='Message'}</th>
</tr>
</thead>
<tbody>
{foreach from=$booking_data['rm_data'][0]['data'] key=b_key item=b_val}
{if ($b_key == 'available') && !empty($b_val)}
{foreach from=$b_val key=data_k item=data_v}
<tr>
<td>{$data_v['room_num']}</td>
<td>{l s='Available'}</td>
<td>{$data_v['room_comment']}</td>
</tr>
{/foreach}
{elseif ($b_key == 'unavailable') && !empty($b_val)}
{foreach from=$b_val key=data_k item=data_v}
<tr>
<td>{$data_v['room_num']}</td>
<td>{l s='Unavailable'}</td>
<td>{$data_v['room_comment']}</td>
</tr>
{/foreach}
{elseif ($b_key == 'booked') && !empty($b_val)}
{foreach from=$b_val key=data_k item=data_v}
<tr>
<td>{$data_v['room_num']}</td>
<td>
{if $data_v['detail'][0]['booking_status'] == 1}
{l s='Alloted'}
{elseif $data_v['detail'][0]['booking_status'] == 2}
{l s='Checked-in'}
{elseif $data_v['detail'][0]['booking_status'] == 3}
{l s='Checked-out'}
{/if}
</td>
<td>{$data_v['detail'][0]['comment']}</td>
</tr>
{/foreach}
{elseif ($b_key == 'partially_available') && !empty($b_val)}
{foreach from=$b_val key=data_k item=data_v}
<tr>
<td>{$data_v['room_num']}</td>
<td>{l s='Partially Available'}</td>
<td>{if isset($data_v['comment'])}{$data_v['comment']}{/if}</td>
</tr>
{/foreach}
{/if}
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
{/if}
<script type="text/javascript">
$(document).ready(function()
{
var booking_calendar_data = '{$booking_calendar_data|@json_encode}';
var check_css_condition_var = '{$check_css_condition_var}';
var check_calendar_var = '{$check_calendar_var}';
$("#from_date").datepicker({
dateFormat: 'yy-mm-dd',
onSelect: function(selectedDate) {
var date_format = selectedDate.split("-");
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[0], date_format[1] - 1, date_format[2])));
selectedDate.setDate(selectedDate.getDate() + 1);
$("#to_date").datepicker("option", "minDate", selectedDate);
},
});
$("#to_date").datepicker({
dateFormat: 'yy-mm-dd',
beforeShow: function (input, instance) {
var datefrom = $('#from_date').val();
if (typeof datefrom != 'undefined' && datefrom != '') {
var date_format = datefrom.split("-");
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[0], date_format[1] - 1, date_format[2])));
selectedDate.setDate(selectedDate.getDate()+1);
$("#to_date").datepicker("option", "minDate", selectedDate);
} else {
var date_format = new Date();
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date()));
selectedDate.setDate(selectedDate.getDate()+1);
$("#to_date").datepicker("option", "minDate", selectedDate);
}
}
});
if (booking_calendar_data != 'null' && check_css_condition_var && check_calendar_var)
{
if (typeof(booking_calendar_data) != 'undefined')
{
var calendar_data = JSON.parse(booking_calendar_data);
$(".hotel_date").datepicker({
defaultDate: new Date(),
dateFormat: 'dd-mm-yy',
minDate: 0,
onChangeMonthYear: function(year, month)
{
if (check_calendar_var)
$.ajax({
url: "{$link->getAdminLink('AdminProducts')|addslashes}",
data: {
ajax:true,
action:'ProductRoomsBookingDetailsOnMonthChange',
month:month,
year:year,
id_product:$('#product_id').val(),
id_hotel:$('#hotel_id').val(),
num_adults:$('#num_adults').val(),
num_children:$('#num_children').val(),
},
method:'POST',
async: false,
success: function (result)
{
calendar_data = JSON.parse(result);
},
error: function(XMLHttpRequest, textStatus, errorThrown)
{
alert(textStatus);
}
});
},
beforeShowDay: function(date)
{
var currentMonth = date.getMonth() + 1;
var currentDate = date.getDate();
if (currentMonth < 10)
{
currentMonth = '0' + currentMonth;
}
if (currentDate < 10)
{
currentDate = '0' + currentDate;
}
dmy = date.getFullYear() + "-" + currentMonth + "-" + currentDate;
var flag = 0;
$.each(calendar_data, function(key, value)
{
if (key === dmy)
{
msg = 'Total Available : '+value.stats.num_avail+'&#013;Total Partial Available : '+value.stats.num_part_avai+'&#013;Total Unavailable : '+value.stats.num_unavail+'&#013;Total Booked : '+value.stats.num_booked;
flag = 1;
return 1;
}
});
if (flag)
{
return [true, check_css_condition_var, msg];
}
else
return [true];
}
});
var count = $("."+check_css_condition_var).length;
//$("td."+check_css_condition_var).eq(0).css('border-radius','50% 0 0 50%');
$("td."+check_css_condition_var).eq(count-1).css('border-radius','0 50% 50% 0');
}
else
{
$(".hotel_date").datepicker(
{
defaultDate: new Date(),
dateFormat: 'dd-mm-yy',
minDate: 0,
});
}
}
$("#stayBookingTab").on("click", function()
{
$("#checkTabClick").val(1);
});
});
</script>

View File

@@ -1,3 +1,22 @@
{**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2022 Webkul IN
* @license LICENSE.txt
*}
{if isset($product->id)}
<div id="product-configuration" class="panel product-tab">
<input type="hidden" name="submitted_tabs[]" value="Configuration" />
@@ -10,85 +29,128 @@
<thead>
<tr class="nodrag nodrop">
<th class="col-sm-2 center">
<label class="control-label">
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="Enter the name of the Room for ex. A-101. Invalid characters <>;=#{}">{l s='Room No.'}</span>
<label class="control-label required">
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Enter room number. For eg. A-101, A-102 etc. Invalid characters <>;=#{}'}">
{l s='Room No.'}
</span>
</label>
</th>
<th class="col-sm-2 center">
<span>{l s='Floor'}</span>
<label class="control-label">
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Enter floor of the room. For eg. First, Second etc. Invalid characters <>;=#{}'}">
{l s='Floor'}
</span>
</label>
</th>
<th class="col-sm-2">
<span>{l s='Status'}</span>
<th class="col-sm-2 center">
<label class="control-label">
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Select status of the room.'}">
{l s='Status'}
</span>
</label>
</th>
<th class="col-sm-6 center">
<span>{l s='Extra Information'}</span>
<th class="col-sm-3 center">
<label class="control-label">
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Enter extra information about this room. Leave empty if not required.'}">
{l s='Extra Information'}
</span>
</label>
</th>
<th class="col-sm-2 center">
<label class="control-label">
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Set date ranges when room is set to Temporarily Inactive.'}">
{l s='Disable Dates'}
</span>
</label>
</th>
<th class="col-sm-1 center">
{l s='--'}
</th>
</tr>
{if isset($htl_room_info) && $htl_room_info}
{foreach from=$htl_room_info key=key item=info}
<tr class="room_data_values" id="row_index{$key}" data-rowKey="{$key}">
</thead>
<tbody>
{if isset($smarty.post.rooms_info) && is_array($smarty.post.rooms_info) && count($smarty.post.rooms_info)}
{assign var="rooms_info" value=$smarty.post.rooms_info}
{elseif isset($htl_room_info) && is_array($htl_room_info) && count($htl_room_info)}
{assign var="rooms_info" value=$htl_room_info}
{/if}
{if isset($rooms_info) && is_array($rooms_info) && count($rooms_info)}
{foreach from=$rooms_info key=key item=room_info}
{assign var="var_name_room_info" value="rooms_info[`$key`]"}
<tr class="room_data_values" data-row-index="{$key}">
<td class="col-sm-1 center">
<input class="form-control" type="text" value="{$info['room_num']}" name="room_num[]">
<input class="form-control" type="text" value="{$room_info['room_num']}" name="{$var_name_room_info|cat:'[room_num]'}">
</td>
<td class="col-sm-2 center">
<input class="form-control" type="text" value="{$info['floor']}" name="room_floor[]">
<input class="form-control" type="text" value="{$room_info['floor']}" name="{$var_name_room_info|cat:'[floor]'}">
</td>
<td class="col-sm-2 center">
<select class="form-control room_status" name="room_status[]">
<select class="form-control room_status" name="{$var_name_room_info|cat:'[id_status]'}">
{foreach from=$rm_status item=room_stauts}
<option value="{$room_stauts['id']}" {if $info['id_status'] == {$room_stauts['id']}}selected="selected"{/if}>{$room_stauts['status']}</option>
<option value="{$room_stauts['id']}" {if $room_info['id_status'] == {$room_stauts['id']}}selected="selected"{/if}>{$room_stauts['status']}</option>
{/foreach}
</select>
</td>
<td class="center col-sm-6">
<a class="btn btn-default deactiveDatesModal" data-toggle="modal" data-target="#deactiveDatesModal" {if $info['id_status'] != $rm_status['STATUS_TEMPORARY_INACTIVE']['id'] }style="display: none;"{/if}>{if $info['id_status'] != $rm_status['STATUS_TEMPORARY_INACTIVE']['id'] }{l s='Add Dates'}{else}{l s='View Dates'}{/if}
</a>
<input type="text" class="form-control room_comment" value="{$info['comment']}" name="room_comment[]" {if $info['id_status'] == $rm_status['STATUS_TEMPORARY_INACTIVE']['id'] }style="display: none;"{/if}>
<input type="hidden" class="form-control disableDatesJSON" name="disableDatesJSON[]" {if $info['id_status'] == $rm_status['STATUS_TEMPORARY_INACTIVE']['id']}value="{$info['disabled_dates_json']|escape:'html':'UTF-8'}"{/if}>
<td class="col-sm-3 center">
<input type="text" class="form-control room_comment" value="{$room_info['comment']}" name="{$var_name_room_info|cat:'[comment]'}">
</td>
<td class="center col-sm-1">
<a href="#" class="rm_htl_room btn btn-default" data-id-htl-info="{$info['id']}"><i class="icon-trash"></i></a>
<input type="hidden" name="id_room_info[]" value="{$info['id']}">
<td class="col-sm-2 center">
<a class="btn btn-default deactiveDatesModal {if $room_info['id_status'] != $rm_status['STATUS_TEMPORARY_INACTIVE']['id'] }disabled{/if}" data-toggle="modal" data-target="#deactiveDatesModal">{if $room_info['id_status'] != $rm_status['STATUS_TEMPORARY_INACTIVE']['id'] }{l s='Add Dates'}{else}{l s='View Dates'}{/if}
</a>
<input type="hidden" class="form-control disable_dates_json" name="{$var_name_room_info|cat:'[disable_dates_json]'}" {if $room_info['id_status'] == $rm_status['STATUS_TEMPORARY_INACTIVE']['id']}value="{$room_info['disable_dates_json']|escape:'html':'UTF-8'}"{/if}>
</td>
<td class="col-sm-1 center">
{if isset($room_info['id'])}
<a href="#" class="rm_htl_room btn btn-default" data-id-htl-info="{$room_info['id']}"><i class="icon-trash"></i></a>
<input type="hidden" name="{$var_name_room_info|cat:'[id]'}" value="{$room_info['id']}">
{else}
<a href="#" class="remove-rooms-button btn btn-default"><i class="icon-trash"></i></a>
{/if}
</td>
</tr>
{/foreach}
{else}
{for $k=0 to 1}
<tr class="room_data_values" id="row_index{$k}" data-rowKey="{$k}">
<td class="col-sm-2 center">
<input class="form-control" type="text" name="room_num[]">
{assign var="var_name_room_info" value="rooms_info[`$k`]"}
<tr class="room_data_values" data-row-index="{$k}">
<td class="col-sm-1 center">
<input class="form-control" type="text" name="{$var_name_room_info|cat:'[room_num]'}">
</td>
<td class="col-sm-2 center">
<input class="form-control" type="text" name="room_floor[]">
<input class="form-control" type="text" name="{$var_name_room_info|cat:'[floor]'}">
</td>
<td class="col-sm-2 center">
<select class="form-control room_status" name="room_status[]">
<select class="form-control room_status" name="{$var_name_room_info|cat:'[id_status]'}">
{foreach from=$rm_status item=room_stauts}
<option value="{$room_stauts['id']}">{$room_stauts['status']}</option>
{/foreach}
</select>
</td>
<td class="center col-sm-6">
<a class="deactiveDatesModal" data-toggle="modal" data-target="#deactiveDatesModal" style="display: none;">
{l s='add Dates'}
<td class="center col-sm-3">
<input type="text" class="form-control room_comment" name="{$var_name_room_info|cat:'[comment]'}">
</td>
<td class="center col-sm-2">
<a class="btn btn-default deactiveDatesModal disabled" data-toggle="modal" data-target="#deactiveDatesModal">
{l s='Add Dates'}
</a>
<input type="hidden" class="form-control disableDatesJSON" name="disableDatesJSON" value="0">
<input type="text" class="form-control room_comment" name="room_comment[]">
<input type="hidden" class="form-control disable_dates_json" name="{$var_name_room_info|cat:'[disable_dates_json]'}" value="">
</td>
{if $k == 1}
<td class="center col-sm-1">
<td class="center col-sm-1">
{if $k == 1}
<a href="#" class="remove-rooms-button btn btn-default"><i class="icon-trash"></i></a>
</td>
{/if}
{else}
<a href="#" class="remove-rooms-button btn btn-default disabled"><i class="icon-trash"></i></a>
{/if}
</td>
</tr>
{/for}
{/if}
</thead>
</tbody>
</table>
<div class="form-group">
<div class="col-sm-12">
<button id="add-more-rooms-button" class="btn btn-default" type="button" data-size="s" data-style="expand-right">
<i class="icon-folder-open"></i>
<i class="icon icon-plus"></i>
{l s='Add More Rooms'}
</button>
</div>
@@ -119,9 +181,12 @@
<button type="button" class="close margin-right-10" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title"><i class="icon-calendar"></i>&nbsp; {l s='Disable dates'}</h4>
<h4 class="modal-title"><i class="icon-calendar"></i>&nbsp; {l s='Disable Dates'}</h4>
</div>
<div class="modal-body">
<div class="alert alert-info">
<p>{l s='Please note that the date chosen for field \'Date To\' is not considered as a blocking date.'}</p>
</div>
<div class="from-group table-responsive-row clearfix">
<table class="table room-disable-dates">
<thead>
@@ -135,14 +200,17 @@
<th class="col-sm-2 center">
<span>{l s='Reason'}</span>
</th>
<th class="col-sm-1 center"></th>
</tr>
</thead>
<tbody>
</tbody>
<tbody></tbody>
</table>
<div class="form-group">
<div class="col-sm-12">
<a href="#" class="add_more_room_disable_dates btn btn-default"><i class="icon icon-plus"></i>{l s="Add More"}</a>
<a href="#" class="add_more_room_disable_dates btn btn-default">
<i class="icon icon-plus"></i>
<span>{l s="Add More"}</span>
</a>
</div>
</div>
</div>
@@ -168,223 +236,257 @@
<script>
var prod_link = "{$link->getAdminLink('AdminProducts')}";
var rm_status = {$rm_status|@json_encode};
var currentRoomRow = 0;
var datesMissing = "{$datesMissing}";
var datesOverlapping = "{$datesOverlapping}";
var prod_link = "{$link->getAdminLink('AdminProducts')}";
var rm_status = {$rm_status|@json_encode};
var currentRoomRow = 0;
var datesMissing = "{$datesMissing}";
var datesOverlapping = "{$datesOverlapping}";
$(document).ready(function() {
// Disable dates data filling when model open
$('#deactiveDatesModal').on('show.bs.modal', function (e) {
$('.disabledDatesTr').remove();
$(document).ready(function() {
const DisableDatesModal = {
init: function() {
this.addNewRow();
},
addNewRow: function() {
$('#deactiveDatesModal tbody').append(this.disableDatesRowHtml);
},
populateWithDatesInfo: function(datesInfo) {
const $this = this;
$(datesInfo).each(function(i, dateRange) {
$('#deactiveDatesModal tbody').append($this.disableDatesRowHtml);
const dateRangeRow = $('#deactiveDatesModal tbody tr').last();
$(dateRangeRow).find('.disabled_date_from').val(dateRange.date_from);
$(dateRangeRow).find('.disabled_date_to').val(dateRange.date_to);
$(dateRangeRow).find('.room_disable_reason').val(dateRange.reason);
});
},
getValidationErrors: function() {
let $return = false;
const disableDates = Array();
$('#deactiveDatesModal .room-disable-dates tbody tr').each(function(i, tr) {
const dateFrom = $(tr).find('.disabled_date_from').val().trim();
const dateTo = $(tr).find('.disabled_date_to').val().trim();
var modelTriggerElement = $(e.relatedTarget);
var html = '';
var rowKey = modelTriggerElement.closest(".room_data_values").attr('data-rowKey');
currentRoomRow = rowKey;
var disableDatesJSON = modelTriggerElement.siblings('input.disableDatesJSON').val();
if (disableDatesJSON) {
var disableDatesObj = JSON.parse(disableDatesJSON);
$.each(disableDatesObj, function(disKey, disabledRange) {
html += '<tr class="disabledDatesTr">';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_from form-control" type="text" value="'+disabledRange.date_from+'" name="disabled_date_from'+rowKey+'[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_to form-control" type="text" value="'+disabledRange.date_to+'" name="disabled_date_to'+rowKey+'[]">';
html += '<td class="center col-sm-6">';
html += '<input type="text" class="form-control room_disable_reason" value="'+disabledRange.reason+'" name="room_disable_reason'+rowKey+'[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-disable-dates-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
});
} else {
html += '<tr class="disabledDatesTr">';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_from form-control" type="text" value="" name="disabled_date_from'+rowKey+'[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_to form-control" type="text" value="" name="disabled_date_to'+rowKey+'[]">';
html += '<td class="center col-sm-6">';
html += '<input type="text" class="form-control room_disable_reason" value="" name="room_disable_reason'+rowKey+'[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-disable-dates-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
}
$('.room-disable-dates').append(html);
});
// Disable dates data save when model open
$(document).on('click', '.deactiveDatesModalSubmit', function() {
var disableDates = new Array();
var error = false;
$.each($('.disabled_date_from'), function(key, val){
var date_from = $(this).val();
var date_to = $('.disabled_date_to:eq('+key+')').val();
if (date_from.trim() && date_to.trim()) {
var obj = {
'date_from': $(this).val(),
'date_to': $('.disabled_date_to:eq('+key+')').val(),
'reason': $('.room_disable_reason:eq('+key+')').val(),
};
disableDates.push(obj);
} else {
if (!(!date_from.trim() && !date_to.trim())) {
error = datesMissing;
}
}
$.each(disableDates, function(disKey, disabledRange) {
if (key != disKey) {
if (((date_from < disabledRange.date_from) && (date_to <= disabledRange.date_from)) || ((date_from > disabledRange.date_from) && (date_from >= disabledRange.date_to))) {
} else {
error = datesOverlapping;
}
if (!dateFrom.length || !dateTo.length) {
$return = datesMissing;
}
});
});
if (error) {
alert(error);
return false;
} else {
$('#deactiveDatesModal').modal('hide');
$("#row_index"+currentRoomRow).find('.disableDatesJSON').val(JSON.stringify(disableDates));
return true;
}
});
disableDates.push({ dateFrom, dateTo });
});
// Add new room detail
$('#add-more-rooms-button').on('click',function() {
var lengthRooms = $('.room_data_values').length;
html = '<tr class="room_data_values" id="row_index'+lengthRooms+'" data-rowKey="'+lengthRooms+'">';
html += '<td class="col-sm-1 center">';
html += '<input class="form-control" type="text" name="room_num[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="form-control" type="text" name="room_floor[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<select class="form-control room_status" name="room_status[]">';
$.each(rm_status, function(key, value)
{
html += '<option value="'+value.id+'">'+value.status+'</option>';
});
html += '</select>';
html += '</td>';
html += '<td class="center col-sm-6">';
html += '<a class="btn btn-default deactiveDatesModal" data-toggle="modal" data-target="#deactiveDatesModal" style="display: none;">';
html += "{l s='Add Dates'}";
html += '</a>';
html += '<input type="hidden" class="form-control disableDatesJSON" name="disableDatesJSON[]" value="0">';
html += '<input type="text" class="form-control room_comment" name="room_comment[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-rooms-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
$.each(disableDates, function(keyOuter, dateRangeOuter) {
$.each(disableDates, function(keyInner, dateRangeInner) {
if (keyInner != keyOuter) {
if ((dateRangeOuter.dateFrom <= dateRangeInner.dateTo)
&& (dateRangeInner.dateFrom <= dateRangeOuter.dateTo)
) {
$return = datesOverlapping;
}
}
});
});
$('.hotel-room').append(html);
});
return $return;
},
getDisableDatesInfo: function() {
const disableDates = Array();
$('#deactiveDatesModal .room-disable-dates tbody tr').each(function(i, tr) {
disableDates.push({
date_from: $(tr).find('.disabled_date_from').val().trim(),
date_to: $(tr).find('.disabled_date_to').val().trim(),
reason: $(tr).find('.room_disable_reason').val().trim(),
});
});
// delete room
$('.rm_htl_room').on('click',function(e) {
e.preventDefault();
var $current = $(this);
var id_htl_info = $(this).attr('data-id-htl-info');
$.ajax({
url: prod_link,
type: 'POST',
dataType: 'text',
data: {
ajax:true,
action:'deleteHotelRoom',
id: id_htl_info,
},
success: function (result) {
if (parseInt(result) == 1) {
showSuccessMessage("{l s='Removed successfully'}");
$current.closest(".room_data_values").remove();
} else {
showErrorMessage("{l s='Some error occurred'}");
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
showErrorMessage("{l s='Some error occurred'}");
}
});
});
return disableDates;
},
disableDatesRowHtml: `
<tr class="disabledDatesTr">
<td class="col-sm-2 center">
<input type="text" class="form-control disabled_date_from" value="" readonly>
</td>
<td class="col-sm-2 center">
<input type="text" class="form-control disabled_date_to" value="" readonly>
</td>
<td class="center col-sm-6">
<input type="text" class="form-control room_disable_reason" value="">
</td>
<td class="center col-sm-1">
<a href="#" class="remove-disable-dates-button btn btn-default"><i class="icon-trash"></i></a>
</td>
</tr>
`,
}
$(".checkConfigurationClick").on("click", function() {
$("#checkConfSubmit").val(1);
return true;
});
// Disable dates data filling when model open
$('#deactiveDatesModal').on('show.bs.modal', function(e) {
const triggerRoomRow = $(e.relatedTarget);
const roomRowIndex = parseInt($(triggerRoomRow).closest('tr').attr('data-row-index'));
$('#deactiveDatesModal table.room-disable-dates tbody').html('');
$('#deactiveDatesModal table.room-disable-dates').attr('data-room-row-index', roomRowIndex);
let disableDates = $(triggerRoomRow).closest('tr').find('.disable_dates_json').val();
if (!disableDates) {
DisableDatesModal.init();
return;
}
// New Room Row Remove
$(document).on('click','.remove-rooms-button',function(e) {
e.preventDefault();
$(this).closest(".room_data_values").remove();
});
disableDates = JSON.parse(disableDates);
DisableDatesModal.populateWithDatesInfo(disableDates);
});
// on changing the room status as disabled for some date range.....
$(document).on("change", ".room_status", function(){
var status_val = $(this).val();
if (status_val == rm_status.STATUS_TEMPORARY_INACTIVE.id) {
$(this).closest('.room_data_values').find('.room_comment, .deactiveDatesModal').toggle();
} else {
$(this).closest('.room_data_values').find('.room_comment').show();
$(this).closest('.room_data_values').find('.deactiveDatesModal').hide();
}
});
// copy json formatted dates to room
$(document).on('click', '.deactiveDatesModalSubmit', function() {
const error = DisableDatesModal.getValidationErrors();
if (error) {
alert(error);
return;
}
$(document).on("focus", ".disabled_date_from, .disabled_date_to", function () {
$(".disabled_date_from").datepicker({
showOtherMonths: true,
dateFormat: 'yy-mm-dd',
minDate: 0,
//for calender Css
onSelect: function(selectedDate) {
$(this).closest('tr').find(".disabled_date_to").datepicker("option", "minDate", selectedDate).val('');
},
});
$(".disabled_date_to").datepicker({
showOtherMonths: true,
dateFormat: 'yy-mm-dd',
minDate: 0,
});
});
const disableDates = DisableDatesModal.getDisableDatesInfo();
const roomRowIndex = parseInt($('#deactiveDatesModal table.room-disable-dates').attr('data-room-row-index'));
const roomRow = $('#product-configuration .hotel-room tr.room_data_values[data-row-index='+roomRowIndex+']');
$(roomRow).find('.disable_dates_json').val(JSON.stringify(disableDates));
$('#deactiveDatesModal').modal('hide');
});
$('.add_more_room_disable_dates').on('click',function() {
var rowKey = $(this).closest(".room_data_values").attr('data-rowKey');
html = '<tr class="disabledDatesTr">';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_from form-control" type="text" value="" name="disabled_date_from'+rowKey+'[]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="disabled_date_to form-control" type="text" value="" name="disabled_date_to'+rowKey+'[]">';
html += '<td class="center col-sm-6">';
html += '<input type="text" class="form-control room_disable_reason" value="" name="room_disable_reason'+rowKey+'[]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-disable-dates-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
// Add new room detail
$('#add-more-rooms-button').on('click',function() {
var lengthRooms = parseInt($('.room_data_values').length);
$('.room-disable-dates').append(html);
});
var prefix = 'rooms_info['+lengthRooms+']';
html = '<tr class="room_data_values" data-row-index="'+lengthRooms+'">';
html += '<td class="col-sm-1 center">';
html += '<input class="form-control" type="text" name="'+prefix+'[room_num]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<input class="form-control" type="text" name="'+prefix+'[floor]">';
html += '</td>';
html += '<td class="col-sm-2 center">';
html += '<select class="form-control room_status" name="'+prefix+'[id_status]">';
$.each(rm_status, function(key, value) {
html += '<option value="'+value.id+'">'+value.status+'</option>';
});
html += '</select>';
html += '</td>';
html += '<td class="col-sm-3 center">';
html += '<input class="form-control" type="text" name="'+prefix+'[floor]">';
html += '</td>';
html += '<td class="center col-sm-2">';
html += '<a class="btn btn-default deactiveDatesModal disabled" data-toggle="modal" data-target="#deactiveDatesModal">';
html += "{l s='Add Dates'}";
html += '</a>';
html += '<input type="hidden" class="form-control disable_dates_json" name="'+prefix+'[disable_dates_json]">';
html += '</td>';
html += '<td class="center col-sm-1">';
html += '<a href="#" class="remove-rooms-button btn btn-default"><i class="icon-trash"></i></a>';
html += '</td>';
html += '</tr>';
$(document).on('click','.remove-disable-dates-button',function(e) {
e.preventDefault();
$(this).closest('tr').remove();
});
});
$('table.hotel-room tbody').append(html);
});
</script>
// delete room
$('.rm_htl_room').on('click',function(e) {
e.preventDefault();
var $current = $(this);
var id_htl_info = $(this).attr('data-id-htl-info');
$.ajax({
url: prod_link,
type: 'POST',
dataType: 'text',
data: {
ajax:true,
action:'deleteHotelRoom',
id: id_htl_info,
},
success: function (result) {
if (parseInt(result) == 1) {
showSuccessMessage("{l s='Removed successfully'}");
$current.closest(".room_data_values").remove();
} else {
showErrorMessage("{l s='Some error occurred'}");
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
showErrorMessage("{l s='Some error occurred'}");
}
});
});
$(".checkConfigurationClick").on("click", function() {
$("#checkConfSubmit").val(1);
return true;
});
// remove room row
$(document).on('click','.remove-rooms-button',function(e) {
e.preventDefault();
$(this).closest('.room_data_values').remove();
$('#product-configuration table.hotel-room tr.room_data_values').each(function(iOuter, tr) {
$(tr).attr('data-row-index', iOuter);
$(tr).find('input, select').each(function (iInner, inputField) {
let fieldName = $(inputField).attr('name');
fieldName = fieldName.replace(/[0-9]+/, iOuter)
$(inputField).attr('name', fieldName);
});
});
});
// on changing the room status as disabled for some date range
$(document).on('change', '.room_status', function(){
var status_val = $(this).val();
if (status_val == rm_status.STATUS_TEMPORARY_INACTIVE.id) {
$(this).closest('.room_data_values').find('.deactiveDatesModal').removeClass('disabled');
} else {
$(this).closest('.room_data_values').find('.deactiveDatesModal').addClass('disabled');
}
});
$(document).on('focus', '.disabled_date_from, .disabled_date_to', function () {
$('.disabled_date_from').datepicker({
showOtherMonths: true,
dateFormat: 'yy-mm-dd',
minDate: 0,
onSelect: function(selectedDate) {
var date_format = selectedDate.split('-');
selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[0], date_format[1] - 1, date_format[2])));
selectedDate.setDate(selectedDate.getDate() + 1);
$(this).closest('tr').find('.disabled_date_to').datepicker('option', 'minDate', selectedDate);
},
onClose: function(selectedDate) {
var dateTo = $(this).closest('tr').find('.disabled_date_to').val();
if (!dateTo || (dateTo && selectedDate >= dateTo)) {
$('.disabled_date_to').datepicker('show');
}
},
});
$('.disabled_date_to').datepicker({
showOtherMonths: true,
dateFormat: 'yy-mm-dd',
minDate: 0,
beforeShow: function (input, instance) {
var date_to = $(this).closest('tr').find('.disabled_date_from').val();
if (typeof date_to != 'undefined' && date_to != '') {
var date_format = date_to.split('-');
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[0], date_format[1] - 1, date_format[2])));
} else {
var date_format = new Date();
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date()));
}
selectedDate.setDate(selectedDate.getDate()+1);
$(this).datepicker('option', 'minDate', selectedDate);
},
});
});
$('.add_more_room_disable_dates').on('click', function() {
DisableDatesModal.addNewRow();
});
$(document).on('click','.remove-disable-dates-button',function(e) {
e.preventDefault();
$(this).closest('tr').remove();
});
});
</script>

View File

@@ -261,7 +261,7 @@
<div class="form-group redirect_product_options redirect_product_options_product_choise" style="display:none">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="id_product_redirected" type="radio" onclick=""}</span></div>
<label class="control-label col-lg-2" for="related_product_autocomplete_input">
{l s='Related product:'}
{l s='Related room type'}
</label>
<div class="col-lg-7">
<input type="hidden" value="" name="id_product_redirected" />
@@ -272,7 +272,7 @@
</div>
<div class="form-control-static">
<span id="related_product_name"><i class="icon-warning-sign"></i>&nbsp;{l s='No related product.'}</span>
<span id="related_product_name"><i class="icon-warning-sign"></i>&nbsp;{l s='No related room type.'}</span>
<span id="related_product_remove" style="display:none">
<a class="btn btn-default" href="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
<i class="icon-remove text-danger"></i>
@@ -282,7 +282,7 @@
</div>
<script>
var no_related_product = '{l s='No related product'}';
var no_related_product = '{l s='No related room type.'}';
var id_product_redirected = {$product->id_product_redirected|intval};
var product_name_redirected = '{$product_name_redirected|escape:'html':'UTF-8'}';
</script>

View File

@@ -129,7 +129,7 @@ $(document).ready(function () {
<div class="form-group">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<label class="control-label col-lg-2" for="priceTE">
<span class="label-tooltip" data-toggle="tooltip" title="{l s='The pre-tax retail price is the price for which you intend sell this room type to your customers. It should be higher than the pre-tax wholesale price: the difference between the two will be your margin.'}">{if !$country_display_tax_label || $tax_exclude_taxe_option}{l s='Retail price'}{else}{l s='Pre-tax retail price'}{/if}</span>
<span class="label-tooltip" data-toggle="tooltip" title="{l s='The pre-tax retail price is the price for which you intend sell this room type to your customers. It should be higher than the pre-tax operating cost: the difference between the two will be your margin.'}">{if !$country_display_tax_label || $tax_exclude_taxe_option}{l s='Retail price'}{else}{l s='Pre-tax retail price'}{/if}</span>
</label>
<div class="col-lg-2">
<div class="input-group">

View File

@@ -90,7 +90,7 @@
<div class="col-lg-3">
<div class="panel">
<div class="alert alert-info">
{l s="The module '%s' must be activated and configurated in order to have all the statistics" sprintf=$statsdata_name}
{l s="The module '%s' must be activated and configured in order to have all the statistics." sprintf=$statsdata_name}
</div>
</div>
</div>

View File

@@ -135,167 +135,171 @@
<a id="header_shopname" href="{$default_tab_link|escape:'html':'UTF-8'}">{$shop_name}</a>
{/if}
<ul id="header_notifs_icon_wrapper">
{if {$show_new_orders} == 1}
<li id="orders_notif" class="dropdown" data-type="order">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-shopping-cart"></i>
<span id="orders_notif_number_wrapper" class="notifs_badge hide">
<span id="orders_notif_value">0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="orders_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3>{l s='Latest Orders'}</h3>
</div>
<div id="list_orders_notif" class="list_notif">
<span class="no_notifs">
{l s='No new orders have been placed on your shop.'}
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminOrders&amp;token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a>
</div>
</section>
</div>
</li>
{/if}
{if {$show_new_customers} == 1}
<li id="customers_notif" class="dropdown" data-type="customer">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-user"></i>
<span id="customers_notif_number_wrapper" class="notifs_badge hide">
<span id="customers_notif_value">0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="customers_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3>{l s='Latest Registrations'}</h3>
</div>
<div id="list_customers_notif" class="list_notif">
<span class="no_notifs">
{l s='No new customers have registered on your shop.'}
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminCustomers&amp;token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a>
</div>
</section>
</div>
</li>
{/if}
{if {$show_new_messages} == 1}
<li id="customer_messages_notif" class="dropdown" data-type="customer_message">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-envelope"></i>
<span id="customer_messages_notif_number_wrapper" class="notifs_badge hide">
<span id="customer_messages_notif_value" >0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="customer_messages_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3>{l s='Latest Messages'}</h3>
</div>
<div id="list_customer_messages_notif" class="list_notif">
<span class="no_notifs">
{l s='No new messages have been posted on your shop.'}
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminCustomerThreads&amp;token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a>
</div>
</section>
</div>
</li>
{/if}
{if {$show_new_orders} == 1}
<li id="orders_notif" class="dropdown" data-type="order">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-shopping-cart"></i>
<span id="orders_notif_number_wrapper" class="notifs_badge hide">
<span id="orders_notif_value">0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="orders_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3>{l s='Latest Orders'}</h3>
</div>
<div id="list_orders_notif" class="list_notif">
<span class="no_notifs">
{l s='No new orders have been placed on your shop.'}
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminOrders&amp;token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a>
</div>
</section>
</div>
</li>
{/if}
{if {$show_new_customers} == 1}
<li id="customers_notif" class="dropdown" data-type="customer">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-user"></i>
<span id="customers_notif_number_wrapper" class="notifs_badge hide">
<span id="customers_notif_value">0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="customers_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3>{l s='Latest Registrations'}</h3>
</div>
<div id="list_customers_notif" class="list_notif">
<span class="no_notifs">
{l s='No new customers have registered on your shop.'}
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminCustomers&amp;token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a>
</div>
</section>
</div>
</li>
{/if}
{if {$show_new_messages} == 1}
<li id="customer_messages_notif" class="dropdown" data-type="customer_message">
<a href="javascript:void(0);" class="dropdown-toggle notifs" data-toggle="dropdown">
<i class="icon-envelope"></i>
<span id="customer_messages_notif_number_wrapper" class="notifs_badge hide">
<span id="customer_messages_notif_value" >0</span>
</span>
</a>
<div class="dropdown-menu notifs_dropdown">
<section id="customer_messages_notif_wrapper" class="notifs_panel">
<div class="notifs_panel_header">
<h3>{l s='Latest Messages'}</h3>
</div>
<div id="list_customer_messages_notif" class="list_notif">
<span class="no_notifs">
{l s='No new messages have been posted on your shop.'}
</span>
</div>
<div class="notifs_panel_footer">
<a href="index.php?controller=AdminCustomerThreads&amp;token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a>
</div>
</section>
</div>
</li>
{/if}
</ul>
{if count($quick_access) >= 0}
<ul id="header_quick">
<li class="dropdown">
<a href="javascript:void(0)" id="quick_select" class="dropdown-toggle" data-toggle="dropdown">{l s='Quick Access'} <i class="icon-caret-down"></i></a>
<ul class="dropdown-menu">
{foreach $quick_access as $quick}
<li {if $link->matchQuickLink({$quick.link})}{assign "matchQuickLink" $quick.id_quick_access}class="active"{/if}>
<a href="{$quick.link|escape:'html':'UTF-8'}"{if $quick.new_window} class="_blank"{/if}>
{if isset($quick.icon)}
<i class="icon-{$quick.icon} icon-fw"></i>
{else}
<i class="icon-chevron-right icon-fw"></i>
{/if}
{$quick.name}
{if count($quick_access) >= 0}
<ul id="header_quick">
<li class="dropdown">
<a href="javascript:void(0)" id="quick_select" class="dropdown-toggle" data-toggle="dropdown">{l s='Quick Access'} <i class="icon-caret-down"></i></a>
<ul class="dropdown-menu">
{foreach $quick_access as $quick}
<li {if $link->matchQuickLink({$quick.link})}{assign "matchQuickLink" $quick.id_quick_access}class="active"{/if}>
<a href="{$quick.link|escape:'html':'UTF-8'}"{if $quick.new_window} class="_blank"{/if}>
{if isset($quick.icon)}
<i class="icon-{$quick.icon} icon-fw"></i>
{else}
<i class="icon-chevron-right icon-fw"></i>
{/if}
{$quick.name}
</a>
</li>
{/foreach}
<li class="divider"></li>
{if isset($matchQuickLink)}
<li>
<a href="javascript:void(0);" class="ajax-quick-link" data-method="remove" data-quicklink-id="{$matchQuickLink}">
<i class="icon-minus-circle"></i>
{l s='Remove from QuickAccess'}
</a>
</li>
{/if}
<li {if isset($matchQuickLink)}class="hide"{/if}>
<a href="javascript:void(0);" class="ajax-quick-link" data-method="add">
<i class="icon-plus-circle"></i>
{l s='Add current page to QuickAccess'}
</a>
</li>
{/foreach}
<li class="divider"></li>
{if isset($matchQuickLink)}
<li>
<a href="javascript:void(0);" class="ajax-quick-link" data-method="remove" data-quicklink-id="{$matchQuickLink}">
<i class="icon-minus-circle"></i>
{l s='Remove from QuickAccess'}
</a>
</li>
{/if}
<li {if isset($matchQuickLink)}class="hide"{/if}>
<a href="javascript:void(0);" class="ajax-quick-link" data-method="add">
<i class="icon-plus-circle"></i>
{l s='Add current page to QuickAccess'}
</a>
</li>
</ul>
</li>
</ul>
{$quick_access_current_link_name = " - "|explode:$quick_access_current_link_name}
<script>
$(function() {
$('.ajax-quick-link').on('click', function(e){
e.preventDefault();
</ul>
</li>
</ul>
{$quick_access_current_link_name = " - "|explode:$quick_access_current_link_name}
<script>
$(function() {
$('.ajax-quick-link').on('click', function(e){
e.preventDefault();
var method = $(this).data('method');
var method = $(this).data('method');
if(method == 'add')
var name = prompt('{l s='Please name this shortcut:' js=1}', '{$quick_access_current_link_name.0|truncate:32}');
if(method == 'add')
var name = prompt('{l s='Please name this shortcut:' js=1}', '{$quick_access_current_link_name.0|truncate:32}');
if(method == 'add' && name || method == 'remove')
{
$.ajax({
type: 'POST',
headers: { "cache-control": "no-cache" },
async: false,
url: "{$link->getAdminLink('AdminQuickAccesses')}" + "&action=GetUrl" + "&rand={1|rand:200}" + "&ajax=1" + "&method=" + method + ( $(this).data('quicklink-id') ? "&id_quick_access=" + $(this).data('quicklink-id') : ""),
data: {
"url": "{$link->getQuickLink($smarty.server['REQUEST_URI'])}",
"name": name,
"icon": "{$quick_access_current_link_icon}"
},
dataType: "json",
success: function(data) {
var quicklink_list ='';
$.each(data, function(index,value){
if (typeof data[index]['name'] !== 'undefined')
quicklink_list += '<li><a href="' + data[index]['link'] + '&token=' + data[index]['token'] + '"><i class="icon-chevron-right"></i> ' + data[index]['name'] + '</a></li>';
});
if (typeof data['has_errors'] !== 'undefined' && data['has_errors'])
$.each(data, function(index, value)
{
if (typeof data[index] == 'string')
$.growl.error({ title: "", message: data[index]});
if(method == 'add' && name || method == 'remove')
{
$.ajax({
type: 'POST',
headers: { "cache-control": "no-cache" },
async: false,
url: "{$link->getAdminLink('AdminQuickAccesses')}" + "&action=GetUrl" + "&rand={1|rand:200}" + "&ajax=1" + "&method=" + method + ( $(this).data('quicklink-id') ? "&id_quick_access=" + $(this).data('quicklink-id') : ""),
data: {
"url": "{$link->getQuickLink($smarty.server['REQUEST_URI'])}",
"name": name,
"icon": "{$quick_access_current_link_icon}"
},
dataType: "json",
success: function(data) {
var quicklink_list ='';
$.each(data, function(index,value){
if (typeof data[index]['name'] !== 'undefined')
quicklink_list += '<li><a href="' + data[index]['link'] + '&token=' + data[index]['token'] + '"><i class="icon-chevron-right"></i> ' + data[index]['name'] + '</a></li>';
});
else if (quicklink_list)
{
$("#header_quick ul.dropdown-menu").html(quicklink_list);
showSuccessMessage(update_success_msg);
if (typeof data['has_errors'] !== 'undefined' && data['has_errors'])
$.each(data, function(index, value)
{
if (typeof data[index] == 'string')
$.growl.error({ title: "", message: data[index]});
});
else if (quicklink_list)
{
$("#header_quick ul.dropdown-menu").html(quicklink_list);
showSuccessMessage(update_success_msg);
}
}
}
});
}
});
}
});
});
});
</script>
{/if}
</script>
{/if}
<ul id="header_employee_box">
{if $upgrade_info->update_available > 0}
<li class="hidden-md hidden-sm hidden-xs"><a href="{$upgrade_info->upgrade_url}">{l s='QloApps Update Availabe:'} {$upgrade_info->latest_availabe}</a></li>
{/if}
<li class="hidden-sm hidden-xs">
<a target="_blank" href="https://qloapps.com/addons/" class="toolbar_btn" title="{l s='Explore QloApps Addons'}">
<i class="icon-chain-broken"></i>
@@ -303,20 +307,20 @@
</a>
</li>
{if {$base_url}}
<li>
<a href="{if isset($base_url_tc)}{$base_url_tc|escape:'html':'UTF-8'}{else}{$base_url|escape:'html':'UTF-8'}{/if}" id="header_foaccess" class="_blank" title="{l s='View my shop'}">
<span class="string-long">{l s='My site'}</span>
<span class="string-short">{l s='Site'}</span>
</a>
{if isset($maintenance_mode) && $maintenance_mode == true}
<span class="maintenance-mode">
&mdash;
<span class="label-tooltip" data-toggle="tooltip" data-placement="bottom" data-html="true"
title="<p class='text-left text-nowrap'><strong>{l s='Your site is in maintenance.'}</strong></p><p class='text-left'>{l s='Your visitors and customers cannot access your shop while in maintenance mode.%s To manage the maintenance settings, go to Preferences > Maintenance.' sprintf='<br />'}</p>">{l s='Maintenance mode'}</span>
</span>
{/if}
</li>
{/if}
<li>
<a href="{if isset($base_url_tc)}{$base_url_tc|escape:'html':'UTF-8'}{else}{$base_url|escape:'html':'UTF-8'}{/if}" id="header_foaccess" class="_blank" title="{l s='View my shop'}">
<span class="string-long">{l s='My site'}</span>
<span class="string-short">{l s='Site'}</span>
</a>
{if isset($maintenance_mode) && $maintenance_mode == true}
<span class="maintenance-mode">
&mdash;
<span class="label-tooltip" data-toggle="tooltip" data-placement="bottom" data-html="true"
title="<p class='text-left text-nowrap'><strong>{l s='Your site is in maintenance.'}</strong></p><p class='text-left'>{l s='Your visitors and customers cannot access your shop while in maintenance mode.%s To manage the maintenance settings, go to Preferences > Maintenance.' sprintf='<br />'}</p>">{l s='Maintenance mode'}</span>
</span>
{/if}
</li>
{/if}
<li id="employee_infos" class="dropdown">
<a href="{$link->getAdminLink('AdminEmployees')|escape:'html':'UTF-8'}&amp;id_employee={$employee->id|intval}&amp;updateemployee" class="dropdown-toggle" data-toggle="dropdown">
<span class="string-long">{$employee->firstname}&nbsp;{$employee->lastname}</span>
@@ -333,11 +337,12 @@
</li>
</ul>
<span id="ajax_running">
<i class="icon-refresh icon-spin icon-fw"></i>
</span>
{if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if}
{if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if}
</div>
</nav>{* end header_infos*}
</header>
@@ -349,13 +354,13 @@
{if isset($page_header_toolbar)}{$page_header_toolbar}{/if}
{if isset($modal_module_list)}{$modal_module_list}{/if}
{if $install_dir_exists}
{if $install_dir_exists}
<div class="alert alert-warning">
{l s='For security reasons, you must also delete the /install folder.'}
</div>
{/if}
{/if}
{hook h='displayAdminAfterHeader'}
{hook h='displayAdminAfterHeader'}
{* end display_header*}

View File

@@ -37,7 +37,7 @@
{counter}
{/foreach}
</table>
{if $controller_name == 'AdminPayment' && isset($view_all)}
{* {if $controller_name == 'AdminPayment' && isset($view_all)}
<div class="panel-footer">
<div class="col-lg-4 col-lg-offset-4">
<a class="btn btn-default btn-block" href="index.php?tab=AdminModules&amp;token={getAdminToken tab='AdminModules'}&amp;filterCategory=payments_gateways">
@@ -46,7 +46,7 @@
</a>
</div>
</div>
{/if}
{/if} *}
{else}
<table class="table">
<tr>

View File

@@ -105,7 +105,6 @@
</li>
{/if} *}
</ul>
{if (isset($tab_modules_open) && $tab_modules_open) || isset($tab_modules_list)}
<script type="text/javascript">
//<![CDATA[
var modules_list_loaded = false;
@@ -116,15 +115,12 @@
});
{/if}
{if isset($tab_modules_list)}
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
$('#modules_list_container').modal('show');
openModulesList();
});
{/if}
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
$('#modules_list_container').modal('show');
openModulesList();
});
//]]>
</script>
{/if}
</div>
</div>
{/block}

View File

@@ -0,0 +1,42 @@
{*
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2022 Webkul IN
* @license https://store.webkul.com/license.html
*}
<div id="recommendation-wrapper-skeleton">
<script>
loadRecommendation();
</script>
<div class="col-sm-12">
<div class="banner panel">
<div class="row">
<div class="col-sm-12">
<div class="skeleton-loading-pulse loading-container-bar"></div>
<div class="loading-container-bar"></div>
<div class="skeleton-loading-pulse loading-container-bar"></div>
<div class="loading-container-bar"></div>
<div class="skeleton-loading-pulse loading-container-bar"></div>
<div class="loading-container-bar"></div>
<div class="skeleton-loading-pulse loading-container-bar"></div>
</div>
</div>
</div>
</div>
</div>
<div id="recommendation-wrapper" style="display:none">
</div>

View File

@@ -0,0 +1,96 @@
<?php
/**
* 2010-2022 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2022 Webkul IN
* @license https://store.webkul.com/license.html
*/
class MaintenanceAccessCore extends ObjectModel
{
public $id_maintenance_access;
public $ip_address;
public $email;
public $date_add;
const USERNAME_ATTEMPTS_PER_QUARTER_HOUR = 3;
const IP_ATTEMPTS_QUARTER_HOUR = 12;
const USERNAME_ATTEMPTS_PER_HOUR = 6;
const IP_ATTEMPTS_PER_HOUR = 24;
const QUARTER_HOUR = 60*15;
const HOUR = 60*60;
/**
* @see ObjectModel::$definition
*/
public static $definition = array(
'table' => 'maintenance_access',
'primary' => 'id_maintenance_access',
'fields' => array(
'ip_address' => array('type' => self::TYPE_STRING, 'size' => 50),
'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true, 'size' => 128),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
),
);
public function cleanData()
{
$time = (time() - (self::HOUR*2));
Db::getInstance()->execute(
'DELETE FROM `' . _DB_PREFIX_ .'maintenance_access`
WHERE `date_add` < "' . pSQL(date("Y-m-d H:i:s", $time)) . '"'
);
}
public function getUserFailedCount($time, $email=false, $ip_address=false, $attempts)
{
$sql = "SELECT COUNT(`id_maintenance_access`) FROM `". _DB_PREFIX_ ."maintenance_access` WHERE `date_add` > '"
. pSQL(date('Y-m-d H:i:s', $time)) ."'";
if ($email) {
$sql .= " AND `email` = '".pSQL($email)."'";
}
if ($ip_address) {
$sql .= " AND `ip_address` = '".pSQL($ip_address)."'";
}
return Db::getInstance()->getValue($sql) >= $attempts;
}
public function checkLimit($email)
{
$has_error = false;
$minutes_ago = time() - self::QUARTER_HOUR;
$hours_ago = time() - self::HOUR;
$ip_address = Tools::getRemoteAddr();
$has_error |= $this->getUserFailedCount(
$minutes_ago, $email, false, self::USERNAME_ATTEMPTS_PER_QUARTER_HOUR
)? true : $has_error;
$has_error |= $this->getUserFailedCount(
$minutes_ago, false, $ip_address, self::IP_ATTEMPTS_QUARTER_HOUR
)? true : $has_error;
$has_error |= $this->getUserFailedCount(
$hours_ago, $email, false, self::USERNAME_ATTEMPTS_PER_HOUR
)? true : $has_error;
$has_error |= $this->getUserFailedCount(
$hours_ago, false, $ip_address, self::IP_ATTEMPTS_PER_HOUR
)? true : $has_error;
return $has_error;
}
}

View File

@@ -85,7 +85,7 @@ class PrestaShopLoggerCore extends ObjectModel
Mail::Send(
(int)Configuration::get('PS_LANG_DEFAULT'),
'log_alert',
Mail::l('Log: You have a new alert from your shop', (int)Configuration::get('PS_LANG_DEFAULT')),
Mail::l('Log: You have a new alert from your website', (int)Configuration::get('PS_LANG_DEFAULT')),
array(),
Configuration::get('PS_SHOP_EMAIL')
);

View File

@@ -46,8 +46,6 @@ class TabCore extends ObjectModel
/** @var int hide_host_mode */
public $hide_host_mode = false;
const TAB_MODULE_LIST_URL = _QLO_TAB_MODULE_LIST_URL_;
/**
* @see ObjectModel::$definition
*/
@@ -597,4 +595,9 @@ class TabCore extends ObjectModel
return $modules_list;
}
public static function isTabModuleListAvailable()
{
return file_exists(_PS_ROOT_DIR_.Module::CACHE_FILE_TAB_MODULES_LIST);
}
}

View File

@@ -3323,7 +3323,8 @@ exit;
'version' => isset($params['version']) ? $params['version'] : _QLOAPPS_VERSION_,
'iso_lang' => Tools::strtolower(isset($params['iso_lang']) ? $params['iso_lang'] : Context::getContext()->language->iso_code),
'iso_code' => Tools::strtolower(isset($params['iso_country']) ? $params['iso_country'] : Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))),
'shop_url' => isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomain(),
'shop_url_ssl' => isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomainSsl(),
'physical_uri' => Context::getContext()->shop->physical_uri,
'mail' => isset($params['email']) ? $params['email'] : Configuration::get('PS_SHOP_EMAIL')
));
@@ -3347,6 +3348,10 @@ exit;
$protocols[] = 'http';
$post_data .= '&method=listing&action=must-have-themes';
break;
case 'addons-modules':
$protocols[] = 'http';
$post_data .= '&method=listing&action=addons-modules';
break;
case 'customer':
$post_data .= '&method=listing&action=customer&username='.urlencode(trim(Context::getContext()->cookie->username_addons))
.'&password='.urlencode(trim(Context::getContext()->cookie->password_addons));
@@ -3359,10 +3364,10 @@ exit;
$post_data .= '&method=check_customer&username='.urlencode($params['username_addons']).'&password='.urlencode($params['password_addons']);
break;
case 'check_module':
$post_data .= '&method=check&module_name='.urlencode($params['module_name']).'&module_key='.urlencode($params['module_key']);
break;
$post_data .= '&method=check&module='.urlencode($params['module_name']);
break;
case 'module':
$post_data .= '&method=module&module_name='.urlencode($params['module_name']);
$post_data .= '&method=module&module='.urlencode($params['module_name']);
if (isset($params['username_addons']) && isset($params['password_addons'])) {
$post_data .= '&username='.urlencode($params['username_addons']).'&password='.urlencode($params['password_addons']);
} else {
@@ -3374,13 +3379,24 @@ exit;
.'&password='.urlencode($params['password_addons'])
.'&shop_url='.urlencode(isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomain())
.'&mail='.urlencode(isset($params['email']) ? $params['email'] : Configuration::get('PS_SHOP_EMAIL'));
$protocols[] = 'https';
break;
case 'install-modules':
$protocols[] = 'http';
$post_data .= '&method=listing&action=install-modules';
$post_data .= defined('_PS_HOST_MODE_') ? '-od' : '';
break;
case 'catalog-recommendation':
$protocols[] = 'http';
$post_data .= '&method=content&action=catalogRecommendation';
$post_data .= defined('_PS_HOST_MODE_') ? '-od' : '';
break;
case 'dashboard-recommendation':
$protocols[] = 'http';
$post_data .= '&method=content&action=dashboardRecommendation';
$post_data .= defined('_PS_HOST_MODE_') ? '-od' : '';
break;
case 'check-version':
$post_data .= '&method=check-version&autoupgrade='.(int)(Module::isInstalled('qloautoupgrade') && Module::isEnabled('qloautoupgrade'));
break;
default:
return false;
}

View File

@@ -27,6 +27,10 @@
class UpgraderCore
{
const DEFAULT_CHECK_VERSION_DELAY_HOURS = 24;
// @todo find correct class to declare upgrade_info for header
const CACHE_FILE_UPGRADE_AVAILABE = '/config/xml/upgrade_available.xml';
public $rss_version_link;
public $rss_md5file_link_dir;
/**

View File

@@ -1575,6 +1575,7 @@ class AdminControllerCore extends Controller
$this->page_header_toolbar_title = $this->toolbar_title[count($this->toolbar_title) - 1];
}
$this->initTabModuleList();
$this->addPageHeaderToolBarModulesListButton();
$this->context->smarty->assign('help_link', 'http://help.prestashop.com/'.Language::getIsoById($this->context->employee->id_lang).'/doc/'
@@ -1652,7 +1653,6 @@ class AdminControllerCore extends Controller
);
}
}
$this->addToolBarModulesListButton();
}
/**
@@ -2086,7 +2086,7 @@ class AdminControllerCore extends Controller
$this->getLanguages();
$this->initToolbar();
$this->initTabModuleList();
// $this->initTabModuleList();
$this->initPageHeaderToolbar();
if ($this->display == 'edit' || $this->display == 'add') {
@@ -2128,22 +2128,10 @@ class AdminControllerCore extends Controller
*/
protected function initTabModuleList()
{
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400)) {
@file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));
}
if (!$this->isFresh(Module::CACHE_FILE_TAB_MODULES_LIST, 604800)) {
$this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, _QLO_TAB_MODULE_LIST_URL_);
}
$this->tab_modules_list = Tab::getTabModulesList($this->id);
if (is_array($this->tab_modules_list['default_list']) && count($this->tab_modules_list['default_list'])) {
$this->filter_modules_list = $this->tab_modules_list['default_list'];
} elseif (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list'])) {
$this->addToolBarModulesListButton();
$this->addPageHeaderToolBarModulesListButton();
$this->context->smarty->assign(array(
'tab_modules_list' => implode(',', $this->tab_modules_list['slider_list']),
'admin_module_ajax_url' => $this->context->link->getAdminLink('AdminModules'),
'back_tab_modules_list' => $this->context->link->getAdminLink(Tools::getValue('controller')),
'tab_modules_open' => (int)Tools::getValue('tab_modules_open')
@@ -2151,11 +2139,17 @@ class AdminControllerCore extends Controller
}
}
protected function addPageHeaderToolBarModulesListButton()
{
$this->filterTabModuleList();
$tab_modules_list = Tab::getTabModulesList($this->id);
if (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list'])) {
$tab_modules_list = $this->filterTabModuleList($tab_modules_list);
if ((is_array($tab_modules_list['slider_list']) && count($tab_modules_list['slider_list']))
|| !Tab::isTabModuleListAvailable()
) {
$this->page_header_toolbar_btn['modules-list'] = array(
'href' => '#',
'desc' => $this->l('Recommended Modules and Services')
@@ -2163,19 +2157,8 @@ class AdminControllerCore extends Controller
}
}
protected function addToolBarModulesListButton()
{
$this->filterTabModuleList();
if (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list'])) {
$this->toolbar_btn['modules-list'] = array(
'href' => '#',
'desc' => $this->l('Recommended Modules and Services')
);
}
}
protected function filterTabModuleList()
protected function filterTabModuleList($tab_modules_list)
{
static $list_is_filtered = null;
@@ -2183,59 +2166,83 @@ class AdminControllerCore extends Controller
return;
}
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400)) {
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
}
if (!$this->isFresh(Module::CACHE_FILE_ALL_COUNTRY_MODULES_LIST, 86400)) {
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_ALL_COUNTRY_MODULES_LIST, Tools::addonsRequest('native_all'));
}
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400)) {
@file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));
}
libxml_use_internal_errors(true);
$country_module_list = file_get_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST);
$must_have_module_list = file_get_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST);
$all_module_list = array();
if (!empty($country_module_list) && $country_module_list_xml = @simplexml_load_string($country_module_list)) {
$country_module_list_array = array();
if (is_object($country_module_list_xml->module)) {
foreach ($country_module_list_xml->module as $k => $m) {
$all_module_list[] = (string)$m->name;
libxml_use_internal_errors(true);
if (file_exists(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST)) {
$country_module_list = file_get_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST);
if (!empty($country_module_list) && $country_module_list_xml = @simplexml_load_string($country_module_list)) {
$country_module_list_array = array();
if (is_object($country_module_list_xml->module)) {
foreach ($country_module_list_xml->module as $k => $m) {
$all_module_list[] = (string)$m->name;
}
}
} else {
foreach (libxml_get_errors() as $error) {
$this->errors[] = Tools::displayError(sprintf('Error found : %1$s in country_module_list.xml file.', $error->message));
}
}
} else {
foreach (libxml_get_errors() as $error) {
$this->errors[] = Tools::displayError(sprintf('Error found : %1$s in country_module_list.xml file.', $error->message));
}
}
libxml_clear_errors();
if (!empty($must_have_module_list) && $must_have_module_list_xml = @simplexml_load_string($must_have_module_list)) {
$must_have_module_list_array = array();
if (is_object($country_module_list_xml->module)) {
foreach ($must_have_module_list_xml->module as $l => $mo) {
$all_module_list[] = (string)$mo->name;
if (file_exists(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST)) {
$must_have_module_list = file_get_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST);
if (!empty($must_have_module_list) && $must_have_module_list_xml = @simplexml_load_string($must_have_module_list)) {
$must_have_module_list_array = array();
if (is_object($country_module_list_xml->module)) {
foreach ($must_have_module_list_xml->module as $l => $mo) {
$all_module_list[] = (string)$mo->name;
}
}
} else {
foreach (libxml_get_errors() as $error) {
$this->errors[] = Tools::displayError(sprintf('Error found : %1$s in must_have_module_list.xml file.', $error->message));
}
}
} else {
foreach (libxml_get_errors() as $error) {
$this->errors[] = Tools::displayError(sprintf('Error found : %1$s in must_have_module_list.xml file.', $error->message));
}
}
libxml_clear_errors();
$this->tab_modules_list['slider_list'] = array_intersect($this->tab_modules_list['slider_list'], $all_module_list);
$tab_modules_list['slider_list'] = array_intersect($tab_modules_list['slider_list'], $all_module_list);
$list_is_filtered = true;
return $tab_modules_list;
}
public function ajaxProcessRefreshModuleList($force_reload_cache = false)
{
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, _TIME_1_DAY_) || $force_reload_cache) {
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'))) {
$this->status = 'refresh';
} else {
$this->status = 'error';
}
} else {
$this->status = 'cache';
}
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, _TIME_1_DAY_) || $force_reload_cache) {
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'))) {
$this->status = 'refresh';
} else {
$this->status = 'error';
}
} else {
$this->status = 'cache';
}
if (!$this->isFresh(Module::CACHE_FILE_TAB_MODULES_LIST, _TIME_1_WEEK_)) {
if ($this->refresh(Module::CACHE_FILE_TAB_MODULES_LIST, _QLO_TAB_MODULE_LIST_URL_)) {
$this->status = 'refresh';
} else {
$this->status = 'error';
}
} else {
$this->status = 'cache';
}
}
/**
@@ -2369,7 +2376,9 @@ class AdminControllerCore extends Controller
foreach ($xml_module->children() as $module) {
/** @var SimpleXMLElement $module */
foreach ($module->attributes() as $key => $value) {
if ($xml_module->attributes() == 'native' && $key == 'name') {
if (($xml_module->attributes() == 'native' || $xml_module->attributes() == 'disk')
&& $key == 'name'
) {
$this->list_natives_modules[] = (string)$value;
}
if ($xml_module->attributes() == 'partner' && $key == 'name') {
@@ -2441,6 +2450,8 @@ class AdminControllerCore extends Controller
$helper = new HelperList();
unset($this->toolbar_btn);
$this->initToolbar();
// Empty list is ok
if (!is_array($this->_list)) {
$this->displayWarning($this->l('Bad SQL query', 'Helper').'<br />'.htmlspecialchars($this->_list_error));
@@ -2824,6 +2835,19 @@ class AdminControllerCore extends Controller
'submit_form_ajax' => (int)Tools::getValue('submitFormAjax')
));
// get upgrade available info
if (!$this->isFresh(Upgrader::CACHE_FILE_UPGRADE_AVAILABE, _TIME_1_DAY_)) {
file_put_contents(_PS_ROOT_DIR_.Upgrader::CACHE_FILE_UPGRADE_AVAILABE, Tools::addonsRequest('check-version'));
}
if (file_exists(_PS_ROOT_DIR_.Upgrader::CACHE_FILE_UPGRADE_AVAILABE)) {
$content = Tools::file_get_contents( _PS_ROOT_DIR_.Upgrader::CACHE_FILE_UPGRADE_AVAILABE);
$upgradeInfo = simplexml_load_string($content);
$this->context->smarty->assign(array(
'upgrade_info' => $upgradeInfo
));
}
Employee::setLastConnectionDate($this->context->employee->id);
$this->initProcess();
@@ -4053,7 +4077,7 @@ class AdminControllerCore extends Controller
* @param int $timeout
* @return bool
*/
public function isFresh($file, $timeout = 604800)
public function isFresh($file, $timeout = _TIME_1_WEEK_)
{
if (($time = @filemtime(_PS_ROOT_DIR_.$file)) && filesize(_PS_ROOT_DIR_.$file) > 0) {
return ((time() - $time) < $timeout);
@@ -4103,8 +4127,17 @@ class AdminControllerCore extends Controller
$link_admin_modules = $this->context->link->getAdminLink('AdminModules', true);
$module->options['install_url'] = $link_admin_modules.'&install='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor='.ucfirst($module->name);
$module->options['update_url'] = $link_admin_modules.'&update='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor='.ucfirst($module->name);
if ($module->is_native) {
$module->options['update_url'] = $link_admin_modules.'&update='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor='.ucfirst($module->name);
} else {
if ($module->url) {
$module->options['update_url'] = $module->url;
} else {
$module->options['update_url'] = '';
}
}
$module->options['uninstall_url'] = $link_admin_modules.'&uninstall='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor='.ucfirst($module->name);
$module->options['delete_url'] = $link_admin_modules.'&delete='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor='.ucfirst($module->name);
$module->optionsHtml = $this->displayModuleOptions($module, $output_type, $back);

View File

@@ -214,7 +214,43 @@ class FrontControllerCore extends Controller
self::$initialized = true;
parent::init();
$this->context->smarty->assign([
'css_dir' => _THEME_CSS_DIR_,
'img_ps_dir' => _PS_IMG_,
'tpl_dir' => _PS_THEME_DIR_,
'js_dir' => _THEME_JS_DIR_,
'base_dir' => __PS_BASE_URI__,
'language_code' => $this->context->language->language_code ? $this->context->language->language_code : $this->context->language->iso_code,
]);
/* get page name to display it in body id */
// Are we in a payment module
$module_name = '';
if (Validate::isModuleName(Tools::getValue('module'))) {
$module_name = Tools::getValue('module');
}
if (!empty($this->page_name)) {
$page_name = $this->page_name;
} elseif (!empty($this->php_self)) {
$page_name = $this->php_self;
} elseif (Tools::getValue('fc') == 'module' && $module_name != '' && (Module::getInstanceByName($module_name) instanceof PaymentModule)) {
$page_name = 'module-payment-submit';
}
// @retrocompatibility Are we in a module ?
elseif (preg_match('#^'.preg_quote($this->context->shop->physical_uri, '#').'modules/([a-zA-Z0-9_-]+?)/(.*)$#', $_SERVER['REQUEST_URI'], $m)) {
$page_name = 'module-'.$m[1].'-'.str_replace(array('.php', '/'), array('', '-'), $m[2]);
} else {
$page_name = Dispatcher::getInstance()->getController();
$page_name = (preg_match('/^[0-9]/', $page_name) ? 'page_'.$page_name : $page_name);
}
$this->context->smarty->assign(Meta::getMetaTags($this->context->language->id, $page_name));
$this->context->smarty->assign('request_uri', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI'])));
Tools::setCookieLanguage($this->context->cookie);
$this->displayMaintenancePage();
// If current URL use SSL, set it true (used a lot for module redirect)
if (Tools::usingSecureMode()) {
$useSSL = true;
@@ -236,12 +272,10 @@ class FrontControllerCore extends Controller
$this->context->smarty->assign('account_created', 1);
unset($this->context->cookie->account_created);
}
ob_start();
// Init cookie language
// @TODO This method must be moved into switchLanguage
Tools::setCookieLanguage($this->context->cookie);
$protocol_link = (Configuration::get('PS_SSL_ENABLED') || Tools::usingSecureMode()) ? 'https://' : 'http://';
$useSSL = ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED')) || Tools::usingSecureMode()) ? true : false;
@@ -370,32 +404,6 @@ class FrontControllerCore extends Controller
$this->context->cart = $cart;
}
/* get page name to display it in body id */
// Are we in a payment module
$module_name = '';
if (Validate::isModuleName(Tools::getValue('module'))) {
$module_name = Tools::getValue('module');
}
if (!empty($this->page_name)) {
$page_name = $this->page_name;
} elseif (!empty($this->php_self)) {
$page_name = $this->php_self;
} elseif (Tools::getValue('fc') == 'module' && $module_name != '' && (Module::getInstanceByName($module_name) instanceof PaymentModule)) {
$page_name = 'module-payment-submit';
}
// @retrocompatibility Are we in a module ?
elseif (preg_match('#^'.preg_quote($this->context->shop->physical_uri, '#').'modules/([a-zA-Z0-9_-]+?)/(.*)$#', $_SERVER['REQUEST_URI'], $m)) {
$page_name = 'module-'.$m[1].'-'.str_replace(array('.php', '/'), array('', '-'), $m[2]);
} else {
$page_name = Dispatcher::getInstance()->getController();
$page_name = (preg_match('/^[0-9]/', $page_name) ? 'page_'.$page_name : $page_name);
}
$this->context->smarty->assign(Meta::getMetaTags($this->context->language->id, $page_name));
$this->context->smarty->assign('request_uri', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI'])));
/* Breadcrumb */
$navigation_pipe = (Configuration::get('PS_NAVIGATION_PIPE') ? Configuration::get('PS_NAVIGATION_PIPE') : '>');
$this->context->smarty->assign('navigationPipe', $navigation_pipe);
@@ -404,7 +412,6 @@ class FrontControllerCore extends Controller
if (!empty($this->php_self) && !Tools::getValue('ajax')) {
$this->canonicalRedirection($this->context->link->getPageLink($this->php_self, $this->ssl, $this->context->language->id));
}
Product::initPricesComputation();
$display_tax_label = $this->context->country->display_tax_label;
@@ -444,13 +451,11 @@ class FrontControllerCore extends Controller
'force_ssl' => Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE'),
'content_dir' => $protocol_content.Tools::getHttpHost().__PS_BASE_URI__,
'base_uri' => $protocol_content.Tools::getHttpHost().__PS_BASE_URI__.(!Configuration::get('PS_REWRITING_SETTINGS') ? 'index.php' : ''),
'tpl_dir' => _PS_THEME_DIR_,
'tpl_uri' => _THEME_DIR_,
'modules_dir' => _MODULE_DIR_,
'mail_dir' => _MAIL_DIR_,
'lang_iso' => $this->context->language->iso_code,
'lang_id' => (int)$this->context->language->id,
'language_code' => $this->context->language->language_code ? $this->context->language->language_code : $this->context->language->iso_code,
'come_from' => Tools::getHttpHost(true, true).Tools::htmlentitiesUTF8(str_replace(array('\'', '\\'), '', urldecode($_SERVER['REQUEST_URI']))),
'cart_qties' => (int)$cart->nbProducts(),
'currencies' => Currency::getCurrencies(),
@@ -494,7 +499,6 @@ class FrontControllerCore extends Controller
));
$assign_array = array(
'img_ps_dir' => _PS_IMG_,
'img_cat_dir' => _THEME_CAT_DIR_,
'img_lang_dir' => _THEME_LANG_DIR_,
'img_prod_dir' => _THEME_PROD_DIR_,
@@ -504,8 +508,6 @@ class FrontControllerCore extends Controller
'img_store_dir' => _THEME_STORE_DIR_,
'img_col_dir' => _THEME_COL_DIR_,
'img_dir' => _THEME_IMG_DIR_,
'css_dir' => _THEME_CSS_DIR_,
'js_dir' => _THEME_JS_DIR_,
'pic_dir' => _THEME_PROD_PIC_DIR_
);
@@ -538,14 +540,12 @@ class FrontControllerCore extends Controller
self::$link = $link;
$defaultCountry = $this->context->country;
$this->displayMaintenancePage();
if ($this->restrictedCountry) {
$this->displayRestrictedCountryPage();
}
if (Tools::isSubmit('live_edit') && !$this->checkLiveEditAccess()) {
Tools::redirect('index.php?controller=404');
Tools::redirect('index.php');
}
$this->iso = $iso;
@@ -749,22 +749,101 @@ class FrontControllerCore extends Controller
*/
protected function displayMaintenancePage()
{
if ($this->maintenance == true || !(int)Configuration::get('PS_SHOP_ENABLE')) {
$this->maintenance = true;
if (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP')))) {
header('HTTP/1.1 503 temporarily overloaded');
$this->context->smarty->assign($this->initLogoAndFavicon());
$this->context->smarty->assign(array(
'HOOK_MAINTENANCE' => Hook::exec('displayMaintenance', array()),
));
// If the controller is a module, then getTemplatePath will try to find the template in the modules, so we need to instanciate a real frontcontroller
$front_controller = preg_match('/ModuleFrontController$/', get_class($this)) ? new FrontController() : $this;
$this->smartyOutputContent($front_controller->getTemplatePath($this->getThemeDir().'maintenance.tpl'));
exit;
if (isset(Context::getContext()->cookie->remote_addr)
&& Context::getContext()->cookie->remote_addr != ip2long(Tools::getRemoteAddr())
) {
$cookie = Context::getContext()->cookie;
if (isset($cookie->remote_addr)) {
$cookie->enable_maintenance_view = false;
$cookie->remote_addr = false;
$cookie->write();
}
}
if (Tools::isSubmit('SubmitLogin')
&& Configuration::get('PS_ALLOW_EMP')
&& !Context::getContext()->cookie->enable_maintenance_view
) {
$email = trim(Tools::getValue('email'));
$passwd = trim(Tools::getValue('passwd'));
$this->processLogin($email, $passwd);
}
if (!Context::getContext()->cookie->enable_maintenance_view || !Configuration::get('PS_ALLOW_EMP')) {
Context::getContext()->cookie->__unset('enable_maintenance_view');
Context::getContext()->cookie->write();
if ($this->maintenance == true || !(int)Configuration::get('PS_SHOP_ENABLE')) {
$this->maintenance = true;
if (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP')))) {
header('HTTP/1.1 503 temporarily overloaded');
$this->context->smarty->assign($this->initLogoAndFavicon());
$this->context->smarty->assign(array(
'HOOK_MAINTENANCE' => Hook::exec('displayMaintenance', array()),
'allowEmployee' => Configuration::get('PS_ALLOW_EMP'),
'maintenance' => $this->context->link->getAdminLink('AdminMaintenance', false),
));
// If the controller is a module, then getTemplatePath will try to find the template in the modules, so we need to instanciate a real frontcontroller
$front_controller = preg_match('/ModuleFrontController$/', get_class($this)) ? new FrontController() : $this;
$this->smartyOutputContent($front_controller->getTemplatePath($this->getThemeDir().'maintenance.tpl'));
exit;
}
}
}
}
protected function processLogin($email, $passwd)
{
$result = false;
$objMaintenanceAccess = new MaintenanceAccess();
/* Check fields validity */
if (empty($email)) {
$this->errors[] = Tools::displayError('Email is empty.');
} elseif (!Validate::isEmail($email)) {
$this->errors[] = Tools::displayError('Invalid email address.');
}
if (empty($passwd)) {
$this->errors[] = Tools::displayError('The password field is blank.');
} elseif (!Validate::isPasswd($passwd)) {
$this->errors[] = Tools::displayError('Invalid password.');
}
if ($objMaintenanceAccess->checkLimit($email)) {
$this->errors[] =Tools::displayError('You have exceeded the limit of login attempts, please try after some time');
}
if (!count($this->errors)) {
// Find employee
$this->context->employee = new Employee();
$is_employee_loaded = $this->context->employee->getByEmail($email, $passwd);
$employee_associated_shop = $this->context->employee->getAssociatedShops();
if (!$is_employee_loaded) {
$this->errors[] = Tools::displayError('The Employee does not exist, or the password provided is incorrect.');
$this->context->employee->logout();
} elseif (empty($employee_associated_shop) && !$this->context->employee->isSuperAdmin()) {
$this->errors[] = Tools::displayError('This employee does not manage the shop anymore (Either the shop has been deleted or permissions have been revoked).');
$this->context->employee->logout();
} else {
// Update cookie
$cookie = Context::getContext()->cookie;
$cookie->enable_maintenance_view = $this->context->employee->id;
$cookie->remote_addr = ip2long(Tools::getRemoteAddr());
$cookie->write();
}
if (count($this->errors)) {
$this->context->smarty->assign('errors', $this->errors);
$objMaintenanceAccess->email = $email;
$objMaintenanceAccess->ip_address = Tools::getRemoteAddr();
$objMaintenanceAccess->save();
} else {
Tools::redirect('index.php');
}
} else {
$this->context->smarty->assign('errors', $this->errors);
}
return $result;
}
/**

View File

@@ -171,13 +171,15 @@ abstract class ModuleCore
const CACHE_FILE_TAB_MODULES_LIST = '/config/xml/tab_modules_list.xml';
const CACHE_FILE_ALL_COUNTRY_MODULES_LIST = '/config/xml/modules_native_addons.xml';
// const CACHE_FILE_ALL_COUNTRY_MODULES_LIST = '/config/xml/modules_native_addons.xml';
const CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST = '/config/xml/default_country_modules_list.xml';
const CACHE_FILE_CUSTOMER_MODULES_LIST = '/config/xml/customer_modules_list.xml';
const CACHE_FILE_MUST_HAVE_MODULES_LIST = '/config/xml/must_have_modules_list.xml';
const CACHE_FILE_ADDONS_MODULES_LIST = '/config/xml/addons_modules_list.xml';
const CACHE_FILE_TRUSTED_MODULES_LIST = '/config/xml/trusted_modules_list.xml';
const CACHE_FILE_UNTRUSTED_MODULES_LIST = '/config/xml/untrusted_modules_list.xml';
@@ -1259,6 +1261,16 @@ abstract class ModuleCore
return Translate::getModuleTranslation((string)$xml_module->name, Module::configXmlStringFormat($xml_module->displayName), (string)$xml_module->name);
}
public static function getModuleInstallVersion($module)
{
return Db::getInstance()->getRow('
SELECT m.`name`, m.`version`, mp.`interest`, module_shop.`enable_device`
FROM `'._DB_PREFIX_.'module` m
'.Shop::addSqlAssociation('module', 'm', false).'
LEFT JOIN `'._DB_PREFIX_.'module_preference` mp ON (mp.`module` = m.`name` AND mp.`id_employee` = '.(int)$id_employee.')
WHERE m.`name` = "'.pSQL($module).'"');
}
protected static function useTooMuchMemory()
{
$memory_limit = Tools::getMemoryLimit();
@@ -1297,7 +1309,7 @@ abstract class ModuleCore
$result = Db::getInstance()->executeS('
SELECT m.name, m.version, mp.interest, module_shop.enable_device
FROM `'._DB_PREFIX_.'module` m
'.Shop::addSqlAssociation('module', 'm').'
'.Shop::addSqlAssociation('module', 'm', false).'
LEFT JOIN `'._DB_PREFIX_.'module_preference` mp ON (mp.`module` = m.`name` AND mp.`id_employee` = '.(int)$id_employee.')');
foreach ($result as $row) {
$modules_installed[$row['name']] = $row;
@@ -1364,7 +1376,21 @@ abstract class ModuleCore
$item->active = 0;
$item->onclick_option = false;
$item->trusted = Module::isModuleTrusted($item->name);
$item->url = false;
$item->is_native = false;
if (defined('_PS_HOST_MODE_') && in_array($item->name, self::$hosted_modules_blacklist)) {
continue;
} elseif (isset($modules_installed[$item->name])) {
$item->installed = true;
$item->database_version = $modules_installed[$item->name]['version'];
$item->interest = $modules_installed[$item->name]['interest'];
$item->enable_device = $modules_installed[$item->name]['enable_device'];
} else {
$item->installed = false;
$item->database_version = 0;
$item->interest = 0;
}
$module_list[] = $item;
@@ -1417,7 +1443,6 @@ abstract class ModuleCore
$item->is_configurable = $tmp_module->is_configurable = method_exists($tmp_module, 'getContent') ? 1 : 0;
$item->need_instance = isset($tmp_module->need_instance) ? $tmp_module->need_instance : 0;
$item->active = $tmp_module->active;
$item->trusted = Module::isModuleTrusted($tmp_module->name);
$item->currencies = isset($tmp_module->currencies) ? $tmp_module->currencies : null;
$item->currencies_mode = isset($tmp_module->currencies_mode) ? $tmp_module->currencies_mode : null;
$item->confirmUninstall = isset($tmp_module->confirmUninstall) ? html_entity_decode($tmp_module->confirmUninstall) : null;
@@ -1429,6 +1454,7 @@ abstract class ModuleCore
$item->badges = isset($tmp_module->badges) ? (array)$tmp_module->badges : null;
$item->url = isset($tmp_module->url) ? $tmp_module->url : null;
$item->onclick_option = method_exists($module, 'onclickOption') ? true : false;
$item->is_native = false;
if ($item->onclick_option) {
$href = Context::getContext()->link->getAdminLink('Module', true).'&module_name='.$tmp_module->name.'&tab_module='.$tmp_module->tab;
@@ -1440,6 +1466,19 @@ abstract class ModuleCore
}
}
if (defined('_PS_HOST_MODE_') && in_array($item->name, self::$hosted_modules_blacklist)) {
continue;
} elseif (isset($modules_installed[$item->name])) {
$item->installed = true;
$item->database_version = $modules_installed[$item->name]['version'];
$item->interest = $modules_installed[$item->name]['interest'];
$item->enable_device = $modules_installed[$item->name]['enable_device'];
} else {
$item->installed = false;
$item->database_version = 0;
$item->interest = 0;
}
$module_list[] = $item;
if (!$xml_exist || $need_new_config_file) {
@@ -1475,9 +1514,8 @@ abstract class ModuleCore
}
$files_list = array(
array('type' => 'addonsModules', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_ADDONS_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsNative', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsBought', 'file' => _PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
);
foreach ($files_list as $f) {
if (file_exists($f['file']) && ($f['loggedOnAddons'] == 0 || $logged_on_addons)) {
@@ -1497,90 +1535,20 @@ abstract class ModuleCore
if (Tools::strtolower($m->name) == Tools::strtolower($modaddons->name) && !isset($m->available_on_addons)) {
$flag_found = 1;
if ($m->version != $modaddons->version && version_compare($m->version, $modaddons->version) === -1) {
$module_list[$k]->version_addons = $modaddons->version;
$module_list[$k]->version_addons = strip_tags((string)$modaddons->version);
}
$module_list[$k]->url = isset($modaddons->url) ? strip_tags((string)$modaddons->url) : null;
if ($f['type'] == 'addonsNative') {
$module_list[$k]->is_native = true;
}
}
}
if ($flag_found == 0) {
$item = new stdClass();
$item->id = 0;
$item->warning = '';
$item->type = strip_tags((string)$f['type']);
$item->name = strip_tags((string)$modaddons->name);
$item->version = strip_tags((string)$modaddons->version);
$item->tab = strip_tags((string)$modaddons->tab);
$item->displayName = strip_tags((string)$modaddons->displayName);
$item->description = stripslashes(strip_tags((string)$modaddons->description));
$item->description_full = stripslashes(strip_tags((string)$modaddons->description_full));
$item->author = strip_tags((string)$modaddons->author);
$item->limited_countries = array();
$item->parent_class = '';
$item->onclick_option = false;
$item->is_configurable = 0;
$item->need_instance = 0;
$item->not_on_disk = 1;
$item->available_on_addons = 1;
$item->trusted = Module::isModuleTrusted($item->name);
$item->active = 0;
$item->description_full = stripslashes($modaddons->description_full);
$item->additional_description = isset($modaddons->additional_description) ? stripslashes($modaddons->additional_description) : null;
$item->compatibility = isset($modaddons->compatibility) ? (array)$modaddons->compatibility : null;
$item->nb_rates = isset($modaddons->nb_rates) ? (array)$modaddons->nb_rates : null;
$item->avg_rate = isset($modaddons->avg_rate) ? (array)$modaddons->avg_rate : null;
$item->badges = isset($modaddons->badges) ? (array)$modaddons->badges : null;
$item->url = isset($modaddons->url) ? $modaddons->url : null;
if (isset($modaddons->img)) {
if (!file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) {
if (!file_put_contents(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg', Tools::file_get_contents($modaddons->img))) {
copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg');
}
}
if (file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) {
$item->image = '../img/tmp/'.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg';
}
}
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;
}
}
}
}
$module_list[$modaddons->id.'-'.$item->name] = $item;
}
}
}
}
}
foreach ($module_list as $key => &$module) {
if (defined('_PS_HOST_MODE_') && in_array($module->name, self::$hosted_modules_blacklist)) {
unset($module_list[$key]);
} elseif (isset($modules_installed[$module->name])) {
$module->installed = true;
$module->database_version = $modules_installed[$module->name]['version'];
$module->interest = $modules_installed[$module->name]['interest'];
$module->enable_device = $modules_installed[$module->name]['enable_device'];
} else {
$module->installed = false;
$module->database_version = 0;
$module->interest = 0;
}
}
usort($module_list, function ($a, $b) { return strnatcasecmp($a->displayName, $b->displayName); });
if ($errors) {
if (!isset(Context::getContext()->controller) && !Context::getContext()->controller->controller_name) {
@@ -1622,6 +1590,91 @@ abstract class ModuleCore
return $module_list;
}
public static function getInstalledModulesOnDisk($use_config = false, $logged_on_addons = false, $id_employee = false)
{
$modules = self::getModulesOnDisk($use_config, $logged_on_addons, $id_employee);
return array_filter($modules, function($m) {
return $m->installed;
});
}
public static function getSuggestedModules()
{
$files_list = array(
array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsNative', 'file' => _PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
);
$module_list = array();
foreach ($files_list as $f) {
$file = $f['file'];
$content = Tools::file_get_contents($file);
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
if ($xml && isset($xml->module)) {
foreach ($xml->module as $modaddons) {
$item = new stdClass();
$item->id = 0;
$item->warning = '';
$item->type = strip_tags((string)$f['type']);
$item->name = strip_tags((string)$modaddons->name);
$item->version = strip_tags((string)$modaddons->version);
$item->tab = strip_tags((string)$modaddons->tab);
$item->displayName = strip_tags((string)$modaddons->displayName);
$item->description = stripslashes(strip_tags((string)$modaddons->description));
$item->description_full = stripslashes(strip_tags((string)$modaddons->description_full));
$item->author = strip_tags((string)$modaddons->author);
$item->limited_countries = array();
$item->parent_class = '';
$item->onclick_option = false;
$item->is_configurable = 0;
$item->need_instance = 0;
$item->not_on_disk = 1;
$item->available_on_addons = 1;
$item->active = 0;
$item->description_full = stripslashes($modaddons->description_full);
$item->additional_description = isset($modaddons->additional_description) ? stripslashes($modaddons->additional_description) : null;
$item->compatibility = isset($modaddons->compatibility) ? (array)$modaddons->compatibility : null;
$item->nb_rates = isset($modaddons->nb_rates) ? (array)$modaddons->nb_rates : null;
$item->avg_rate = isset($modaddons->avg_rate) ? (array)$modaddons->avg_rate : null;
$item->badges = isset($modaddons->badges) ? (array)$modaddons->badges : null;
$item->url = isset($modaddons->url) ? $modaddons->url : null;
$item->is_native = false;
if (isset($modaddons->img)) {
if (!file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) {
if (!file_put_contents(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg', Tools::file_get_contents($modaddons->img))) {
copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg');
}
}
if (file_exists(_PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg')) {
$item->image = '../img/tmp/'.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg';
}
}
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;
}
}
}
}
$module_list[$modaddons->id.'-'.$item->name] = $item;
}
}
}
$module_list = array_values($module_list);
return $module_list;
}
/**
* Return non native module
@@ -1641,7 +1694,7 @@ abstract class ModuleCore
$arr_native_modules = array();
if (is_array($native_modules)) {
foreach ($native_modules as $native_modules_type) {
if (in_array($native_modules_type['type'], array('native', 'partner'))) {
if (in_array($native_modules_type['type'], array('native', 'disk', 'partner'))) {
$arr_native_modules[] = '""';
foreach ($native_modules_type->module as $module) {
$arr_native_modules[] = '"'.pSQL($module['name']).'"';
@@ -1710,7 +1763,7 @@ abstract class ModuleCore
* @param string $key The key provided by addons
* @return int
*/
final public static function isModuleTrusted($module_name)
final public static function isModuleTrusted($module_name, $check_api = true)
{
static $trusted_modules_list_content = null;
static $modules_list_content = null;
@@ -1724,7 +1777,7 @@ abstract class ModuleCore
// we use the file, otherwise we regenerate it
if (!(file_exists(_PS_ROOT_DIR_.self::CACHE_FILE_TRUSTED_MODULES_LIST)
&& filesize(_PS_ROOT_DIR_.self::CACHE_FILE_TRUSTED_MODULES_LIST) > 0
&& ((time() - filemtime(_PS_ROOT_DIR_.self::CACHE_FILE_TRUSTED_MODULES_LIST)) < 86400)
&& ((time() - filemtime(_PS_ROOT_DIR_.self::CACHE_FILE_TRUSTED_MODULES_LIST)) < _TIME_1_DAY_)
)) {
self::generateTrustedXml();
}
@@ -1748,8 +1801,6 @@ abstract class ModuleCore
$untrusted_modules_list_content = Tools::file_get_contents(_PS_ROOT_DIR_.self::CACHE_FILE_UNTRUSTED_MODULES_LIST);
}
$objModule = Module::getInstanceByName($module_name);
// If the module is trusted, which includes both partner modules and modules bought on Addons
if (stripos($trusted_modules_list_content, $module_name) !== false) {
@@ -1769,10 +1820,11 @@ abstract class ModuleCore
// If the module isn't in one of the xml files
// It might have been uploaded recenlty so we check
// Addons API and clear XML files to be regenerated next time
Tools::deleteFile(_PS_ROOT_DIR_.self::CACHE_FILE_TRUSTED_MODULES_LIST);
Tools::deleteFile(_PS_ROOT_DIR_.self::CACHE_FILE_UNTRUSTED_MODULES_LIST);
return (int)Module::checkModuleFromAddonsApi($module_name);
if ($check_api) {
Tools::deleteFile(_PS_ROOT_DIR_.self::CACHE_FILE_TRUSTED_MODULES_LIST);
Tools::deleteFile(_PS_ROOT_DIR_.self::CACHE_FILE_UNTRUSTED_MODULES_LIST);
return (int)Module::checkModuleFromAddonsApi($module_name);
}
}
}
@@ -1787,9 +1839,11 @@ abstract class ModuleCore
$untrusted = array();
$trusted_modules_xml = array(
_PS_ROOT_DIR_.self::CACHE_FILE_ALL_COUNTRY_MODULES_LIST,
_PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST,
);
// _PS_ROOT_DIR_.self::CACHE_FILE_ALL_COUNTRY_MODULES_LIST,
_PS_ROOT_DIR_.self::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST,
_PS_ROOT_DIR_.self::CACHE_FILE_MUST_HAVE_MODULES_LIST,
_PS_ROOT_DIR_.self::CACHE_FILE_ADDONS_MODULES_LIST,
);
if (file_exists(_PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST)) {
$trusted_modules_xml[] = _PS_ROOT_DIR_.self::CACHE_FILE_CUSTOMER_MODULES_LIST;
@@ -1874,12 +1928,12 @@ abstract class ModuleCore
if (!is_object($obj)) {
return false;
} elseif ($obj->module_key === '') {
return false;
// } elseif ($obj->module_key === '') {
// return false;
} else {
$params = array(
'module_name' => $obj->name,
'module_key' => $obj->module_key,
// 'module_key' => $obj->module_key,
);
$xml = Tools::addonsRequest('check_module', $params);
return (bool)(strpos($xml, 'success') !== false);

View File

@@ -1747,6 +1747,10 @@ class OrderCore extends ObjectModel
$this->total_paid_real += Tools::ps_round(Tools::convertPrice($order_payment->amount, $order_payment->id_currency, false), 2);
}
if (!validate::isPrice($this->total_paid_real)) {
return false;
}
// We put autodate parameter of add method to true if date_add field is null
$res = $order_payment->add(is_null($order_payment->date_add)) && $this->update();

View File

@@ -77,6 +77,8 @@ if (_PS_DEBUG_PROFILING_) {
include_once(_PS_TOOL_DIR_.'profiling/Tools.php');
}
require_once (_PS_ROOT_DIR_.'/modules/hotelreservationsystem/define.php');
if (Tools::convertBytes(ini_get('upload_max_filesize')) < Tools::convertBytes('100M')) {
ini_set('upload_max_filesize', '100M');
}
@@ -264,4 +266,5 @@ if (!defined('_MEDIA_SERVER_3_')) {
define('_MEDIA_SERVER_3_', Configuration::get('PS_MEDIA_SERVER_3'));
}
require_once (_PS_ROOT_DIR_.'/modules/hotelreservationsystem/define.php');
define('_TIME_1_DAY_', 86400);
define('_TIME_1_WEEK_', 604800);

View File

@@ -84,5 +84,5 @@ Tools::safeDefine('_PS_API_DOMAIN_', 'api.prestashop.com');
Tools::safeDefine('_PS_API_URL_', 'http://'._PS_API_DOMAIN_);
Tools::safeDefine('_PS_CURRENCY_FEED_URL_', _PS_API_URL_.'/xml/currencies.xml');
Tools::safeDefine('_QLO_API_DOMAIN_', 'api.qloapps.com');
Tools::safeDefine('_QLO_API_URL_', 'http://'._QLO_API_DOMAIN_);
Tools::safeDefine('_QLO_API_URL_', 'https://'._QLO_API_DOMAIN_);
Tools::safeDefine('_QLO_TAB_MODULE_LIST_URL_', _QLO_API_URL_.'/xml/tab_modules_list.xml');

View File

@@ -82,6 +82,7 @@
<hook module="hotelreservationsystem" hook="actionObjectProfileAddAfter" position="1"/>
<hook module="hotelreservationsystem" hook="actionObjectProfileDeleteBefore" position="1"/>
<hook module="hotelreservationsystem" hook="actionObjectGroupDeleteBefore" position="1"/>
<hook module="hotelreservationsystem" hook="displayLeftColumn" position="4"/>
<hook module="wkroomsearchblock" hook="displayLeftColumn" position="1"/>
<hook module="wkroomsearchblock" hook="Header" position="2"/>
<hook module="wkroomsearchblock" hook="displayAfterHookTop" position="2"/>

View File

@@ -87,7 +87,7 @@ class AdminContactsControllerCore extends AdminController
'required' => false,
'class' => 't',
'is_bool' => true,
'hint' => $this->l('If enabled, all messages will be saved in the "Customer Service" page under the "Customer" menu.'),
'hint' => $this->l('If enabled, all messages will be saved in the "Customer Service" page under the "Customers" menu.'),
'values' => array(
array(
'id' => 'customer_service_on',

View File

@@ -26,6 +26,9 @@
class AdminDashboardControllerCore extends AdminController
{
const DASHBOARD_RECOMMENDATION_CONTENT = '/cache/dashboard_recommendation.html';
public function __construct()
{
$this->bootstrap = true;
@@ -282,6 +285,15 @@ class AdminDashboardControllerCore extends AdminController
'hotel_name' => $objHotelBranchInfo->hotel_name.', '.$hotelAddressInfo['city'],
);
}
if (file_exists(_PS_ROOT_DIR_.Upgrader::CACHE_FILE_UPGRADE_AVAILABE)) {
$content = Tools::file_get_contents( _PS_ROOT_DIR_.Upgrader::CACHE_FILE_UPGRADE_AVAILABE);
$upgradeInfo = simplexml_load_string($content);
$this->context->smarty->assign(array(
'upgrade_info' => $upgradeInfo
));
}
$this->tpl_view_vars = array(
'date_from' => $this->context->employee->stats_date_from,
'date_to' => $this->context->employee->stats_date_to,
@@ -294,7 +306,7 @@ class AdminDashboardControllerCore extends AdminController
//'translations' => $translations,
'action' => self::$currentIndex.'&token='.$this->token,
'warning' => $this->getWarningDomainName(),
'new_version_url' => Tools::getCurrentUrlProtocolPrefix()._PS_API_DOMAIN_.'/version/check_version.php?v='._PS_VERSION_.'&lang='.$this->context->language->iso_code.'&autoupgrade='.(int)(Module::isInstalled('autoupgrade') && Module::isEnabled('autoupgrade')).'&hosted_mode='.(int)defined('_PS_HOST_MODE_'),
'new_version_url' => Tools::getCurrentUrlProtocolPrefix()._QLO_API_DOMAIN_.'/index.php?version='._QLOAPPS_VERSION_.'&lang='.$this->context->language->iso_code.'&method=check-version&autoupgrade='.(int)(Module::isInstalled('qloautoupgrade') && Module::isEnabled('qloautoupgrade')).'&hosted_mode='.(int)defined('_PS_HOST_MODE_'),
'dashboard_use_push' => Configuration::get('PS_DASHBOARD_USE_PUSH'),
'calendar' => $calendar_helper->generate(),
'PS_DASHBOARD_SIMULATION' => Configuration::get('PS_DASHBOARD_SIMULATION'),
@@ -411,7 +423,7 @@ class AdminDashboardControllerCore extends AdminController
public function ajaxProcessGetBlogRss()
{
$return = array('has_errors' => false, 'rss' => array());
if (!$this->isFresh('/config/xml/blog-'.$this->context->language->iso_code.'.xml', 86400)) {
if (!$this->isFresh('/config/xml/blog-'.$this->context->language->iso_code.'.xml', _TIME_1_DAY_)) {
if (!$this->refresh('/config/xml/blog-'.$this->context->language->iso_code.'.xml', _PS_API_URL_.'/rss/blog/blog-'.$this->context->language->iso_code.'.xml')) {
$return['has_errors'] = true;
}
@@ -506,4 +518,25 @@ class AdminDashboardControllerCore extends AdminController
die(json_encode($return));
}
public function ajaxProcessGetRecommendationContent()
{
$response = array('success' => false);
if ($content = $this->getRecommendationContent()) {
$response['success'] = true;
$response['content'] = $content;
}
$this->ajaxDie(json_encode($response));
}
public function getRecommendationContent()
{
if (!$this->isFresh(self::DASHBOARD_RECOMMENDATION_CONTENT, _TIME_1_DAY_)) {
@file_put_contents(_PS_ROOT_DIR_.self::DASHBOARD_RECOMMENDATION_CONTENT, Tools::addonsRequest('dashboard-recommendation'));
}
if (file_exists(_PS_ROOT_DIR_.self::DASHBOARD_RECOMMENDATION_CONTENT)) {
return Tools::file_get_contents(_PS_ROOT_DIR_.self::DASHBOARD_RECOMMENDATION_CONTENT);
}
return false;
}
}

View File

@@ -278,7 +278,6 @@ class AdminEmailsControllerCore extends AdminController
$this->initTabModuleList();
$this->initToolbar();
$this->initPageHeaderToolbar();
$this->addToolBarModulesListButton();
unset($this->toolbar_btn['save']);
$back = $this->context->link->getAdminLink('AdminDashboard');

View File

@@ -86,7 +86,7 @@ class AdminLogsControllerCore extends AdminController
'fields' => array(
'PS_LOGS_BY_EMAIL' => array(
'title' => $this->l('Minimum severity level'),
'hint' => $this->l('Enter "5" if you do not want to receive any emails.').'<br />'.$this->l('Emails will be sent to the shop owner.'),
'hint' => $this->l('Enter "5" if you do not want to receive any emails.').'<br />'.$this->l('Emails will be sent to the website owner.'),
'cast' => 'intval',
'type' => 'text'
)

View File

@@ -48,6 +48,14 @@ class AdminMaintenanceControllerCore extends AdminController
'cast' => 'intval',
'type' => 'bool'
),
'PS_ALLOW_EMP' => array(
'title' => $this->l('Allow Employees'),
'desc' => $this->l('Allow the employees to access the site using email and password.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
'class' => "hello"
),
'PS_MAINTENANCE_IP' => array(
'title' => $this->l('Maintenance IP'),
'hint' => $this->l('IP addresses allowed to access the front office even if the site is disabled. Please use a comma to separate them (e.g. 42.24.4.2,127.0.0.1,99.98.97.96)'),
@@ -60,4 +68,10 @@ class AdminMaintenanceControllerCore extends AdminController
),
);
}
public function setMedia()
{
parent::setMedia();
$this->addJS(_PS_JS_DIR_.'maintenance.js');
}
}

View File

@@ -0,0 +1,332 @@
<?php
/**
* 2010-2020 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <support@webkul.com>
* @copyright 2010-2020 Webkul IN
* @license https://store.webkul.com/license.html
*/
class AdminModulesCatalogControllerCore extends AdminController
{
public $modules;
const CATALOG_RECOMMENDATION_CONTENT = '/cache/catalog_recommendation.html';
const ELEMENT_TYPE_MODULE = 1;
const ELEMENT_TYPE_THEME = 2;
const MODULES_PER_PAGE = 18;
public function __construct()
{
$this->bootstrap = true;
parent::__construct();
}
public function init()
{
parent::init();
$this->initSuggestedModulesList();
}
public function initContent()
{
parent::initContent();
$suggestedModules = Module::getSuggestedModules();
$modulesToAdd = array();
$dirModules = ModuleCore::getModulesOnDisk();
$modules_name = array_column($suggestedModules, 'name');
foreach ($dirModules as $mod) {
if (($id = array_search($mod->name, $modules_name)) !== false) {
if ($mod->installed) {
unset($suggestedModules[$id]);
} else {
$suggestedModules[$id]->not_on_disk = false;
}
} else {
if (!$mod->installed) {
$modulesToAdd[] = $mod;
}
}
}
$modules = array_merge($suggestedModules, $modulesToAdd);
$link_admin_modules = $this->context->link->getAdminLink('AdminModules', true);
foreach ($modules as $key => $module) {
$module->options['install_url'] = $link_admin_modules.'&install='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor='.ucfirst($module->name);
$module->element_type = self::ELEMENT_TYPE_MODULE;
$module->logo = '../../img/questionmark.png';
if (@filemtime(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.basename(_PS_MODULE_DIR_).DIRECTORY_SEPARATOR.$module->name
.DIRECTORY_SEPARATOR.'logo.gif')) {
$module->logo = 'logo.gif';
}
if (@filemtime(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.basename(_PS_MODULE_DIR_).DIRECTORY_SEPARATOR.$module->name
.DIRECTORY_SEPARATOR.'logo.png')) {
$module->logo = 'logo.png';
}
$modules[$key] = $module;
}
$this->sortList($modules, 'module');
$this->modules = $modules;
$this->themes = $this->getSuggestedThemes();
$this->assignSortCriteria();
$this->context->smarty->assign(array(
'modules' => $this->modules,
'themes' => $this->themes,
'modules_uri' => __PS_BASE_URI__.basename(_PS_MODULE_DIR_),
'element_type_module' => self::ELEMENT_TYPE_MODULE,
'element_type_theme' => self::ELEMENT_TYPE_THEME,
));
}
public function initModal()
{
parent::initModal();
$modal_content = $this->context->smarty->fetch('controllers/modules/'.(($this->context->mode == Context::MODE_HOST) ? 'modal_not_trusted_blocked.tpl' : 'modal_not_trusted.tpl'));
$this->modals[] = array(
'modal_id' => 'moduleNotTrusted',
'modal_class' => 'modal-lg',
'modal_title' => ($this->context->mode == Context::MODE_HOST) ? $this->l('This module cannot be installed') : $this->l('Important Notice'),
'modal_content' => $modal_content
);
}
public function assignSortCriteria()
{
$sortCriterta = array(
array (
'key' => 'popularity',
'value' => 'popularity',
'title' => $this->l('Popularity')
),
array (
'key' => 'name',
'value' => 'name',
'title' => $this->l('Name')
),
array (
'key' => 'price_increasing',
'value' => 'price_increasing',
'title' => $this->l('Price (low to high)')
),
array (
'key' => 'price_decreasing',
'value' => 'price_decreasing',
'title' => $this->l('Price (high to low)')
),
);
$this->context->smarty->assign(array(
'sort_criterta' => $sortCriterta,
'module_sort' => Configuration::get('PS_SORT_MODULE_MODULES_CATALOG_'.(int)$this->context->employee->id),
'theme_sort' => Configuration::get('PS_SORT_THEME_MODULES_CATALOG_'.(int)$this->context->employee->id),
));
}
public function getSuggestedThemes()
{
$installedThemes = array();
$themes = Theme::getAllThemes()->getAll();
foreach ($themes as $theme) {
$installedThemes[] = Theme::getThemeInfo($theme->id);
}
$files_list = array(
array('type' => 'addonsMustHave', 'file' => _PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 0),
);
$theme_list = array();
foreach ($files_list as $f) {
$file = $f['file'];
$content = Tools::file_get_contents($file);
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
if ($xml && isset($xml->theme)) {
foreach ($xml->theme as $modthemes) {
foreach ($installedThemes as $theme) {
if ($theme['theme_name'] == $modthemes->name)
continue;
$item = new stdClass();
$item->id = 0;
$item->warning = '';
$item->type = strip_tags((string)$f['type']);
$item->element_type = self::ELEMENT_TYPE_THEME;
$item->name = strip_tags((string)$modthemes->name);
$item->version = strip_tags((string)$modthemes->version);
$item->displayName = strip_tags((string)$modthemes->displayName);
$item->description = stripslashes(strip_tags((string)$modthemes->description));
$item->description_full = stripslashes(strip_tags((string)$modthemes->description_full));
$item->author = strip_tags((string)$modthemes->author);
$item->limited_countries = array();
$item->parent_class = '';
$item->onclick_option = false;
$item->available_on_addons = 1;
$item->active = 0;
$item->additional_description = isset($modthemes->additional_description) ? stripslashes($modthemes->additional_description) : null;
$item->compatibility = isset($modthemes->compatibility) ? (array)$modthemes->compatibility : null;
$item->nb_rates = isset($modthemes->nb_rates) ? (array)$modthemes->nb_rates : null;
$item->avg_rate = isset($modthemes->avg_rate) ? (array)$modthemes->avg_rate : null;
$item->badges = isset($modthemes->badges) ? (array)$modthemes->badges : null;
$item->url = isset($modthemes->url) ? $modthemes->url : null;
if (isset($modthemes->img)) {
if (!file_exists(_PS_TMP_IMG_DIR_.md5((int)$modthemes->id.'-'.$modthemes->name).'.jpg')) {
if (!file_put_contents(_PS_TMP_IMG_DIR_.md5((int)$modthemes->id.'-'.$modthemes->name).'.jpg', Tools::file_get_contents($modthemes->img))) {
copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5((int)$modthemes->id.'-'.$modthemes->name).'.jpg');
}
}
if (file_exists(_PS_TMP_IMG_DIR_.md5((int)$modthemes->id.'-'.$modthemes->name).'.jpg')) {
$item->image = '../img/tmp/'.md5((int)$modthemes->id.'-'.$modthemes->name).'.jpg';
}
}
if ($item->type == 'addonsMustHave') {
$item->addons_buy_url = strip_tags((string)$modthemes->url);
$prices = (array)$modthemes->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;
}
}
}
}
$theme_list[$modthemes->id.'-'.$item->name] = $item;
}
}
}
}
$theme_list = array_values($theme_list);
$this->sortList($theme_list, 'theme');
return $theme_list;
}
public function initToolbar()
{
parent::initToolbar();
$this->page_header_toolbar_btn['addons'] = array(
'href' => 'https://qloapps.com/addons/',
'desc' => $this->l('Explore all Addons'),
'imgclass' => 'modules-list',
'target' => true
);
}
public function getRecommendationContent()
{
if (!$this->isFresh(self::CATALOG_RECOMMENDATION_CONTENT, _TIME_1_DAY_)) {
@file_put_contents(_PS_ROOT_DIR_.self::CATALOG_RECOMMENDATION_CONTENT, Tools::addonsRequest('catalog-recommendation'));
}
if (file_exists(_PS_ROOT_DIR_.self::CATALOG_RECOMMENDATION_CONTENT)) {
return Tools::file_get_contents(_PS_ROOT_DIR_.self::CATALOG_RECOMMENDATION_CONTENT);
}
return false;
}
public function sortList(&$list, $type)
{
switch($type) {
case 'module':
$criteria = Configuration::get('PS_SORT_MODULE_MODULES_CATALOG_'.(int)$this->context->employee->id);
break;
case 'theme':
$criteria = Configuration::get('PS_SORT_THEME_MODULES_CATALOG_'.(int)$this->context->employee->id);
break;
}
if ($criteria != 'popularity') {
usort($list, function($a, $b) use($criteria){
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;
} 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;
}
});
}
return true;
}
protected function setSorting($module_sorting, $theme_sorting)
{
Configuration::updateValue('PS_SORT_MODULE_MODULES_CATALOG_'.(int)$this->context->employee->id, $module_sorting);
Configuration::updateValue('PS_SORT_THEME_MODULES_CATALOG_'.(int)$this->context->employee->id, $theme_sorting);
}
public function ajaxProcessGetRecommendationContent()
{
$response = array('success' => false);
if ($content = $this->getRecommendationContent()) {
$response['success'] = true;
$response['content'] = $content;
}
$this->ajaxDie(json_encode($response));
}
public function ajaxProcessSetSorting()
{
$this->setSorting(Tools::getValue('module_sorting'), Tools::getValue('theme_sorting'));
$this->ajaxDie(json_encode(array(
'success' => true
)));
}
protected function initSuggestedModulesList()
{
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, _TIME_1_DAY_)) {
file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
}
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, _TIME_1_DAY_)) {
@file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'));
}
}
public function setMedia()
{
parent::setMedia();
$this->addJS(_PS_JS_DIR_.'admin/modules_catalog.js');
$this->context->controller->addJS(_PS_JS_DIR_.'/twbs-pagination/jquery.twbsPagination.min.js');
Media::addJSdef(array(
'num_block_per_page' => self::MODULES_PER_PAGE
));
}
}

View File

@@ -130,7 +130,9 @@ class AdminModulesControllerCore extends AdminController
foreach ($xml_module->children() as $module) {
/** @var SimpleXMLElement $module */
foreach ($module->attributes() as $key => $value) {
if ($xml_module->attributes() == 'native' && $key == 'name') {
if (($xml_module->attributes() == 'native' || $xml_module->attributes() == 'disk')
&& $key == 'name'
) {
$this->list_natives_modules[] = (string)$value;
}
if ($xml_module->attributes() == 'partner' && $key == 'name') {
@@ -156,17 +158,22 @@ class AdminModulesControllerCore extends AdminController
parent::setMedia();
$this->addJqueryPlugin(array('autocomplete', 'fancybox', 'tablefilter'));
if ($this->context->mode == Context::MODE_HOST && Tools::isSubmit('addnewmodule')) {
Media::addjsDef(array(
'remove_uploaded_module_txt' => $this->l('Do you want to remove the uploaded/installed module?'),
'module_install_error_txt' => $this->l('There was an error while installing module.'),
));
$this->addJS(_PS_JS_DIR_.'admin/modules.js');
if ($this->context->mode == Context::MODE_HOST && Tools::isSubmit('addnewmodule')) {
$this->addJS(_PS_JS_DIR_.'admin/addons.js');
}
}
public function ajaxProcessRefreshModuleList($force_reload_cache = false)
{
$xml_modules_list = _QLO_API_DOMAIN_.'/xml/'.str_replace('.', '', _QLOAPPS_VERSION_).'.xml';
// Refresh modules_list.xml every week
if (!$this->isFresh(Module::CACHE_FILE_MODULES_LIST, 86400) || $force_reload_cache) {
if (!$this->isFresh(Module::CACHE_FILE_MODULES_LIST, _TIME_1_DAY_) || $force_reload_cache) {
$xml_modules_list = _QLO_API_DOMAIN_.'/xml/'.str_replace('.', '', _QLOAPPS_VERSION_).'.xml';
if ($this->refresh(Module::CACHE_FILE_MODULES_LIST, 'https://'.$xml_modules_list)) {
$this->status = 'refresh';
} elseif ($this->refresh(Module::CACHE_FILE_MODULES_LIST, 'http://'.$xml_modules_list)) {
@@ -180,7 +187,7 @@ class AdminModulesControllerCore extends AdminController
// If logged to Addons Webservices, refresh default country native modules list every day
if ($this->status != 'error') {
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400) || $force_reload_cache) {
if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, _TIME_1_DAY_) || $force_reload_cache) {
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'))) {
$this->status = 'refresh';
} else {
@@ -190,7 +197,17 @@ class AdminModulesControllerCore extends AdminController
$this->status = 'cache';
}
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 86400) || $force_reload_cache) {
if (!$this->isFresh(Module::CACHE_FILE_ADDONS_MODULES_LIST, _TIME_1_DAY_) || $force_reload_cache) {
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_ADDONS_MODULES_LIST, Tools::addonsRequest('addons-modules'))) {
$this->status = 'refresh';
} else {
$this->status = 'error';
}
} else {
$this->status = 'cache';
}
if (!$this->isFresh(Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, _TIME_1_DAY_) || $force_reload_cache) {
if (file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, Tools::addonsRequest('must-have'))) {
$this->status = 'refresh';
} else {
@@ -213,6 +230,7 @@ class AdminModulesControllerCore extends AdminController
$this->status = 'cache';
}
}
Module::generateTrustedXml();
}
public function displayAjaxRefreshModuleList()
@@ -268,19 +286,29 @@ class AdminModulesControllerCore extends AdminController
public function ajaxProcessGetTabModulesList()
{
$tab_modules_list = Tools::getValue('tab_modules_list');
// $tab_modules_list = Tools::getValue('tab_modules_list');
$conrollerClass = Tools::getValue('controller_class');
$controllerId = Tab::getIdFromClassName($conrollerClass);
if (!Tab::isTabModuleListAvailable()) {
$this->ajaxProcessRefreshModuleList();
}
if ($tab_modules_list = Tab::getTabModulesList($controllerId)) {
$tab_modules_list = $this->filterTabModuleList($tab_modules_list);
}
$back = Tools::getValue('back_tab_modules_list');
if ($back) {
$back .= '&tab_modules_open=1';
}
$modules_list = array('installed' =>array(), 'not_installed' => array());
if ($tab_modules_list) {
$tab_modules_list = explode(',', $tab_modules_list);
$modules_list_unsort = $this->getModulesByInstallation($tab_modules_list);
if (count($tab_modules_list['slider_list'])) {
$modules_list_unsort = $this->getModulesByInstallation($tab_modules_list['slider_list']);
}
$installed = $uninstalled = array();
foreach ($tab_modules_list as $key => $value) {
foreach ($tab_modules_list['slider_list'] as $key => $value) {
$continue = 0;
foreach ($modules_list_unsort['installed'] as $mod_in) {
if ($mod_in->name == $value) {
@@ -551,7 +579,7 @@ class AdminModulesControllerCore extends AdminController
}
}
public function postProcessDownload()
public function postProcessDownload($redirect = true)
{
/* PrestaShop demo mode */
if (_PS_MODE_DEMO_ || ($this->context->mode == Context::MODE_HOST)) {
@@ -593,7 +621,7 @@ class AdminModulesControllerCore extends AdminController
} elseif (!move_uploaded_file($_FILES['file']['tmp_name'], _PS_MODULE_DIR_.$_FILES['file']['name'])) {
$this->errors[] = Tools::displayError('An error occurred while copying the archive to the module directory.');
} else {
$this->extractArchive(_PS_MODULE_DIR_.$_FILES['file']['name']);
$this->extractArchive(_PS_MODULE_DIR_.$_FILES['file']['name'], $redirect);
}
} else {
$this->errors[] = Tools::displayError('You do not have permission to add this.');
@@ -709,12 +737,9 @@ class AdminModulesControllerCore extends AdminController
return;
}
if ($key == 'check') {
$this->ajaxProcessRefreshModuleList(true);
} elseif ($key == 'checkAndUpdate') {
if ($key == 'checkAndUpdate') {
$modules = array();
$this->ajaxProcessRefreshModuleList(true);
$modules_on_disk = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee);
$modules_on_disk = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee, true);
// Browse modules list
foreach ($modules_on_disk as $km => $module_on_disk) {
@@ -769,6 +794,7 @@ class AdminModulesControllerCore extends AdminController
array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
// array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
// array('type' => 'addonsMustHave', 'file' => Module::CACHE_FILE_MUST_HAVE_MODULES_LIST, 'loggedOnAddons' => 1),
array('type' => 'addonsMustHave', 'file' => Module::CACHE_FILE_ADDONS_MODULES_LIST, 'loggedOnAddons' => 1),
);
foreach ($files_list as $f) {
@@ -782,6 +808,9 @@ class AdminModulesControllerCore extends AdminController
$module_to_update[$name]['name'] = $modaddons->name;
$module_to_update[$name]['displayName'] = $modaddons->displayName;
$module_to_update[$name]['need_loggedOnAddons'] = $f['loggedOnAddons'];
if ($modaddons->url) {
$module_to_update[$name]['url'] = $modaddons->url;
}
}
}
}
@@ -790,7 +819,8 @@ class AdminModulesControllerCore extends AdminController
foreach ($module_to_update as $name => $attr) {
if ((is_null($attr) && $this->logged_on_addons == 0) || ($attr['need_loggedOnAddons'] == 1 && $this->logged_on_addons == 0)) {
$this->errors[] = sprintf(Tools::displayError('You need to be logged in to your PrestaShop Addons account in order to update the %s module. %s'), '<strong>'.$name.'</strong>', '<a href="#" class="addons_connect" data-toggle="modal" data-target="#modal_addons_connect" title="Addons">'.$this->l('Click here to log in.').'</a>');
$this->errors[] = sprintf(Tools::displayError('You need to be download this module from store in order to update the %s module. %s'), '<strong>'.$name.'</strong>', '<a href="'.$attr['url'].'" title="Store">'.$this->l('Click here to download.').'</a>');
// $this->errors[] = sprintf(Tools::displayError('You need to be logged in to your PrestaShop Addons account in order to update the %s module. %s'), '<strong>'.$name.'</strong>', '<a href="#" class="addons_connect" data-toggle="modal" data-target="#modal_addons_connect" title="Addons">'.$this->l('Click here to log in.').'</a>');
} elseif (!is_null($attr['name'])) {
$download_ok = false;
if ($attr['need_loggedOnAddons'] == 0 && file_put_contents(_PS_MODULE_DIR_.$name.'.zip', Tools::addonsRequest('module', array('module_name' => pSQL($attr['name']))))) {
@@ -1041,7 +1071,8 @@ class AdminModulesControllerCore extends AdminController
protected function getModulesByInstallation($tab_modules_list = null)
{
$all_modules = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee);
// $all_modules = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee);
$all_modules = Module::getSuggestedModules();
$all_unik_modules = array();
$modules_list = array('installed' =>array(), 'not_installed' => array());
@@ -1426,12 +1457,13 @@ class AdminModulesControllerCore extends AdminController
}
// Retrieve Modules List
$modules = Module::getModulesOnDisk(true, $this->logged_on_addons, $this->id_employee);
$modules = Module::getInstalledModulesOnDisk(true, $this->logged_on_addons, $this->id_employee);
$this->initModulesList($modules);
$this->nb_modules_total = count($modules);
$module_errors = array();
$module_success = array();
$upgrade_available = array();
$module_alerts = array();
$dont_filter = false;
//Add succes message for one module update
@@ -1514,7 +1546,7 @@ class AdminModulesControllerCore extends AdminController
$href = Context::getContext()->link->getAdminLink('AdminModules', true).'&module_name='.$module->name.'&tab_module='.$module->tab.'&configure='.$module->name;
$this->context->smarty->assign('text', sprintf($this->l('%1$s: %2$s'), $module->displayName, $module->warning));
$this->context->smarty->assign('module_link', $href);
$this->displayWarning($this->context->smarty->fetch('controllers/modules/warning_module.tpl'));
$module_alerts[] = $this->context->smarty->fetch('controllers/modules/warning_module.tpl');
}
// AutoComplete array
@@ -1540,7 +1572,7 @@ class AdminModulesControllerCore extends AdminController
}
unset($object);
if ($module->installed && isset($module->version_addons) && $module->version_addons) {
$upgrade_available[] = array('anchor' => ucfirst($module->name), 'name' => $module->name, 'displayName' => $module->displayName);
$upgrade_available[] = array('anchor' => ucfirst($module->name), 'name' => $module->name, 'displayName' => $module->displayName, 'is_native' => $module->is_native);
}
if (in_array($module->name, $this->list_partners_modules)) {
@@ -1578,6 +1610,7 @@ class AdminModulesControllerCore extends AdminController
$tpl_vars = array(
'token' => $this->token,
'upgrade_available' => $upgrade_available,
'module_alerts' => $module_alerts,
'currentIndex' => self::$currentIndex,
'dirNameCurrentIndex' => dirname(self::$currentIndex),
'ajaxCurrentIndex' => str_replace('index', 'ajax-tab', self::$currentIndex),
@@ -1648,4 +1681,192 @@ class AdminModulesControllerCore extends AdminController
));
$this->smartyOutputContent('controllers/modules/quickview.tpl');
}
public function ajaxProcessUploadModule()
{
$response = array('success' => false);
$this->postProcessDownload(false);
if (!count($this->errors)) {
$filename = $_FILES['file']['name'];
$filename = explode('.', $filename);
if ($module = Module::getInstanceByName($filename[0])) {
$response['success'] = true;
if (Module::isInstalled($module->name)) {
$response['msg'] = $this->l('module already installed, update if available');
} else {
$response['msg'] = $this->l('module uploaded successfully');
}
if (@filemtime(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.basename(_PS_MODULE_DIR_).DIRECTORY_SEPARATOR.$module->name
.DIRECTORY_SEPARATOR.'logo.png')) {
$module->image = _MODULE_DIR_.DIRECTORY_SEPARATOR.$module->name
.DIRECTORY_SEPARATOR.'logo.png';
}
$response['data']['module'] = array(
'module_name' => $module->name,
'displayName' => $module->displayName,
'installed' => Module::isInstalled($module->name),
'author' => $module->author,
'image' => $module->image ? $module->image : ''
);
}
} else {
$response['errors'] = $this->errors;
}
$this->logAndResponseAjax($response);
}
public function ajaxProcessCheckModuleTrusted()
{
$response = array(
'success' => false,
'data' => array('trusted' => false)
);
if ($moduleName = Tools::getValue('module_name')) {
if ($module = Module::getInstanceByName($moduleName)) {
if ($response['data']['trusted'] = Module::isModuleTrusted($moduleName)) {
$response['msg'] = $this->l('Module trusted');
} else {
$response['msg'] = $this->l('Module not trusted');
}
$response['success'] = true;
} else {
$this->errors[] = $this->l('Module not found.');
}
} else {
$this->errors[] = $this->l('Invalid module provided');
}
$response['errors'] = $this->errors;
$this->logAndResponseAjax($response);
}
public function ajaxProcessInstallModule()
{
$response = array(
'success' => false,
);
if ($moduleName = Tools::getValue('module_name')) {
if ($module = Module::getInstanceByName($moduleName)) {
if (!Module::isInstalled($module->name)) {
if ($response['success'] = $module->install()) {
$response['msg'] = $this->l('Module installed successfully');
$response['data']['redirect'] = $this->context->link->getAdminLink('AdminModules').'&conf=12&anchor='.$module->name;
} else {
$this->errors[] = $this->l('Cannot install this module.');
}
} else {
$response['success'] = true;
$response['msg'] = $this->l('Module already installed');
}
} else {
$this->errors[] = $this->l('Module not found.');
}
}
if (count($this->errors)) {
$response['data']['callback']['process'] = 'delete';
$response['data']['callback']['msg'] = $this->l('There was some error while installing the module, do you want to delete the uploded module');
$response['errors'] = $this->errors;
}
$this->logAndResponseAjax($response);
}
public function ajaxProcessRollbackModuleUpload()
{
$response = array(
'success' => false
);
$process = Tools::getValue('process');
if ($moduleName = Tools::getValue('module_name')) {
if($process == 'disable') {
if ($module = Module::getInstanceByName($moduleName)) {
if (Module::isInstalled($module->name)) {
$module->disable();
$response['success'] = true;
$response['msg'] = $this->l('Module disable successfully');
$response['data']['redirect'] = $this->context->link->getAdminLink('AdminModules').'&conf=5';
}
}
} else if($process == 'delete' || $process == 'uninstall') {
if ($module = Module::getInstanceByName($moduleName)) {
if (Module::isInstalled($module->name)) {
if ($module->uninstall()) {
if ($process == 'uninstall') {
$response['success'] = true;
$response['msg'] = $this->l('Module uninstall process completed');
$response['data']['redirect'] = $this->context->link->getAdminLink('AdminModules').'&conf=22';
}
}
}
}
if($process == 'delete') {
if (is_dir(_PS_MODULE_DIR_.$moduleName)) {
$this->recursiveDeleteOnDisk(_PS_MODULE_DIR_.$moduleName);
$response['success'] = true;
$response['msg'] = $this->l('Module rollback process completed');
$response['data']['redirect'] = $this->context->link->getAdminLink('AdminModules').'&conf=22';
}
}
}
}
$response['errors'] = $this->errors;
$this->logAndResponseAjax($response);
}
public function ajaxProcessUpdateModule()
{
$response = array(
'success' => false
);
if ($moduleName = Tools::getValue('module_name')) {
if ($module = Module::getInstanceByName($moduleName)) {
if ($installed = Module::getModuleInstallVersion($module->name)) {
$module->installed = (bool)$installed;
$module->database_version = $installed['version'];
if (Module::initUpgradeModule($module)) {
if (!class_exists($module->name)) {
require_once(_PS_MODULE_DIR_.$module->name.'/'.$module->name.'.php');
}
if ($object = Adapter_ServiceLocator::get($module->name)) {
$object->runUpgradeModule();
if ((count($errors_module_list = $object->getErrors()))) {
$this->errors = array_merge($this->errors, array('name' => $module->displayName, 'message' => $errors_module_list));
} elseif ((count($conf_module_list = $object->getConfirmations()))) {
$response['data']['upgrade'][] = array('name' => $module->displayName, 'message' => $conf_module_list);
$response['success'] = true;
$html = $this->generateHtmlMessage($response['data']['upgrade']);
$response['msg'] = sprintf($this->l('The following module was upgraded successfully: %s.'), $html);
$response['data']['redirect'] = $this->context->link->getAdminLink('AdminModules').'&conf=29&anchor='.$module->name;
}
unset($object);
} else {
$this->errors[] = $this->l('Module not found!');
}
} else {
$this->errors[] = $this->l('There was some error while updating the module');
}
} else {
$this->errors[] = $this->l('Module not installed, install module before updating.');
}
} else {
$this->errors[] = $this->l('Module not found!');
}
}
if (count($this->errors)) {
$response['data']['callback']['process'] = 'disable';
$response['data']['callback']['msg'] = $this->l('There was some error while updating the module, do you want to disable the module');
$response['errors'] = $this->errors;
}
$this->logAndResponseAjax($response);
}
public function logAndResponseAjax($response)
{
if (isset($response['errors']) && count($response['errors'])) {
PrestaShopLogger::addLog('Module install/upload error : Resquest => '.json_encode(Tools::getAllValues()).' || Response =>'.(json_encode($response)), 1, null, 'Module', null, true, (int)$this->context->employee->id);
}
$this->ajaxDie(json_encode($response));
}
}

View File

@@ -75,7 +75,7 @@ class AdminOrderPreferencesControllerCore extends AdminController
),*/
'PS_GUEST_CHECKOUT_ENABLED' => array(
'title' => $this->l('Enable guest checkout'),
'hint' => $this->l('Allow guest visitors to place an order without registering.'),
'hint' => $this->l('Allow guest visitors to place an order without registration.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
@@ -120,8 +120,8 @@ class AdminOrderPreferencesControllerCore extends AdminController
)
),
'PS_CONDITIONS_CMS_ID' => array(
'title' => $this->l('CMS page for the Conditions of use'),
'hint' => $this->l('Choose the CMS page which contains your store\'s conditions of use.'),
'title' => $this->l('CMS page for Terms and Conditions'),
'hint' => $this->l('Choose the CMS page which contains your website\'s Terms and Conditions.'),
'validation' => 'isInt',
'type' => 'select',
'list' => $cms_tab,
@@ -157,8 +157,8 @@ class AdminOrderPreferencesControllerCore extends AdminController
'type' => 'bool'
),
'PS_ORDER_CONF_MAIL_TO_EMPLOYEE' => array(
'title' => $this->l('Order confirmation mail to employee'),
'hint' => $this->l('Enable, if you want to send order confirmation email to the employees with profiles which have permission to manage the hotel.'),
'title' => $this->l('Order confirmation mail to employees'),
'hint' => $this->l('Enable, if you want to send order confirmation email to employees having permission to manage the hotel.'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
@@ -185,7 +185,7 @@ class AdminOrderPreferencesControllerCore extends AdminController
$sql = 'SELECT `id_cms` FROM `'._DB_PREFIX_.'cms`
WHERE id_cms = '.(int)Tools::getValue('PS_CONDITIONS_CMS_ID');
if (Tools::getValue('PS_CONDITIONS') && (Tools::getValue('PS_CONDITIONS_CMS_ID') == 0 || !Db::getInstance()->getValue($sql))) {
$this->errors[] = Tools::displayError('Assign a valid CMS page if you want it to be read.');
$this->errors[] = Tools::displayError('Please assign a valid CMS page for Terms and Conditions.');
}
}
}

View File

@@ -803,7 +803,11 @@ class AdminOrdersControllerCore extends AdminController
$this->errors[] = Tools::displayError('The date is invalid');
} else {
if (!$order->addOrderPayment($amount, Tools::getValue('payment_method'), Tools::getValue('payment_transaction_id'), $currency, Tools::getValue('payment_date'), $order_invoice)) {
$this->errors[] = Tools::displayError('An error occurred during payment.');
if (!validate::isPrice($order->total_paid_real)) {
$this->errors[] = Tools::displayError('Order total payments cannot be less than 0.');
} else {
$this->errors[] = Tools::displayError('An error occurred during payment.');
}
} else {
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token);
}

View File

@@ -43,7 +43,7 @@ class AdminPPreferencesControllerCore extends AdminController
$this->fields_options = array(
'products' => array(
'title' => $this->l('Products (general)'),
'title' => $this->l('Room Types (General)'),
'fields' => array(
'PS_CATALOG_MODE' => array(
'title' => $this->l('Catalog mode'),
@@ -62,7 +62,8 @@ class AdminPPreferencesControllerCore extends AdminController
// 'type' => 'text'
// ),
'PS_NB_DAYS_NEW_PRODUCT' => array(
'title' => $this->l('Number of days for which the product is considered \'new\''),
'title' => $this->l('Number of days for which a room type is considered \'new\''),
'hint' => $this->l('The counting of days starts from room type creation date.'),
'validation' => 'isUnsignedInt',
'cast' => 'intval',
'type' => 'text'
@@ -82,7 +83,7 @@ class AdminPPreferencesControllerCore extends AdminController
),*/
'PS_PRODUCT_SHORT_DESC_LIMIT' => array(
'title' => $this->l('Max size of short description'),
'hint' => $this->l('Set the maximum size of product short description (in characters).'),
'hint' => $this->l('Set the maximum size of room type short description (in characters).'),
'validation' => 'isInt',
'cast' => 'intval',
'type' => 'text',
@@ -124,31 +125,31 @@ class AdminPPreferencesControllerCore extends AdminController
'title' => $this->l('Pagination'),
'fields' => array(
'PS_PRODUCTS_PER_PAGE' => array(
'title' => $this->l('Products per page'),
'hint' => $this->l('Number of products displayed per page. Default is 10.'),
'title' => $this->l('Room types per page'),
'hint' => $this->l('Number of room types displayed per page. Default is 10.'),
'validation' => 'isUnsignedInt',
'cast' => 'intval',
'type' => 'text'
),
'PS_PRODUCTS_ORDER_BY' => array(
'title' => $this->l('Default order by'),
'hint' => $this->l('The order in which products are displayed in the product list.'),
'hint' => $this->l('The order in which room types are displayed in the room type list.'),
'type' => 'select',
'list' => array(
array('id' => '0', 'name' => $this->l('Product name')),
array('id' => '1', 'name' => $this->l('Product price')),
array('id' => '2', 'name' => $this->l('Product add date')),
array('id' => '3', 'name' => $this->l('Product modified date')),
array('id' => '4', 'name' => $this->l('Position inside category')),
array('id' => '5', 'name' => $this->l('Manufacturer')),
array('id' => '6', 'name' => $this->l('Product quantity')),
array('id' => '7', 'name' => $this->l('Product reference'))
array('id' => '0', 'name' => $this->l('Room type name')),
array('id' => '1', 'name' => $this->l('Room type price')),
array('id' => '2', 'name' => $this->l('Room type add date')),
array('id' => '3', 'name' => $this->l('Room type modified date')),
// array('id' => '4', 'name' => $this->l('Position inside category')),
// array('id' => '5', 'name' => $this->l('Manufacturer')),
// array('id' => '6', 'name' => $this->l('Product quantity')),
// array('id' => '7', 'name' => $this->l('Product reference'))
),
'identifier' => 'id'
),
'PS_PRODUCTS_ORDER_WAY' => array(
'title' => $this->l('Default order method'),
'hint' => $this->l('Default order method for product list.'),
'hint' => $this->l('Default order method for room type list.'),
'type' => 'select',
'list' => array(
array(
@@ -166,7 +167,7 @@ class AdminPPreferencesControllerCore extends AdminController
'submit' => array('title' => $this->l('Save'))
),
'fo_product_page' => array(
'title' => $this->l('Product page'),
'title' => $this->l('Room type page'),
'fields' => array(
/* 'PS_DISPLAY_QTIES' => array(
'title' => $this->l('Display available quantities on the product page'),
@@ -184,7 +185,7 @@ class AdminPPreferencesControllerCore extends AdminController
'type' => 'text'
),*/
'PS_DISPLAY_JQZOOM' => array(
'title' => $this->l('Enable JqZoom instead of Fancybox on the product page'),
'title' => $this->l('Enable JqZoom instead of Fancybox on room type page'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,

View File

@@ -92,12 +92,6 @@ class AdminPaymentControllerCore extends AdminController
$this->toolbar_title = array_unique($this->breadcrumbs);
}
public function initPageHeaderToolbar()
{
parent::initPageHeaderToolbar();
$this->page_header_toolbar_btn = array();
}
public function postProcess()
{
if (Tools::getValue('action') == 'GetModuleQuickView' && Tools::getValue('ajax') == '1') {
@@ -274,40 +268,4 @@ class AdminPaymentControllerCore extends AdminController
return parent::renderView();
}
public function renderModulesList()
{
if ($this->getModulesList($this->filter_modules_list)) {
$active_list = array();
foreach ($this->modules_list as $key => $module) {
if (in_array($module->name, $this->list_partners_modules)) {
$this->modules_list[$key]->type = 'addonsPartner';
}
if (isset($module->description_full) && trim($module->description_full) != '') {
$module->show_quick_view = true;
}
if ($module->active) {
$active_list[] = $module;
} else {
$unactive_list[] = $module;
}
}
$helper = new Helper();
$fetch = '';
if (isset($active_list)) {
$this->context->smarty->assign('panel_title', $this->l('Active payment'));
$fetch = $helper->renderModulesList($active_list);
}
$this->context->smarty->assign(array(
'panel_title' => $this->l('Recommended payment gateways'),
'view_all' => true
));
$fetch .= $helper->renderModulesList($unactive_list);
return $fetch;
}
}
}

View File

@@ -113,7 +113,6 @@ class AdminProductsControllerCore extends AdminController
'Configuration' => $this->l('Configuration'),
'Occupancy' => $this->l('Occupancy'),
'LengthOfStay' => $this->l('Length of Stay'),
'Booking' => $this->l('Booking Information'),
);
$this->available_tabs = array('Warehouses' => 14);
@@ -135,7 +134,6 @@ class AdminProductsControllerCore extends AdminController
'Configuration' => 14,
'Occupancy' => 15,
'LengthOfStay' => 16,
'Booking' => 17,
));
}
@@ -1625,10 +1623,7 @@ class AdminProductsControllerCore extends AdminController
$this->addJS(_PS_JS_DIR_.'jquery/plugins/select2/select2_locale_'.$this->context->language->iso_code.'.js');
$this->addJS(_PS_JS_DIR_.'jquery/plugins/validate/localization/messages_'.$this->context->language->iso_code.'.js');
$this->addCSS(array(
_PS_JS_DIR_.'jquery/plugins/timepicker/jquery-ui-timepicker-addon.css',
_PS_CSS_DIR_.'ps-hotel-reservation.css',
));
$this->addCSS(_PS_JS_DIR_.'jquery/plugins/timepicker/jquery-ui-timepicker-addon.css');
}
}
@@ -2233,9 +2228,6 @@ class AdminProductsControllerCore extends AdminController
if ($this->isTabSubmitted('Configuration')) {
$this->processConfiguration();
}
if ($this->isTabSubmitted('Booking')) {
$this->processBooking();
}
$this->updatePackItems($object);
// Disallow avanced stock management if the product become a pack
@@ -3389,7 +3381,7 @@ class AdminProductsControllerCore extends AdminController
foreach ($hotelRoomInfo as &$room) {
if ($room['id_status'] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) {
$disabledDates = $objRoomDisableDates->getRoomDisableDates($room['id']);
$room['disabled_dates_json'] = json_encode($disabledDates);
$room['disable_dates_json'] = json_encode($disabledDates);
}
}
$data->assign('htl_room_info', $hotelRoomInfo);
@@ -3401,8 +3393,8 @@ class AdminProductsControllerCore extends AdminController
'product' => $obj,
'htl_info' => $hotelInfo,
'rm_status' => $roomStatus,
'datesMissing' => $this->l('Please fill all Date From and Date To'),
'datesOverlapping' => $this->l('Some date are conflicting with each other. Please check and reselect the date ranges.'),
'datesMissing' => $this->l('Some dates are missing. Please select all the date ranges.'),
'datesOverlapping' => $this->l('Some dates are conflicting with each other. Please check and reselect the date ranges.'),
)
);
} else {
@@ -3477,7 +3469,7 @@ class AdminProductsControllerCore extends AdminController
}
}
}
// send information for the length of stay tab
public function initFormLengthOfStay($product)
{
@@ -3613,121 +3605,88 @@ class AdminProductsControllerCore extends AdminController
}
}
public function validateDisableDateRanges($disableDates)
public function validateDisableDateRanges($disableDates, $index)
{
if (count($disableDates)) {
foreach ($disableDates as $disable_key => $disableDate) {
if (!$disableDate['date_to'] && !$disableDate['date_from']) {
unset($disableDates[$disable_key]);
} elseif (!Validate::isDate($disableDate['date_from']) || !Validate::isDate($disableDate['date_to'])) {
$this->errors[] = Tools::displayError('Please fill valid date in disable date fields.');
$this->errors[] = sprintf(
Tools::displayError('Please add valid disable dates for %s room.'),
$index
);
} elseif (($disableDate['date_from'] && !$disableDate['date_to']) || (!$disableDate['date_from'] && $disableDate['date_to'])) {
$this->errors[] = Tools::displayError('Please fill all date from and date to for disable dates fields.');
$this->errors[] = sprintf(
Tools::displayError('Please fill date from and date to for disable dates for %s room.'),
$index
);
} else {
foreach ($disableDates as $key => $disDate) {
if ($key != $disable_key) {
if ((($disableDate['date_from'] < $disDate['date_from']) && ($disableDate['date_to'] <= $disDate['date_from'])) || (($disableDate['date_from'] > $disDate['date_from']) && ($disableDate['date_from'] >= $disDate['date_to']))) {
// continue
} else {
$this->errors[] = Tools::displayError('Some date are conflicting with each other. Please check and reselect the date ranges.');
$this->errors[] = sprintf(
Tools::displayError('Disable dates are conflicting for %s room. Please add non-conflicting dates.'),
$index
);
}
}
}
}
}
} else {
$this->errors[] = Tools::displayError('Please add dates for status temporary inactive.');
$this->errors[] = sprintf(Tools::displayError('Please add disable dates for %s room.'), $index);
}
}
public function processConfiguration()
{
/*Check if save of configuration tab is submitted*/
// Check if save of configuration tab is submitted
if (Tools::getValue('checkConfSubmit')) {
// htl_room_type id field use only in edit case
$wk_id_room_type = Tools::getValue('wk_id_room_type');
$id_product = Tools::getValue('id_product'); //room type
$id_product = Tools::getValue('id_product');
$id_hotel = Tools::getValue('id_hotel');
if (!$id_product || !Validate::isUnsignedInt($id_product)) {
$this->errors[] = Tools::displayError('There is some problem while setting room information');
$this->errors[] = Tools::displayError('There is some problem while setting room information.');
}
if (!$id_hotel || !Validate::isUnsignedInt($id_hotel)) {
$this->errors[] = Tools::displayError('Please select a hotel');
$this->errors[] = Tools::displayError('Please select a hotel.');
}
$this->validateConfigurationPostData();
if (!count($this->errors)) {
$room_numbers = Tools::getValue('room_num');
if ($room_numbers) {
$room_floor = Tools::getValue('room_floor');
$room_comment = Tools::getValue('room_comment');
$disable_dates = Tools::getValue('disableDatesJSON');
$room_status = Tools::getValue('room_status');
$roomsInfo = Tools::getValue('rooms_info');
if (is_array($roomsInfo) && count($roomsInfo)) {
foreach ($roomsInfo as $roomInfo) {
$objHotelRoomInfo = null;
if (isset($roomInfo['id']) && $roomInfo['id']) {
$objHotelRoomInfo = new HotelRoomInformation($roomInfo['id']);
} else {
$objHotelRoomInfo = new HotelRoomInformation();
}
$objHotelRoomInfo->id_product = $id_product;
$objHotelRoomInfo->id_hotel = $id_hotel;
$objHotelRoomInfo->room_num = $roomInfo['room_num'];
$objHotelRoomInfo->id_status = $roomInfo['id_status'];
$objHotelRoomInfo->floor = $roomInfo['floor'];
$objHotelRoomInfo->comment = $roomInfo['comment'];
if ($objHotelRoomInfo->save()) {
$idRoom = $objHotelRoomInfo->id;
if ($roomInfo['id_status'] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) {
$objHotelRoomDisableDates = new HotelRoomDisableDates();
$objHotelRoomDisableDates->deleteRoomDisableDates($idRoom);
if (count($room_numbers) != count($room_status)) {
$this->errors[] = Tools::displayError('There is some problem while setting room information');
} else {
//validate room number
foreach ($room_numbers as $roomNum) {
if (!$roomNum || !Validate::isGenericName($roomNum)) {
$this->errors[] = Tools::displayError('Invalid room number entered. please enter a valid room number.');
}
}
//validate room status
$disableDtsArr = array();
foreach ($room_status as $key => $status) {
if ($status == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) {
$disableDtsArr[$key] = json_decode($disable_dates[$key], true);
$this->validateDisableDateRanges($disableDtsArr[$key]);
}
}
}
if (!count($this->errors)) {
if ($wk_id_room_type) {
$objRoomType = new HotelRoomType($wk_id_room_type);
$id_hotel = $objRoomType->id_hotel;
}
// Associate categories to Room Type
$id_room_info = Tools::getValue('id_room_info');
$objCartBookingData = new HotelCartBookingData();
foreach ($room_numbers as $key => $value) {
if ($value) {
if ($id_room_info) {
if ($key <= (count($id_room_info) - 1)) {
$objRoomInfo = new HotelRoomInformation($id_room_info[$key]);
} else {
//if any new room is added at the time of edit
$objRoomInfo = new HotelRoomInformation();
$objRoomInfo->id_product = $id_product;
$objRoomInfo->id_hotel = $id_hotel;
}
} else {
$objRoomInfo = new HotelRoomInformation();
$objRoomInfo->id_product = $id_product;
$objRoomInfo->id_hotel = $id_hotel;
}
$objRoomInfo->room_num = $value;
$objRoomInfo->id_status = $room_status[$key];
$objRoomInfo->floor = $room_floor[$key];
$objRoomInfo->comment = $room_comment[$key];
if ($objRoomInfo->save()) {
if ($room_status[$key] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) {
$objDisDts = new HotelRoomDisableDates();
$objDisDts->deleteRoomDisableDates($objRoomInfo->id);
if (isset($disableDtsArr[$key]) && $disableDtsArr[$key]) {
// delete privious save dats
foreach ($disableDtsArr[$key] as $disDtRange) {
$objDisDts = new HotelRoomDisableDates();
$objDisDts->id_room_type = $id_product;
$objDisDts->id_room = $objRoomInfo->id;
$objDisDts->date_from = $disDtRange['date_from'];
$objDisDts->date_to = $disDtRange['date_to'];
$objDisDts->reason = $disDtRange['reason'];
$objDisDts->add();
}
}
}
$disableDates = json_decode($roomInfo['disable_dates_json'], true);
foreach ($disableDates as $disableDate) {
$objHotelRoomDisableDates = new HotelRoomDisableDates();
$objHotelRoomDisableDates->id_room_type = $id_product;
$objHotelRoomDisableDates->id_room = $idRoom;
$objHotelRoomDisableDates->date_from = $disableDate['date_from'];
$objHotelRoomDisableDates->date_to = $disableDate['date_to'];
$objHotelRoomDisableDates->reason = $disableDate['reason'];
$objHotelRoomDisableDates->add();
}
}
}
@@ -3737,6 +3696,49 @@ class AdminProductsControllerCore extends AdminController
}
}
public function validateConfigurationPostData()
{
$roomsInfo = Tools::getValue('rooms_info');
if (is_array($roomsInfo) && count($roomsInfo)) {
foreach ($roomsInfo as $key => $roomInfo) {
if (!$roomInfo['room_num']) {
unset($_POST['rooms_info'][$key]);
}
}
}
$roomsInfo = Tools::getValue('rooms_info'); // since $_POST['rooms_info'] has changed
if (is_array($roomsInfo) && count($roomsInfo)) {
$formatter = new NumberFormatter($this->context->language->language_code, NumberFormatter::ORDINAL);
foreach ($roomsInfo as $key => $roomInfo) {
$index = $formatter->format($key + 1);
if ($roomInfo['id_status'] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) {
if ($roomInfo['disable_dates_json'] === 0) {
$this->errors[] = sprintf(Tools::displayError('Please add disable dates for %s room.'), $index);
}
}
if ($roomInfo['room_num'] && !Validate::isGenericName($roomInfo['room_num'])) {
$this->errors[] = sprintf(Tools::displayError('Invalid room number for %s room.'), $index);
}
if ($roomInfo['floor'] && !Validate::isGenericName($roomInfo['floor'])) {
$this->errors[] = sprintf(Tools::displayError('Invalid floor for %s room.'), $index);
}
if ($roomInfo['id_status'] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) {
$disableDates = json_decode($roomInfo['disable_dates_json'], true);
if ($roomInfo['disable_dates_json'] !== 0) {
$this->validateDisableDateRanges($disableDates, $index);
}
}
}
} else {
$this->errors[] = Tools::displayError('Please add at least one room.');
}
}
public function ajaxProcessDeleteHotelRoom()
{
if ($this->tabAccess['edit'] == 1) {
@@ -3749,162 +3751,6 @@ class AdminProductsControllerCore extends AdminController
die('0');
}
/**
* @param Product $obj
*
* @throws Exception
* @throws PrestaShopException
* @throws SmartyException
*/
public function initFormBooking($obj)
{
$data = $this->createTemplate($this->tpl_form);
if ($obj->id) {
if ($this->product_exists_in_shop) {
$data->assign(array('product' => $obj));
$date_from = Tools::getValue('date_from');
$date_to = Tools::getValue('date_to');
$obj_rm_type = new HotelRoomType();
$obj_booking_dtl = new HotelBookingDetail();
$rm_info = $obj_rm_type->getRoomTypeInfoByIdProduct($obj->id);
if ($rm_info) {
if ($date_from && $date_to) {
$search_flag = 1;
$start_date = $date_from;
$last_date = $date_to;
} else {
$date_from = date('Y-m-d');
$date_to = date('Y-m-t');
$start_date = date('Y-m-01'); // hard-coded '01' for first day
$last_date = date('Y-m-t');
}
$bookingParams = array();
$bookingParams['date_from'] = $date_from;
$bookingParams['date_to'] = $date_to;
$bookingParams['hotel_id'] = $rm_info['id_hotel'];
$bookingParams['room_type'] = $obj->id;
$bookingParams['adult'] = $rm_info['adult'];
$bookingParams['children'] = $rm_info['children'];
$bookingParams['num_rooms'] = 0;
$bookingParams['only_active_roomtype'] = 0;
$booking_data = $obj_booking_dtl->getBookingData($bookingParams);
$bookingParams['for_calendar'] = 1;
while ($start_date <= $last_date) {
$cal_date_from = $start_date;
$cal_date_to = date('Y-m-d', strtotime('+1 day', strtotime($cal_date_from)));
$booking_calendar_data[$cal_date_from] = $obj_booking_dtl->getBookingData($bookingParams);
// if product is inactive then booking_details will be false
if (!$booking_calendar_data[$cal_date_from]) {
$booking_calendar_data[$cal_date_from]['stats']['num_avail'] = 0;
$booking_calendar_data[$cal_date_from]['stats']['num_part_avai'] = 0;
$booking_calendar_data[$cal_date_from]['stats']['num_unavail'] = 0;
$booking_calendar_data[$cal_date_from]['stats']['num_booked'] = 0;
}
$start_date = date('Y-m-d', strtotime('+1 day', strtotime($start_date)));
}
if (isset($search_flag) && $search_flag) {
if ($booking_data['stats']['num_avail'] > 0) {
$check_css_condition_var = 'available';
} elseif ($booking_data['stats']['num_part_avai'] > 0) {
$check_css_condition_var = 'part_available';
} else {
$check_css_condition_var = 'unavailable';
}
} else {
if ($booking_data['stats']['num_avail'] > 0) {
$check_css_condition_var = 'default_available';
} elseif ($booking_data['stats']['num_part_avai'] > 0) {
$check_css_condition_var = 'default_part_available';
} else {
$check_css_condition_var = 'default_unavailable';
}
}
$data->assign(
array(
'rooms_info' => $rm_info,
'check_calendar_var' => 1,
'date_from' => $date_from,
'date_to' => $date_to,
'booking_data' => $booking_data,
'booking_calendar_data' => $booking_calendar_data,
'htl_config' => 1,
'check_css_condition_var' => $check_css_condition_var,
)
);
} else {
$this->displayWarning($this->l('First you have to fill Room configuration.'));
}
} else {
$this->displayWarning($this->l('You must save the room type in this shop before managing hotel configuration.'));
}
} else {
$this->displayWarning($this->l('You must save this room type to see the booking information.'));
}
$this->tpl_form_vars['custom_form'] = $data->fetch();
}
public function processBooking()
{
if (Tools::isSubmit('submitAddproductAndStay')) {
$checkTabClick = Tools::getValue('checkTabClick');
$date_from = Tools::getValue('from_date');
$date_to = Tools::getValue('to_date');
$num_rooms = Tools::getValue('num_rooms');
$id_product = Tools::getValue('id_product');
$link = new Link();
if ($checkTabClick) {
Tools::redirectAdmin($link->getAdminLink('AdminProducts').'&id_product='.$id_product.'&updateproduct&key_tab=Booking&date_from='.$date_from.'&date_to='.$date_to);
}
}
}
public function ajaxProcessProductRoomsBookingDetailsOnMonthChange()
{
$month = Tools::getValue('month');
$year = Tools::getValue('year');
$query_date = $year.'-'.$month.'-04';
$start_date = date('Y-m-01', strtotime($query_date)); // hard-coded '01' for first day
$last_day_this_month = date('Y-m-t', strtotime($query_date));
$hotel_id = Tools::getValue('id_hotel');
$room_type = Tools::getValue('id_product');
$adult = Tools::getValue('num_adults');
$children = Tools::getValue('num_children');
$num_rooms = 1;
$obj_booking_dtl = new HotelBookingDetail();
$bookingParams = array();
$bookingParams['hotel_id'] = $hotel_id;
$bookingParams['room_type'] = $room_type;
$bookingParams['adult'] = $adult;
$bookingParams['children'] = $children;
$bookingParams['num_rooms'] = $num_rooms;
$bookingParams['for_calendar'] = 1;
while ($start_date <= $last_day_this_month) {
$cal_date_from = $start_date;
$cal_date_to = date('Y-m-d', strtotime($cal_date_from) + 86400);
$bookingParams['date_from'] = $cal_date_from;
$bookingParams['date_to'] = $cal_date_to;
$booking_calendar_data[$cal_date_from] = $obj_booking_dtl->getBookingData($bookingParams);
$start_date = date('Y-m-d', strtotime($start_date) + 86400);
}
if ($booking_calendar_data) {
die(json_encode($booking_calendar_data));
} else {
die(0);
}
}
/**
* @param Product $obj
*

View File

@@ -41,7 +41,6 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
}
$this->initTabModuleList();
$this->addToolBarModulesListButton();
$this->toolbar_title = $this->l('Stats', 'AdminStatsTab');
$this->initPageHeaderToolbar();
if ($this->display == 'view') {

View File

@@ -449,14 +449,14 @@ class AdminStoresControllerCore extends AdminController
$formFields = array(
'PS_SHOP_NAME' => array(
'title' => $this->l('Shop name'),
'title' => $this->l('Website name'),
'hint' => $this->l('Displayed in emails and page titles.'),
'validation' => 'isGenericName',
'required' => true,
'type' => 'text',
'no_escape' => true,
),
'PS_SHOP_EMAIL' => array('title' => $this->l('Shop email'),
'PS_SHOP_EMAIL' => array('title' => $this->l('Website email'),
'hint' => $this->l('Displayed in emails sent to customers.'),
'validation' => 'isEmail',
'required' => true,
@@ -464,19 +464,19 @@ class AdminStoresControllerCore extends AdminController
),
'PS_SHOP_DETAILS' => array(
'title' => $this->l('Registration number'),
'hint' => $this->l('Shop registration information (e.g. SIRET or RCS).'),
'hint' => $this->l('Website registration information (e.g. SIRET or RCS).'),
'validation' => 'isGenericName',
'type' => 'textarea',
'cols' => 30,
'rows' => 5
),
'PS_SHOP_ADDR1' => array(
'title' => $this->l('Shop address line 1'),
'title' => $this->l('Address line 1'),
'validation' => 'isAddress',
'type' => 'text'
),
'PS_SHOP_ADDR2' => array(
'title' => $this->l('Shop address line 2'),
'title' => $this->l('Address line 2'),
'validation' => 'isAddress',
'type' => 'text'
),

View File

@@ -506,7 +506,7 @@ class AdminThemesControllerCore extends AdminController
) {
return false;
}
if (!$this->isFresh(Theme::CACHE_FILE_CUSTOMER_THEMES_LIST, 86400)) {
if (!$this->isFresh(Theme::CACHE_FILE_CUSTOMER_THEMES_LIST, _TIME_1_DAY_)) {
file_put_contents(_PS_ROOT_DIR_.Theme::CACHE_FILE_CUSTOMER_THEMES_LIST, Tools::addonsRequest('customer_themes'));
}
@@ -2075,6 +2075,15 @@ class AdminThemesControllerCore extends AdminController
}
}
break;
case 3:
foreach ($xml->modules as $row) {
if ($row['type'] == 'disk') {
foreach ($row->module as $row2) {
$natives[] = (string)$row2['name'];
}
}
}
break;
}
if (count($natives) > 0) {

View File

@@ -287,7 +287,8 @@ class ContactControllerCore extends FrontController
}
}
}
$contactKey = md5(uniqid(microtime(), true));
$contactKey = md5(uniqid(microtime(), true));
$this->context->cookie->__set('contactFormKey', $contactKey);
$this->context->smarty->assign(
array(
@@ -297,7 +298,7 @@ class ContactControllerCore extends FrontController
'gblHtlAddress' => $gblHtlAddress,
'contacts' => Contact::getContacts($this->context->language->id),
'message' => html_entity_decode(Tools::getValue('message')),
'contactKey' => $contactKey,
'contactKey' => $contactKey,
)
);

View File

@@ -63,6 +63,13 @@ class ProductControllerCore extends FrontController
if (Configuration::get('PS_DISPLAY_JQZOOM') == 1) {
$this->addJqueryPlugin('jqzoom');
}
if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
$this->addJS(
'https://maps.googleapis.com/maps/api/js?key='.$PS_API_KEY.'&libraries=places&language='.
$this->context->language->iso_code.'&region='.$this->context->country->iso_code
);
}
}
public function canonicalRedirection($canonical_url = '')
@@ -324,6 +331,21 @@ class ProductControllerCore extends FrontController
}
/*End*/
$hotelImageLink = null;
if ($coverImage = HotelImage::getCover($hotel_id)) {
$hotelImagesBaseDir = _MODULE_DIR_.'hotelreservationsystem/views/img/hotel_img/';
$hotelImageLink = $this->context->link->getMediaLink(
$hotelImagesBaseDir.$coverImage['hotel_image_id'].'.jpg'
);
}
Media::addJsDef(array(
'hotel_loc' => array(
'latitude' => $hotel_branch_obj->latitude,
'longitude' => $hotel_branch_obj->longitude,
)
));
if (Tools::getValue('error')) {
$this->context->smarty->assign('error', Tools::getValue('error'));
}
@@ -340,9 +362,15 @@ class ProductControllerCore extends FrontController
'hotel_check_in' => date('h:i a', strtotime($hotel_branch_obj->check_in)),
'hotel_check_out' => date('h:i a', strtotime($hotel_branch_obj->check_out)),
'hotel_location' => $hotel_location,
'hotel_latitude' => $hotel_branch_obj->latitude,
'hotel_longitude' => $hotel_branch_obj->longitude,
'hotel_map_input_text' => $hotel_branch_obj->map_input_text,
'hotel_address1' => $addressInfo['address1'],
'hotel_phone' => $addressInfo['phone'],
'hotel_name' => $hotel_name,
'hotel_policies' => $hotel_policies,
'hotel_features' => $htl_features,
'hotel_image_link' => $hotelImageLink,
'hotel_has_images' => (bool) HotelImage::getCover($hotel_id),
'ftr_img_src' => _PS_IMG_.'rf/',
'order_date_restrict' => $order_date_restrict
@@ -425,6 +453,7 @@ class ProductControllerCore extends FrontController
'category-'.(isset($this->category) ? $this->category->getFieldByLang('link_rewrite') : ''),
),
'display_discount_price' => Configuration::get('PS_DISPLAY_DISCOUNT_PRICE'),
'display_google_maps' => Configuration::get('WK_GOOGLE_ACTIVE_MAP'),
)
);
}

View File

@@ -1,266 +0,0 @@
/* ---- AdminProducts (Booking) by webkul---- */
.margin-leftrgt-0
{
margin-left: 0px !important;
margin-right: 0px !important;
}
.no_border
{
border: none !important;
}
.hr_style
{
border-color: #c7d6db !important;
margin: 10px 0 !important;
}
.padding-top-btm-30
{
padding-bottom: 30px;
padding-top: 30px;
}
.bg-green
{
background-color: #7EC77B;
}
.bg-yellow
{
background-color: #DCC635;
}
.bg-red
{
background-color: #CD5D5D;
}
.bg-gray
{
background-color: #C2C2C2;
}
.htl_date_header
{
background-color: #2EACCE;
color: #FFFFFF;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
padding-bottom: 15px;
padding-top: 15px;
margin-bottom: -2px;
}
.htl_date_disp
{
font-size: 105px;
color: #FFFFFF;
font-weight: 300;
font-family: inherit;
margin-bottom: 0px !important;
line-height: 100px;
}
.htl_month_disp
{
font-size: 18px;
color: #FFFFFF;
font-weight: 400;
font-family: inherit;
margin-left: 7px !important;
}
.hotel_date .ui-datepicker
{
border: 1px solid #c7d6db;
border-top-left-radius: 0;
border-top-right-radius: 0;
width: 100%;
}
.hotel_date .ui-datepicker-header
{
border: medium none;
}
.hotel_date .ui-datepicker-next:hover, .hotel_date .ui-datepicker-next:focus, .hotel_date .ui-datepicker-next:active, .hotel_date .ui-datepicker-prev:hover, .hotel_date .ui-datepicker-prev:focus, .hotel_date .ui-datepicker-prev:active
{
outline: none;
}
.hotel_date .ui-datepicker-prev span
{
background-position: -97px 0;
}
.hotel_date .ui-datepicker-next span
{
background-position: -33px 0;
}
.htl_room_data_cont
{
border: 1px solid #C7D6DB;
border-radius: 4px;
padding: 15px !important;
}
.htl_room_cat_data
{
border-right: 1px solid #C7D6DB;
text-align: center;
padding-bottom: 30px;
padding-top: 30px;
}
.room_cat_header
{
font-size: 15px;
color: #252525;
font-weight: 400;
text-transform: capitalize;
}
.room_cat_data
{
line-height: 85px;
font-size: 105px;
color: #252525;
font-weight: 300;
}
.color_indicate
{
width: 40px;
height: 40px;
border-radius: 50%;
float: left;
}
.indi_label
{
color: #252525;
display: block !important;
font-size: 14px;
font-weight: 400;
margin-left: 3px;
text-transform: capitalize;
transform: translate(4px, 6px) !important;
}
.indi_cont
{
margin: 20px 0px;
}
/* ---- AdminProducts (Booking) ---- */
/*booking Information*/
.hotel_date .margin-leftrgt-0
{
margin-left: 0px !important;
margin-right: 0px !important;
}
.hotel_date .no_border
{
border: none !important;
}
.hotel_date .ui-datepicker
{
border: 1px solid #c7d6db;
border-top-left-radius: 0;
border-top-right-radius: 0;
width: 100%;
}
/*.hotel_date .ui-state-active
{
border-radius: 50%;
}*/
.hotel_date .ui-datepicker td
{
padding: 14px!important;
}
.hotel_date .ui-state-default
{
border: none!important;
text-align: center!important;
padding: 10px!important;
}
.hotel_date .ui-datepicker-header
{
border: medium none;
}
.hotel_date .ui-datepicker-next:hover, .hotel_date .ui-datepicker-next:focus, .hotel_date .ui-datepicker-next:active, .hotel_date .ui-datepicker-prev:hover, .hotel_date .ui-datepicker-prev:focus, .hotel_date .ui-datepicker-prev:active
{
outline: none;
}
.ui-datepicker-prev span
{
background-position: -97px 0;
}
.ui-datepicker-next span
{
background-position: -33px 0;
}
.default_available .ui-state-default
{
background-color: #7ec77b!important;
color: #ffffff;
border-radius: 50%;
}
.default_part_available .ui-state-default
{
background-color: #dcc635!important;
border-radius: 50%;
color: #ffffff;
}
.default_unavailable .ui-state-default
{
background-color: #cd5d5d!important;
color: #ffffff;
border-radius: 50%;
}
.ui-datepicker-today
{
background-color:#008abd;
}
.available .ui-state-default
{
background-color: #7ec77b !important;
border-radius: 50%;
color: #ffffff;
}
.part_available .ui-state-default
{
background-color: #dcc635!important;
border-radius: 50%;
color: #ffffff;
}
.unavailable .ui-state-default
{
background-color: #cd5d5d !important;
border-radius: 50%;
color: #ffffff;
}
/* ----- For Advanced Payment in price.tpl of AdminProductController.php ----- */
/* ----- For Advanced Payment in price.tpl of AdminProductController.php ----- */

BIN
img/maintenance_banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -2689,3 +2689,11 @@ CREATE TABLE IF NOT EXISTS `PREFIX_cms_role_lang` (
PRIMARY KEY (`id_cms_role`,`id_lang`, id_shop)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `PREFIX_maintenance_access` (
`id_maintenance_access` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ip_address` varchar(50) NOT NULL,
`email` varchar(128) NOT NULL,
`date_add` datetime NOT NULL,
PRIMARY KEY (`id_maintenance_access`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;

View File

@@ -52,7 +52,6 @@ UPDATE `PREFIX_configuration` SET value = 'CAT3,CAT8,CAT5,LNK1' WHERE name = 'MO
UPDATE `PREFIX_configuration` SET value = '0' WHERE name = 'MOD_BLOCKTOPMENU_SEARCH';
UPDATE `PREFIX_configuration` SET value = 'https://www.facebook.com/qloapps' WHERE name = 'BLOCKSOCIAL_FACEBOOK';
UPDATE `PREFIX_configuration` SET value = 'https://twitter.com/qloapps' WHERE name = 'BLOCKSOCIAL_TWITTER';
UPDATE `PREFIX_configuration` SET value = 'https://plus.google.com/110221570427070809661' WHERE name = 'BLOCKSOCIAL_GOOGLE_PLUS';
UPDATE `PREFIX_configuration` SET value = 'My Company' WHERE name = 'BLOCKCONTACTINFOS_COMPANY';
UPDATE `PREFIX_configuration` SET value = '42 Puffin street\n12345 Puffinville\nFrance' WHERE name = 'BLOCKCONTACTINFOS_ADDRESS';
UPDATE `PREFIX_configuration` SET value = '0123-456-789' WHERE name = 'BLOCKCONTACTINFOS_PHONE';
@@ -130,6 +129,24 @@ UPDATE `PREFIX_hook_module` SET position = 3
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockbestsellers')
AND id_hook IN (@id_hook, @id_hook2);
/* displayLeftColumn */
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayLeftColumn');
UPDATE `PREFIX_hook_module` SET position = 1
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'wkroomsearchblock')
AND id_hook = @id_hook;
UPDATE `PREFIX_hook_module` SET position = 2
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'wkhotelfilterblock')
AND id_hook = @id_hook;
UPDATE `PREFIX_hook_module` SET position = 3
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'blockmyaccount')
AND id_hook = @id_hook;
UPDATE `PREFIX_hook_module` SET position = 4
WHERE id_module = (SELECT id_module FROM `PREFIX_module` WHERE name = 'hotelreservationsystem')
AND id_hook = @id_hook;
/* displayFooter */
SET @id_hook = (SELECT id_hook FROM `PREFIX_hook` WHERE name = 'displayFooter');
UPDATE `PREFIX_hook_module` SET position = 1

View File

@@ -11,6 +11,9 @@
<configuration id="PS_ONE_PHONE_AT_LEAST" name="PS_ONE_PHONE_AT_LEAST">
<value>1</value>
</configuration>
<configuration id="PS_CART_FOLLOWING" name="PS_CART_FOLLOWING">
<value>1</value>
</configuration>
<configuration id="PS_CARRIER_DEFAULT" name="PS_CARRIER_DEFAULT">
<value>1</value>
</configuration>

View File

@@ -186,6 +186,9 @@
<tab id="Modules_1" id_parent="Modules" active="1" hide_host_mode="0">
<class_name>AdminModules</class_name>
</tab>
<tab id="Modules_Catalog" id_parent="Modules" active="1" hide_host_mode="0">
<class_name>AdminModulesCatalog</class_name>
</tab>
<!-- <tab id="Modules_Themes_Catalog" id_parent="Modules" active="1" hide_host_mode="0">
<class_name>AdminAddonsCatalog</class_name>
</tab> -->

View File

@@ -69,6 +69,7 @@
<access id="access_3_59" id_profile="Logistician" id_tab="Taxes" view="0" add="0" edit="0" delete="0"/>
<access id="access_3_60" id_profile="Logistician" id_tab="Translations" view="0" add="0" edit="0" delete="0"/>
<access id="access_3_61" id_profile="Logistician" id_tab="Modules_1" view="1" add="0" edit="1" delete="0"/>
<access id="access_3_62" id_profile="Logistician" id_tab="Modules_Catalog" view="0" add="0" edit="0" delete="0"/>
<access id="access_3_62" id_profile="Logistician" id_tab="Modules_Themes_Catalog" view="0" add="0" edit="0" delete="0"/>
<access id="access_3_63" id_profile="Logistician" id_tab="Positions" view="0" add="0" edit="0" delete="0"/>
<access id="access_3_64" id_profile="Logistician" id_tab="Payment" view="0" add="0" edit="0" delete="0"/>
@@ -169,6 +170,7 @@
<access id="access_4_59" id_profile="Translator" id_tab="Taxes" view="0" add="0" edit="0" delete="0"/>
<access id="access_4_60" id_profile="Translator" id_tab="Translations" view="1" add="1" edit="1" delete="1"/>
<access id="access_4_61" id_profile="Translator" id_tab="Modules_1" view="0" add="0" edit="0" delete="0"/>
<access id="access_4_62" id_profile="Translator" id_tab="Modules_Catalog" view="0" add="0" edit="0" delete="0"/>
<access id="access_4_62" id_profile="Translator" id_tab="Modules_Themes_Catalog" view="0" add="0" edit="0" delete="0"/>
<access id="access_4_63" id_profile="Translator" id_tab="Positions" view="0" add="0" edit="0" delete="0"/>
<access id="access_4_64" id_profile="Translator" id_tab="Payment" view="0" add="0" edit="0" delete="0"/>
@@ -269,6 +271,7 @@
<access id="access_5_59" id_profile="Salesman" id_tab="Taxes" view="0" add="0" edit="0" delete="0"/>
<access id="access_5_60" id_profile="Salesman" id_tab="Translations" view="0" add="0" edit="0" delete="0"/>
<access id="access_5_61" id_profile="Salesman" id_tab="Modules_1" view="1" add="0" edit="1" delete="0"/>
<access id="access_5_62" id_profile="Salesman" id_tab="Modules_Catalog" view="0" add="0" edit="0" delete="0"/>
<access id="access_5_62" id_profile="Salesman" id_tab="Modules_Themes_Catalog" view="0" add="0" edit="0" delete="0"/>
<access id="access_5_63" id_profile="Salesman" id_tab="Positions" view="0" add="0" edit="0" delete="0"/>
<access id="access_5_64" id_profile="Salesman" id_tab="Payment" view="0" add="0" edit="0" delete="0"/>

View File

@@ -16,10 +16,10 @@
<link_rewrite>legal-notice</link_rewrite>
</cms>
<cms id="Terms_and_conditions_of_use">
<meta_title>Terms and conditions of use</meta_title>
<meta_description>Our terms and conditions of use</meta_description>
<meta_title>Terms and Conditions</meta_title>
<meta_description>Our Terms and Conditions</meta_description>
<meta_keywords>conditions, terms, use, sell</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -29,10 +29,10 @@
<link_rewrite>terms-and-conditions-of-use</link_rewrite>
</cms>
<cms id="About_us">
<meta_title>About us</meta_title>
<meta_title>About Us</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>about us, informations</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -4,6 +4,6 @@
<description>If a technical problem occurs on this website</description>
</contact>
<contact id="Customer_service" name="Customer service">
<description>For any question about a product, an order</description>
<description>For any query regarding a hotel or a booking</description>
</contact>
</entity_contact>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="Данъчни правила"/>
<tab id="Translations" name="Преводи"/>
<tab id="Modules_1" name="Модули и услуги"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Каталог с модули и теми"/>
<tab id="Positions" name="Разположение"/>
<tab id="Payment" name="Плащане"/>

View File

@@ -61,6 +61,7 @@
<tab id='Tax_Rules' name='শুল্ক নিয়ম'/>
<tab id='Translations' name='অনুবাদ'/>
<tab id='Modules_1' name='মডিউল'/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id='Modules_Themes_Catalog' name='মডিউল এবং থইম ক্যাটআলগ'/>
<tab id='Positions' name='অবস্থান'/>
<tab id='Payment' name='পরিশোধ'/>

View File

@@ -49,6 +49,7 @@
<!-- <tab id="Merchandise_Returns" name="Devolução de mercadoria"/> -->
<tab id="Modules_1" name="Módulos e Serviços"/>
<tab id="Modules" name="Módulos"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Catálogo de Módulos &amp; Temas"/>
<tab id="Monitoring" name="Monitoramento"/>
<tab id="Multistore" name="Multiloja"/>

View File

@@ -16,10 +16,10 @@
<link_rewrite>legal-notice</link_rewrite>
</cms>
<cms id="Terms_and_conditions_of_use">
<meta_title>Terms and conditions of use</meta_title>
<meta_description>Our terms and conditions of use</meta_description>
<meta_title>Terms and Conditions</meta_title>
<meta_description>Our Terms and Conditions</meta_description>
<meta_keywords>conditions, terms, use, sell</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -29,10 +29,10 @@
<link_rewrite>terms-and-conditions-of-use</link_rewrite>
</cms>
<cms id="About_us">
<meta_title>About us</meta_title>
<meta_title>About Us</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>about us, informations</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -4,6 +4,6 @@
<description>If a technical problem occurs on this website</description>
</contact>
<contact id="Customer_service" name="Customer service">
<description>For any question about a product, an order</description>
<description>For any query regarding a hotel or a booking</description>
</contact>
</entity_contact>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="Daňová pravidla"/>
<tab id="Translations" name="Překlady"/>
<tab id="Modules_1" name="Moduly a Služby"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Katalog modulů a šablon"/>
<tab id="Positions" name="Pozice modulů"/>
<tab id="Payment" name="Platba"/>

View File

@@ -19,7 +19,7 @@
<meta_title>Allgemeine Nutzungsbedingungen</meta_title>
<meta_description>Unsere allgemeinen Nutzungsbedingungen</meta_description>
<meta_keywords>Voraussetzungen, Bedingungen, nutzen, verkaufen</meta_keywords>
<content>&lt;h2&gt;Your terms and conditions of use&lt;/h2&gt;&lt;h3&gt;Rule 1&lt;/h3&gt;&lt;p&gt;Here is the rule 1 content&lt;/p&gt;&#xD;
<content>&lt;h2&gt;Terms and Conditions&lt;/h2&gt;&lt;h3&gt;Rule 1&lt;/h3&gt;&lt;p&gt;Here is the rule 1 content&lt;/p&gt;&#xD;
&lt;h3&gt;Rule 2&lt;/h3&gt;&lt;p&gt;Here is the rule 2 content&lt;/p&gt;&#xD;
&lt;h3&gt;Rule 3&lt;/h3&gt;&lt;p&gt;Here is the rule 3 content&lt;/p&gt;</content>
<link_rewrite>allgemeine-nutzungsbedingungen</link_rewrite>
@@ -28,7 +28,7 @@
<meta_title>&#xDC;ber uns</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>&#xFC;ber uns, Informationen</meta_keywords>
<content>&lt;h2&gt;About us&lt;/h2&gt;&#xD;
<content>&lt;h2&gt;About Us&lt;/h2&gt;&#xD;
&lt;h3&gt;Our company&lt;/h3&gt;&lt;p&gt;Our company&lt;/p&gt;&#xD;
&lt;h3&gt;Our team&lt;/h3&gt;&lt;p&gt;Our team&lt;/p&gt;&#xD;
&lt;h3&gt;Informations&lt;/h3&gt;&lt;p&gt;Informations&lt;/p&gt;</content>

View File

@@ -49,6 +49,7 @@
<!-- <tab id="Merchandise_Returns" name="Warenrücksendungen"/> -->
<tab id="Modules_1" name="Module"/>
<tab id="Modules" name="Module"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Module &amp; Templates"/>
<tab id="Monitoring" name="Kontrollübersicht"/>
<tab id="Multistore" name="Multishop"/>

View File

@@ -16,10 +16,10 @@
<link_rewrite>legal-notice</link_rewrite>
</cms>
<cms id="Terms_and_conditions_of_use">
<meta_title>Terms and conditions of use</meta_title>
<meta_description>Our terms and conditions of use</meta_description>
<meta_title>Terms and Conditions</meta_title>
<meta_description>Our Terms and Conditions</meta_description>
<meta_keywords>conditions, terms, use, sell</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -29,10 +29,10 @@
<link_rewrite>terms-and-conditions-of-use</link_rewrite>
</cms>
<cms id="About_us">
<meta_title>About us</meta_title>
<meta_title>About Us</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>about us, informations</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -4,6 +4,6 @@
<description>If a technical problem occurs on this website</description>
</contact>
<contact id="Customer_service" name="Customer service">
<description>For any question about a product, an order</description>
<description>For any query regarding a hotel or a booking</description>
</contact>
</entity_contact>

View File

@@ -58,7 +58,8 @@
<tab id="Taxes" name="Taxes"/>
<tab id="Tax_Rules" name="Tax Rules"/>
<tab id="Translations" name="Translations"/>
<tab id="Modules_1" name="Modules and Services"/>
<tab id="Modules_1" name="Manage Modules"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Modules &amp; Themes Catalog"/>
<tab id="Positions" name="Positions"/>
<tab id="Payment" name="Payment"/>

View File

@@ -58,6 +58,7 @@
<tab id="Tax_Rules" name="Reglas de tasas"/>
<tab id="Translations" name="Traducciones"/>
<tab id="Modules_1" name="Módulos y Servicios"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Catálogo de Módulos y Temas"/>
<tab id="Positions" name="Posiciones de los módulos"/>
<tab id="Payment" name="Pago"/>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="قوانین مالیاتی"/>
<tab id="Translations" name="ترجمه‌ها"/>
<tab id="Modules_1" name="ماژول ها و سرویس ها"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="کاتالوگ ماژول‌ها و قالب‌ها"/>
<tab id="Positions" name="جایگاه‌ها"/>
<tab id="Payment" name="پرداخت"/>

View File

@@ -49,6 +49,7 @@
<!-- <tab id="Merchandise_Returns" name="Retours produits"/> -->
<tab id="Modules_1" name="Modules et Services"/>
<tab id="Modules" name="Modules et Services"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Catalogue de modules et thèmes"/>
<tab id="Monitoring" name="Suivi"/>
<tab id="Multistore" name="Multiboutique"/>

View File

@@ -19,7 +19,7 @@
<meta_title>מדיניות שימוש באתר החזרות וביטולי מוצרים</meta_title>
<meta_description>מדיניות שימוש באתר החזרות וביטולי מוצרים ועוד</meta_description>
<meta_keywords>תנאי, תנאים, שימוש, הערות, מדיניות, החזרות, ביטולים, ביטול עיסקה</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -32,7 +32,7 @@
<meta_title>אודותינו</meta_title>
<meta_description>קצת עלינו</meta_description>
<meta_keywords>אודותינו, מידע, מי אנחנו</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="כללי מס"/>
<tab id="Translations" name="תרגומים"/>
<tab id="Modules_1" name="מודולים"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="קטלוג מודולים וערכות עיצוב"/>
<tab id="Positions" name="מיקומים"/>
<tab id="Payment" name="תשלום"/>

View File

@@ -16,10 +16,10 @@
<link_rewrite>legal-notice</link_rewrite>
</cms>
<cms id="Terms_and_conditions_of_use">
<meta_title>Terms and conditions of use</meta_title>
<meta_description>Our terms and conditions of use</meta_description>
<meta_title>Terms and Conditions</meta_title>
<meta_description>Our Terms and Conditions</meta_description>
<meta_keywords>conditions, terms, use, sell</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -29,10 +29,10 @@
<link_rewrite>terms-and-conditions-of-use</link_rewrite>
</cms>
<cms id="About_us">
<meta_title>About us</meta_title>
<meta_title>About Us</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>about us, informations</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -4,6 +4,6 @@
<description>If a technical problem occurs on this website</description>
</contact>
<contact id="Customer_service" name="Customer service">
<description>For any question about a product, an order</description>
<description>For any query regarding a hotel or a booking</description>
</contact>
</entity_contact>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="Pravila poreza"/>
<tab id="Translations" name="Prijevodi"/>
<tab id="Modules_1" name="Moduli i servisi"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Katalog Modula i Tema"/>
<tab id="Positions" name="Pozicije"/>
<tab id="Payment" name="Plaćanje"/>

View File

@@ -16,10 +16,10 @@
<link_rewrite>legal-notice</link_rewrite>
</cms>
<cms id="Terms_and_conditions_of_use">
<meta_title>Terms and conditions of use</meta_title>
<meta_description>Our terms and conditions of use</meta_description>
<meta_title>Terms and Conditions</meta_title>
<meta_description>Our Terms and Conditions</meta_description>
<meta_keywords>conditions, terms, use, sell</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -29,10 +29,10 @@
<link_rewrite>terms-and-conditions-of-use</link_rewrite>
</cms>
<cms id="About_us">
<meta_title>About us</meta_title>
<meta_title>About Us</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>about us, informations</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -4,6 +4,6 @@
<description>If a technical problem occurs on this website</description>
</contact>
<contact id="Customer_service" name="Customer service">
<description>For any question about a product, an order</description>
<description>For any query regarding a hotel or a booking</description>
</contact>
</entity_contact>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="Adószabályok"/>
<tab id="Translations" name="Translations"/>
<tab id="Modules_1" name="Modules and Services"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Modules &amp; Themes Catalog"/>
<tab id="Positions" name="Positions"/>
<tab id="Payment" name="Fizetés"/>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="Aturan pajak"/>
<tab id="Translations" name="Terjemahan"/>
<tab id="Modules_1" name="Modul dan layanan"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Katalog modul dan theme"/>
<tab id="Positions" name="Posisi"/>
<tab id="Payment" name="Pembayaran"/>

View File

@@ -49,6 +49,7 @@
<!-- <tab id="Merchandise_Returns" name="Restituzione prodotto"/> -->
<tab id="Modules_1" name="Moduli e Servizi"/>
<tab id="Modules" name="Moduli"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Catalogo Moduli e temi"/>
<tab id="Monitoring" name="Monitoraggio"/>
<tab id="Multistore" name="Multi-negozio"/>

View File

@@ -16,10 +16,10 @@
<link_rewrite>legal-notice</link_rewrite>
</cms>
<cms id="Terms_and_conditions_of_use">
<meta_title>Terms and conditions of use</meta_title>
<meta_description>Our terms and conditions of use</meta_description>
<meta_title>Terms and Conditions</meta_title>
<meta_description>Our Terms and Conditions</meta_description>
<meta_keywords>conditions, terms, use, sell</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -29,10 +29,10 @@
<link_rewrite>terms-and-conditions-of-use</link_rewrite>
</cms>
<cms id="About_us">
<meta_title>About us</meta_title>
<meta_title>About Us</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>about us, informations</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -4,6 +4,6 @@
<description>If a technical problem occurs on this website</description>
</contact>
<contact id="Customer_service" name="Customer service">
<description>For any question about a product, an order</description>
<description>For any query regarding a hotel or a booking</description>
</contact>
</entity_contact>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="Mokesčių taisyklės"/>
<tab id="Translations" name="Vertimai"/>
<tab id="Modules_1" name="Moduliai ir paslaugos"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Modulių ir temų katalogas"/>
<tab id="Positions" name="Pozicijos"/>
<tab id="Payment" name="Mokėjimas"/>

View File

@@ -16,10 +16,10 @@
<link_rewrite>legal-notice</link_rewrite>
</cms>
<cms id="Terms_and_conditions_of_use">
<meta_title>Terms and conditions of use</meta_title>
<meta_description>Our terms and conditions of use</meta_description>
<meta_title>Terms and Conditions</meta_title>
<meta_description>Our Terms and Conditions</meta_description>
<meta_keywords>conditions, terms, use, sell</meta_keywords>
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and conditions of use&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading&quot;&gt;Terms and Conditions&lt;/h1&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 1&lt;/h3&gt;
&lt;p class=&quot;bottom-indent&quot;&gt;Lorem ipsum dolor sit amet conse ctetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
&lt;h3 class=&quot;page-subheading&quot;&gt;Rule 2&lt;/h3&gt;
@@ -29,10 +29,10 @@
<link_rewrite>terms-and-conditions-of-use</link_rewrite>
</cms>
<cms id="About_us">
<meta_title>About us</meta_title>
<meta_title>About Us</meta_title>
<meta_description>Learn more about us</meta_description>
<meta_keywords>about us, informations</meta_keywords>
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About us&lt;/h1&gt;
<content>&lt;h1 class=&quot;page-heading bottom-indent&quot;&gt;About Us&lt;/h1&gt;
&lt;div class=&quot;row&quot;&gt;
&lt;div class=&quot;col-xs-12 col-sm-4&quot;&gt;
&lt;div class=&quot;cms-block&quot;&gt;

View File

@@ -4,6 +4,6 @@
<description>If a technical problem occurs on this website</description>
</contact>
<contact id="Customer_service" name="Customer service">
<description>For any question about a product, an order</description>
<description>For any query regarding a hotel or a booking</description>
</contact>
</entity_contact>

View File

@@ -59,6 +59,7 @@
<tab id="Tax_Rules" name="Даночни правила"/>
<tab id="Translations" name="Преводи"/>
<tab id="Modules_1" name="Модули"/>
<tab id="Modules_Catalog" name="Modules Catalog"/>
<tab id="Modules_Themes_Catalog" name="Модули и каталог на теми"/>
<tab id="Positions" name="Позиции"/>
<tab id="Payment" name="Плаќање"/>

Some files were not shown because too many files have changed in this diff Show More