Merge branch 'webkul:develop' into gli-1671
This commit is contained in:
@@ -58,6 +58,8 @@ if ($excludeIds && $excludeIds != 'NaN') {
|
||||
$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', true);
|
||||
$exclude_packs = (bool)Tools::getValue('exclude_packs', true);
|
||||
|
||||
$bookingProduct = (int) Tools::getValue('booking_product');
|
||||
|
||||
$context = Context::getContext();
|
||||
|
||||
$sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, p.`cache_default_attribute`
|
||||
@@ -72,6 +74,7 @@ $sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, imag
|
||||
(!empty($excludePackItself) ? ' AND p.id_product <> '.$excludePackItself.' ' : ' ').
|
||||
($excludeVirtuals ? 'AND NOT EXISTS (SELECT 1 FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : '').
|
||||
($exclude_packs ? 'AND (p.cache_is_pack IS NULL OR p.cache_is_pack = 0)' : '').
|
||||
($bookingProduct ? 'AND p.`booking_product` = '.(int) $bookingProduct : '').
|
||||
' GROUP BY p.id_product';
|
||||
|
||||
$items = Db::getInstance()->executeS($sql);
|
||||
|
||||
@@ -200,6 +200,8 @@ $chosen-sprite-path: '../img/chosen-sprite.png'
|
||||
input
|
||||
position: absolute
|
||||
@include left(-9000px)
|
||||
&:before
|
||||
visibility: hidden
|
||||
|
||||
.chosen-container-multi
|
||||
.chosen-choices
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
@extend .icon-cogs
|
||||
.icon-AdminAdmin
|
||||
@extend .icon-cog
|
||||
.icon-AdminParentStats
|
||||
.icon-AdminStats
|
||||
@extend .icon-bar-chart
|
||||
.icon-AdminStock
|
||||
@extend .icon-archive
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<i class="icon-info"></i>
|
||||
{l s='Server information'}
|
||||
</h3>
|
||||
{if count($uname)}
|
||||
{if Tools::strlen($uname) > 0}
|
||||
<p>
|
||||
<strong>{l s='Server information:'}</strong> {$uname|escape:'html':'UTF-8'}
|
||||
</p>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-4 col-sm-12 col-xs-12">
|
||||
<img class="img-responsive" alt="PrestaShop Addons" src="themes/default/img/prestashop-addons-logo.png">
|
||||
<img class="img-responsive" alt="QloApps Addons" src="themes/default/img/prestashop-addons-logo.png">
|
||||
</div>
|
||||
<div class="col-lg-4 col-lg-offset-1 col-md-4 col-sm-7 col-xs-12 addons-style-search-bar">
|
||||
<form id="addons-search-form" method="get" action="http://addons.prestashop.com/{$iso_code}/search" class="float">
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<div class="form-wrapper">
|
||||
<div class="form-group">
|
||||
<p>{l s='To add a new module, simply connect to your PrestaShop Addons account and all your purchases will be automatically imported.'}</p>
|
||||
<p>{l s='To add a new module, simply connect to your QloApps Addons account and all your purchases will be automatically imported.'}</p>
|
||||
</div>
|
||||
</div><!-- /.form-wrapper -->
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
<div class="alert alert-info">
|
||||
<h4>{l s='Can I add my own modules?'}</h4>
|
||||
<p>{l s='Please note that for security reasons, you can only add modules that are being distributed on PrestaShop Addons, the official marketplace.'}</p>
|
||||
<p>{l s='Please note that for security reasons, you can only add modules that are being distributed on QloApps Addons, the official marketplace.'}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -67,20 +67,22 @@
|
||||
<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'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn" href="{$link->getAdminLink('AdminModules')}&addnewmodule" title="{l s='Add a new module'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{if $add_permission eq '1'}
|
||||
{if $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'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn" href="{$link->getAdminLink('AdminModules')}&addnewmodule" title="{l s='Add a new module'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
{if isset($help_link)}
|
||||
{* <li>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-12">
|
||||
<input id="{$id|escape:'html':'UTF-8'}" type="file" name="{$name|escape:'html':'UTF-8'}[]"{if isset($url)} data-url="{$url}"{/if}{if isset($multiple) && $multiple} multiple="multiple"{/if} style="width:0px;height:0px;" />
|
||||
<input id="{$id|escape:'html':'UTF-8'}" type="file" accept="image/gif, image/jpg, image/jpeg, image/png" name="{$name|escape:'html':'UTF-8'}[]"{if isset($url)} data-url="{$url}"{/if}{if isset($multiple) && $multiple} multiple="multiple"{/if} style="width:0px;height:0px;" />
|
||||
<button class="btn btn-default" data-style="expand-right" data-size="s" type="button" id="{$id|escape:'html':'UTF-8'}-add-button">
|
||||
<i class="icon-folder-open"></i> {if isset($multiple) && $multiple}{l s='Add files...'}{else}{l s='Add file...'}{/if}
|
||||
</button>
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
{l s='Select Hotel'}
|
||||
</label>
|
||||
<div class="col-sm-5">
|
||||
<select name="id_hotel" id="hotel_place" class="form-control">
|
||||
<select name="id_hotel" id="hotel_place" class="form-control chosen">
|
||||
{foreach from=$htl_info item=htl_dtl}
|
||||
<option value="{$htl_dtl['id']}" >{$htl_dtl['hotel_name']}</option>
|
||||
{/foreach}
|
||||
|
||||
@@ -115,7 +115,6 @@ class ConfigurationTestCore
|
||||
'register_globals' => false,
|
||||
'gz' => false,
|
||||
'mbstring' => false,
|
||||
'magicquotes' => false,
|
||||
'dom' => false,
|
||||
);
|
||||
}
|
||||
@@ -181,11 +180,6 @@ class ConfigurationTestCore
|
||||
return extension_loaded('simplexml');
|
||||
}
|
||||
|
||||
public static function test_magicquotes()
|
||||
{
|
||||
return function_exists('get_magic_quotes_gpc') ? !get_magic_quotes_gpc() : true;
|
||||
}
|
||||
|
||||
public static function test_upload()
|
||||
{
|
||||
return ini_get('file_uploads');
|
||||
|
||||
@@ -93,7 +93,7 @@ class CookieCore
|
||||
$this->_path = str_replace('%7E', '~', $this->_path);
|
||||
$this->_domain = $this->getDomain($shared_urls);
|
||||
$this->_sameSite = Configuration::get('PS_COOKIE_SAMESITE');
|
||||
$this->_name = 'PrestaShop-'.md5(($this->_standalone ? '' : _PS_VERSION_).$name.$this->_domain);
|
||||
$this->_name = 'QloApps-'.md5(($this->_standalone ? '' : _PS_VERSION_).$name.$this->_domain);
|
||||
$this->_allow_writing = true;
|
||||
$this->_salt = $this->_standalone ? str_pad('', 8, md5('ps'.__FILE__)) : _COOKIE_IV_;
|
||||
if ($this->_standalone) {
|
||||
|
||||
@@ -300,6 +300,11 @@ class DispatcherCore
|
||||
} else {
|
||||
$controllers = Dispatcher::getControllers(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/');
|
||||
if (!isset($controllers[strtolower($this->controller)])) {
|
||||
// If this is a parent tab, load the first child
|
||||
if (Validate::isLoadedObject($tab) && $tab->id_parent == 0 && ($tabs = Tab::getTabs(Context::getContext()->language->id, $tab->id)) && isset($tabs[0])) {
|
||||
Tools::redirectAdmin(Context::getContext()->link->getAdminLink($tabs[0]['class_name']));
|
||||
}
|
||||
|
||||
$this->controller = $this->controller_not_found;
|
||||
$controller_class = 'AdminNotFoundController';
|
||||
} else {
|
||||
|
||||
@@ -646,17 +646,17 @@ abstract class PaymentModuleCore extends Module
|
||||
// THEN
|
||||
// The voucher is cloned with a new value corresponding to the remainder
|
||||
$reduction_amount_converted = $cart_rule['obj']->reduction_amount;
|
||||
if ((int) $cart_rule['obj']->reduction_currency !== (int) $cart->id_currency) {
|
||||
if ((int) $cart_rule['obj']->reduction_currency !== (int) $this->context->cart->id_currency) {
|
||||
$reduction_amount_converted = Tools::convertPriceFull(
|
||||
$cart_rule['obj']->reduction_amount,
|
||||
new Currency($cart_rule['obj']->reduction_currency),
|
||||
new Currency($cart->id_currency)
|
||||
new Currency($this->context->cart->id_currency)
|
||||
);
|
||||
}
|
||||
if ($cart_rule['obj']->reduction_tax) {
|
||||
$remaining_amount = $reduction_amount_converted - $values['tax_incl'];
|
||||
$remaining_amount = $values['tax_incl'] - $order->total_products_wt;
|
||||
} else {
|
||||
$remaining_amount = $reduction_amount_converted - $values['tax_excl'];
|
||||
$remaining_amount = $values['tax_excl'] - $order->total_products;
|
||||
}
|
||||
if ($remaining_amount > 0 && $cart_rule['obj']->partial_use == 1 && $reduction_amount_converted > 0) {
|
||||
// Create a new voucher from the original
|
||||
|
||||
@@ -881,7 +881,7 @@ class AdminControllerCore extends Controller
|
||||
$key = isset($tmp_tab[1]) ? $tmp_tab[0].'.`'.$tmp_tab[1].'`' : '`'.$tmp_tab[0].'`';
|
||||
|
||||
// as in database 0 means position 1 in the renderlist
|
||||
if (isset($field['position'])) {
|
||||
if (isset($field['position']) && Validate::isInt($value)) {
|
||||
$value -= 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -917,8 +917,16 @@ class FrontControllerCore extends Controller
|
||||
}
|
||||
$excluded_key = array('isolang', 'id_lang', 'controller', 'fc', 'id_product', 'id_category', 'id_manufacturer', 'id_supplier', 'id_cms');
|
||||
foreach ($_GET as $key => $value) {
|
||||
if (!in_array($key, $excluded_key) && Validate::isUrl($key) && Validate::isUrl($value)) {
|
||||
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
||||
if (!in_array($key, $excluded_key)) {
|
||||
if (is_array($value)) {
|
||||
if (Validate::isUrl($key)) {
|
||||
$params[Tools::safeOutput($key)] = $this->sanitizeQueryOutput($value);
|
||||
}
|
||||
} else {
|
||||
if (Validate::isUrl($key) && Validate::isUrl($value)) {
|
||||
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -943,6 +951,24 @@ class FrontControllerCore extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
protected function sanitizeQueryOutput($query)
|
||||
{
|
||||
$params = array();
|
||||
foreach ($query as $key => $value) {
|
||||
if (Validate::isUrl($key)) {
|
||||
if (is_array($value)) {
|
||||
$params[Tools::safeOutput($key)] = $this->sanitizeQueryOutput($value);
|
||||
} else {
|
||||
if (Validate::isUrl($value)) {
|
||||
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Geolocation management
|
||||
*
|
||||
|
||||
@@ -978,6 +978,21 @@ class AdminCustomersControllerCore extends AdminController
|
||||
return parent::processSave();
|
||||
}
|
||||
|
||||
protected function copyFromPost(&$object, $table)
|
||||
{
|
||||
parent::copyFromPost($object, $table);
|
||||
|
||||
$years = Tools::getValue('years');
|
||||
$months = Tools::getValue('months');
|
||||
$days = Tools::getValue('days');
|
||||
|
||||
if ($years != '' && $months != '' && $days != '') {
|
||||
$object->birthday = (int) $years.'-'.(int) $months.'-'.(int) $days;
|
||||
} else {
|
||||
$object->birthday = '0000-00-00';
|
||||
}
|
||||
}
|
||||
|
||||
protected function afterDelete($object, $old_id)
|
||||
{
|
||||
$customer = new Customer($old_id);
|
||||
|
||||
@@ -175,13 +175,12 @@ class AdminGroupsControllerCore extends AdminController
|
||||
|
||||
protected function renderCustomersList($group)
|
||||
{
|
||||
$genders = array(0 => '?');
|
||||
$genders_icon = array('default' => 'unknown.gif');
|
||||
foreach (Gender::getGenders() as $gender) {
|
||||
/** @var Gender $gender */
|
||||
$genders_icon[$gender->id] = '../genders/'.(int)$gender->id.'.jpg';
|
||||
$genders[$gender->id] = $gender->name;
|
||||
$titles_array = array();
|
||||
$genders = Gender::getGenders($this->context->language->id);
|
||||
foreach ($genders as $gender) {
|
||||
$titles_array[$gender->id_gender] = $gender->name;
|
||||
}
|
||||
|
||||
$this->table = 'customer_group';
|
||||
$this->lang = false;
|
||||
$this->list_id = 'customer_group';
|
||||
@@ -194,7 +193,7 @@ class AdminGroupsControllerCore extends AdminController
|
||||
|
||||
$this->fields_list = (array(
|
||||
'id_customer' => array('title' => $this->l('ID'), 'align' => 'center', 'filter_key' => 'c!id_customer', 'class' => 'fixed-width-xs'),
|
||||
'id_gender' => array('title' => $this->l('Social title'), 'icon' => $genders_icon, 'list' => $genders),
|
||||
'title' => array('title' => $this->l('Social title'), 'filter_key' => 'c!id_gender', 'type' => 'select', 'list' => $titles_array),
|
||||
'firstname' => array('title' => $this->l('First name')),
|
||||
'lastname' => array('title' => $this->l('Last name')),
|
||||
'email' => array('title' => $this->l('Email address'), 'filter_key' => 'c!email', 'orderby' => true),
|
||||
@@ -202,8 +201,9 @@ class AdminGroupsControllerCore extends AdminController
|
||||
'date_add' => array('title' => $this->l('Registration date'), 'type' => 'date', 'class' => 'fixed-width-md', 'align' => 'center'),
|
||||
'active' => array('title' => $this->l('Enabled'), 'align' => 'center', 'class' => 'fixed-width-sm', 'type' => 'bool', 'search' => false, 'orderby' => false, 'filter_key' => 'c!active', 'callback' => 'printOptinIcon')
|
||||
));
|
||||
$this->_select = 'c.*, a.id_group';
|
||||
$this->_select = 'c.*, a.id_group, gl.`name` AS title';
|
||||
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (a.`id_customer` = c.`id_customer`)';
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'gender_lang gl ON (gl.`id_gender` = c.`id_gender` AND gl.`id_lang` = '.(int) $this->context->language->id.')';
|
||||
$this->_where = 'AND a.`id_group` = '.(int)$group->id.' AND c.`deleted` != 1';
|
||||
$this->_where .= Shop::addSqlRestriction(Shop::SHARE_CUSTOMER, 'c');
|
||||
self::$currentIndex = self::$currentIndex.'&id_group='.(int)$group->id.'&viewgroup';
|
||||
|
||||
@@ -140,7 +140,6 @@ class AdminInformationControllerCore extends AdminController
|
||||
'upload_max_filesize' => $this->l('In PHP configuration set upload_max_filesize to minimum 16M.'),
|
||||
'max_execution_time' => $this->l('In PHP configuration set max_execution_time to minimum 500.'),
|
||||
'mbstring' => $this->l('PHP Mbstring extension is not enabled.'),
|
||||
'magicquotes' => $this->l('PHP magic quotes option is enabled.'),
|
||||
'dom' => $this->l('PHP DOM extension is not loaded.'),
|
||||
);
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ class AdminPPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save'))
|
||||
),
|
||||
'order_by_pagination' => array(
|
||||
/*'order_by_pagination' => array(
|
||||
'title' => $this->l('Pagination'),
|
||||
'fields' => array(
|
||||
'PS_PRODUCTS_PER_PAGE' => array(
|
||||
@@ -241,7 +241,7 @@ class AdminPPreferencesControllerCore extends AdminController
|
||||
)
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save'))
|
||||
),
|
||||
),*/
|
||||
'fo_product_page' => array(
|
||||
'title' => $this->l('Room type page'),
|
||||
'fields' => array(
|
||||
|
||||
@@ -60,6 +60,9 @@ class AdminReferrersControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// redirect to Dashboard for stats related to Referers
|
||||
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminDashboard'));
|
||||
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'referrer';
|
||||
$this->className = 'Referrer';
|
||||
|
||||
@@ -171,9 +171,36 @@ class AdminSearchControllerCore extends AdminController
|
||||
$this->context = Context::getContext();
|
||||
if ($this->_list['products'] = Product::searchByName($this->context->language->id, $this->query)) {
|
||||
$objRoomType = new HotelRoomType();
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
$accessibleHotels = HotelBranchInformation::getProfileAccessedHotels(
|
||||
$this->context->employee->id_profile,
|
||||
1,
|
||||
1
|
||||
);
|
||||
|
||||
foreach ($this->_list['products'] as $key => $product) {
|
||||
$roomInfo = $objRoomType->getRoomTypeInfoByIdProduct($product['id_product']);
|
||||
if (!in_array($roomInfo['id_hotel'], HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 1))) {
|
||||
$toUnset = false;
|
||||
if ($product['booking_product']) {
|
||||
$roomInfo = $objRoomType->getRoomTypeInfoByIdProduct($product['id_product']);
|
||||
if (!in_array($roomInfo['id_hotel'], $accessibleHotels)) {
|
||||
$toUnset = true;
|
||||
}
|
||||
} else {
|
||||
$associations = $objRoomTypeServiceProduct->getAssociatedHotelsAndRoomType($product['id_product']);
|
||||
// proceed only if access can not be determined from hotels
|
||||
if (!count(array_intersect($associations['hotels'], $accessibleHotels))) {
|
||||
$toUnset = true;
|
||||
foreach ($associations['room_types'] as $idProduct) {
|
||||
$roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($idProduct);
|
||||
if (in_array($roomTypeInfo['id_hotel'], $accessibleHotels)) {
|
||||
$toUnset = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($toUnset) {
|
||||
unset($this->_list['products'][$key]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ class AdminSearchEnginesControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// redirect to Dashboard for stats related to Search Engines
|
||||
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminDashboard'));
|
||||
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'search_engine';
|
||||
$this->className = 'SearchEngine';
|
||||
|
||||
@@ -295,16 +295,25 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
||||
),
|
||||
),
|
||||
);
|
||||
if (($value = $this->getFieldValue($this->object, 'price')) != -1) {
|
||||
$price = number_format($value, 6);
|
||||
|
||||
$price = $this->getFieldValue($this->object, 'price');
|
||||
if ($price != -1 && Validate::isPrice($price)) {
|
||||
$price = number_format($price, 6);
|
||||
} else {
|
||||
$price = '';
|
||||
}
|
||||
|
||||
$reduction = $this->getFieldValue($this->object, 'reduction');
|
||||
if (Validate::isPrice($reduction)) {
|
||||
$reduction = number_format($reduction, 6);
|
||||
} else {
|
||||
$reduction = 0;
|
||||
}
|
||||
|
||||
$this->fields_value = array(
|
||||
'price' => $price,
|
||||
'from_quantity' => (($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1),
|
||||
'reduction' => number_format((($value = $this->getFieldValue($this->object, 'reduction')) ? $value : 0), 6),
|
||||
'reduction' => $reduction,
|
||||
'leave_bprice_on' => $price ? 0 : 1,
|
||||
'shop_id' => (($value = $this->getFieldValue($this->object, 'id_shop')) ? $value : 1)
|
||||
);
|
||||
|
||||
@@ -118,6 +118,10 @@ class AdminWebserviceControllerCore extends AdminController
|
||||
{
|
||||
parent::processUpdateOptions();
|
||||
Tools::generateHtaccess();
|
||||
|
||||
if (!count($this->errors)) {
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&conf=6');
|
||||
}
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
|
||||
@@ -221,6 +221,8 @@ class AddressControllerCore extends FrontController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->show_breadcrump = true;
|
||||
|
||||
parent::initContent();
|
||||
|
||||
$this->assignCountries();
|
||||
|
||||
@@ -294,7 +294,9 @@ class AuthControllerCore extends FrontController
|
||||
$this->errors[] = Tools::displayError('Password is required.');
|
||||
} elseif (!Validate::isPasswd($passwd)) {
|
||||
$this->errors[] = Tools::displayError('Invalid password.');
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!count($this->errors)) {
|
||||
$customer = new Customer();
|
||||
$authentication = $customer->getByEmail(trim($email), trim($passwd));
|
||||
if (isset($authentication->active) && !$authentication->active) {
|
||||
@@ -321,6 +323,7 @@ class AuthControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->ajax) {
|
||||
$return = array(
|
||||
'hasError' => !empty($this->errors),
|
||||
@@ -788,7 +791,6 @@ class AuthControllerCore extends FrontController
|
||||
'{firstname}' => $customer->firstname,
|
||||
'{lastname}' => $customer->lastname,
|
||||
'{email}' => $customer->email,
|
||||
'{passwd}' => str_repeat('*', strlen(Tools::getValue('passwd'))),
|
||||
),
|
||||
$customer->email,
|
||||
$customer->firstname.' '.$customer->lastname
|
||||
|
||||
@@ -319,25 +319,23 @@ class CartControllerCore extends FrontController
|
||||
$serviceProducts = json_decode(Tools::getValue('serviceProducts'),true);
|
||||
|
||||
// valdiate occupancy if providede
|
||||
if ($operator == 'up') {
|
||||
if ($occupancyRequiredForBooking) {
|
||||
foreach($occupancy as $key => $roomOccupancy) {
|
||||
if (!isset($roomOccupancy['adults']) || !$roomOccupancy['adults'] || !Validate::isUnsignedInt($roomOccupancy['adults'])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Invalid number of adults for Room %s.'), ($key + 1));
|
||||
if ($operator == 'up' && $occupancyRequiredForBooking) {
|
||||
foreach($occupancy as $key => $roomOccupancy) {
|
||||
if (!isset($roomOccupancy['adults']) || !$roomOccupancy['adults'] || !Validate::isUnsignedInt($roomOccupancy['adults'])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Invalid number of adults for Room %s.'), ($key + 1));
|
||||
}
|
||||
if (isset($roomOccupancy['children'])) {
|
||||
if (!Validate::isUnsignedInt($roomOccupancy['children'])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Invalid number of children for Room %s.'), ($key + 1));
|
||||
}
|
||||
if (isset($roomOccupancy['children'])) {
|
||||
if (!Validate::isUnsignedInt($roomOccupancy['children'])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Invalid number of children for Room %s.'), ($key + 1));
|
||||
}
|
||||
if ($roomOccupancy['children'] > 0) {
|
||||
if (!isset($roomOccupancy['child_ages']) || ($roomOccupancy['children'] != count($roomOccupancy['child_ages'])) || !is_array($roomOccupancy['child_ages'])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Please provide all children age for Room %s.'), ($key + 1));
|
||||
} else {
|
||||
if (is_array($roomOccupancy['child_ages'])) {
|
||||
foreach($roomOccupancy['child_ages'] as $childAge) {
|
||||
if (!Validate::isUnsignedInt($childAge)) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Invalid children age for Room %s.'), ($key + 1));
|
||||
}
|
||||
if ($roomOccupancy['children'] > 0) {
|
||||
if (!isset($roomOccupancy['child_ages']) || ($roomOccupancy['children'] != count($roomOccupancy['child_ages'])) || !is_array($roomOccupancy['child_ages'])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Please provide all children age for Room %s.'), ($key + 1));
|
||||
} else {
|
||||
if (is_array($roomOccupancy['child_ages'])) {
|
||||
foreach($roomOccupancy['child_ages'] as $childAge) {
|
||||
if (!Validate::isUnsignedInt($childAge)) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Invalid children age for Room %s.'), ($key + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -345,6 +343,20 @@ class CartControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!count($this->errors)) {
|
||||
foreach($occupancy as $key => $roomOccupancy) {
|
||||
if ($roomOccupancy['adults'] > $roomTypeInfo['max_adults']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Room %s cannot have adults more than %s'), $key + 1, $roomTypeInfo['max_adults']);
|
||||
}
|
||||
if ($roomOccupancy['children'] > $roomTypeInfo['max_children']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Room %s cannot have children more than %s'), $key + 1, $roomTypeInfo['max_children']);
|
||||
}
|
||||
if ($roomOccupancy['adults'] + $roomOccupancy['children'] > $roomTypeInfo['max_guests']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Room %s cannot have total guests more than %s'), $key + 1, $roomTypeInfo['max_guests']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($id_hotel = $roomTypeInfo['id_hotel']) {
|
||||
@@ -361,19 +373,7 @@ class CartControllerCore extends FrontController
|
||||
$this->errors[] = Tools::displayError('You can\'t book room after date '.$maxOrdDate);
|
||||
}
|
||||
}
|
||||
if ($occupancyRequiredForBooking) {
|
||||
foreach($occupancy as $key => $roomOccupancy) {
|
||||
if ($roomOccupancy['adults'] > $roomTypeInfo['max_adults']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Room %s cannot have adults more than %s'), $key + 1, $roomTypeInfo['max_adults']);
|
||||
}
|
||||
if ($roomOccupancy['children'] > $roomTypeInfo['max_children']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Room %s cannot have children more than %s'), $key + 1, $roomTypeInfo['max_children']);
|
||||
}
|
||||
if ($roomOccupancy['adults'] + $roomOccupancy['children'] > $roomTypeInfo['max_guests']) {
|
||||
$this->errors[] = sprintf(Tools::displayError('Room %s cannot have total guests more than %s'), $key + 1, $roomTypeInfo['max_guests']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->errors) {
|
||||
$objBookingDetail = new HotelBookingDetail();
|
||||
$num_days = $objBookingDetail->getNumberOfDays($date_from, $date_to);
|
||||
|
||||
@@ -211,7 +211,7 @@ class CategoryControllerCore extends FrontController
|
||||
'order_date_restrict' => $order_date_restrict
|
||||
));
|
||||
} else {
|
||||
Tools::redirect($this->context->link->getPageLink('index'));
|
||||
Tools::redirect($this->context->link->getPageLink('pagenotfound'));
|
||||
}
|
||||
|
||||
$feat_img_dir = _PS_IMG_.'rf/';
|
||||
|
||||
@@ -37,6 +37,8 @@ class DiscountControllerCore extends FrontController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->show_breadcrump = true;
|
||||
|
||||
parent::initContent();
|
||||
|
||||
$cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false, true);
|
||||
|
||||
@@ -53,6 +53,8 @@ class HistoryControllerCore extends FrontController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->show_breadcrump = true;
|
||||
|
||||
parent::initContent();
|
||||
if ($orders = Order::getCustomerOrders($this->context->customer->id)) {
|
||||
foreach ($orders as &$order) {
|
||||
|
||||
@@ -126,6 +126,8 @@ class IdentityControllerCore extends FrontController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->show_breadcrump = true;
|
||||
|
||||
parent::initContent();
|
||||
|
||||
if ($this->customer->birthday) {
|
||||
|
||||
@@ -67,9 +67,16 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key) {
|
||||
Tools::redirect($redirectLink);
|
||||
}
|
||||
$module = Module::getInstanceById((int)($this->id_module));
|
||||
if ($order->module != $module->name) {
|
||||
Tools::redirect($redirectLink);
|
||||
|
||||
if ($this->id_module == -1) {
|
||||
if ($order->module != 'free_order') {
|
||||
Tools::redirect($redirectLink);
|
||||
}
|
||||
} else {
|
||||
$module = Module::getInstanceById((int)($this->id_module));
|
||||
if ($order->module != $module->name) {
|
||||
Tools::redirect($redirectLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,6 +412,7 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'refund_allowed' => (int) $order->isReturnable(),
|
||||
'is_free_order' => $this->id_module == -1 && $order->module == 'free_order',
|
||||
'any_back_order' => $any_back_order,
|
||||
'shw_bo_msg' => $shw_bo_msg,
|
||||
'back_ord_msg' => $bo_msg,
|
||||
|
||||
@@ -37,8 +37,9 @@ class OrderFollowControllerCore extends FrontController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
parent::initContent();
|
||||
$this->show_breadcrump = true;
|
||||
|
||||
parent::initContent();
|
||||
if (isset($this->context->customer->id) && $this->context->customer->id) {
|
||||
$ordersReturns = OrderReturn::getOrdersReturn($this->context->customer->id, Tools::getValue('id_order'));
|
||||
$this->context->smarty->assign('ordersReturns', $ordersReturns);
|
||||
|
||||
@@ -121,6 +121,31 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->context->customer->newsletter = (int)Tools::isSubmit('newsletter');
|
||||
$this->context->customer->optin = (int)Tools::isSubmit('optin');
|
||||
$this->context->customer->is_guest = (Tools::isSubmit('is_new_customer') ? !Tools::getValue('is_new_customer', 1) : 0);
|
||||
|
||||
if ($idAddressDelivery = Tools::getValue('opc_id_address_delivery')) {
|
||||
$objAddress = new Address($idAddressDelivery);
|
||||
if (Validate::isLoadedObject($objAddress)) {
|
||||
$phoneMobile = Tools::getValue('phone_mobile');
|
||||
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST') && !$phoneMobile) {
|
||||
$this->errors[] = Tools::displayError('Mobile phone number is a required field.', false);
|
||||
}
|
||||
|
||||
if (!Validate::isPhoneNumber($phoneMobile)) {
|
||||
$this->errors[] = Tools::displayError('Please enter a valid Mobile phone number.', false);
|
||||
}
|
||||
|
||||
if (!count($this->errors)) {
|
||||
$objAddress->phone_mobile = $phoneMobile;
|
||||
$objAddress->firstname = $this->context->customer->firstname;
|
||||
$objAddress->lastname = $this->context->customer->lastname;
|
||||
if (!$objAddress->save()) {
|
||||
$this->errors[] = Tools::displayError('Something went wrong while saving phone number. Please try again.', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return = array(
|
||||
'hasError' => !empty($this->errors),
|
||||
'errors' => $this->errors,
|
||||
@@ -221,10 +246,19 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
if (($id_order = $this->_checkFreeOrder()) && $id_order) {
|
||||
$order = new Order((int)$id_order);
|
||||
$email = $this->context->customer->email;
|
||||
$orderConfirmationUrl = $this->context->link->getPageLink('order-confirmation').'?id_cart='.$order->id_cart.'&id_module=-1'.'&id_order='.$id_order.'&key='.$order->secure_key;
|
||||
if ($this->context->customer->is_guest) {
|
||||
$this->context->customer->logout();
|
||||
} // If guest we clear the cookie for security reason
|
||||
$this->ajaxDie('freeorder:'.$order->reference.':'.$email);
|
||||
|
||||
$return = array(
|
||||
'success' => true,
|
||||
'reference' => $order->reference,
|
||||
'email' => $email,
|
||||
'order_confirmation_url' => $orderConfirmationUrl,
|
||||
);
|
||||
|
||||
$this->ajaxDie(json_encode($return));
|
||||
}
|
||||
exit;
|
||||
break;
|
||||
|
||||
@@ -48,6 +48,8 @@ class OrderSlipControllerCore extends FrontController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->show_breadcrump = true;
|
||||
|
||||
parent::initContent();
|
||||
|
||||
$this->context->smarty->assign('ordersSlip', OrderSlip::getOrdersSlip((int)$this->context->cookie->id_customer));
|
||||
|
||||
@@ -84,9 +84,6 @@ class PasswordControllerCore extends FrontController
|
||||
'{passwd}' => $password
|
||||
);
|
||||
if (Mail::Send($this->context->language->id, 'password', Mail::l('Your new password'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname)) {
|
||||
|
||||
$this->context->updateCustomer($customer);
|
||||
|
||||
$this->context->smarty->assign(array('confirmation' => 1, 'customer_email' => $customer->email));
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
|
||||
|
||||
@@ -277,11 +277,12 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
|
||||
$this->list_countries = array();
|
||||
$countries = $this->language->getCountries();
|
||||
$top_countries = array(
|
||||
'fr', 'es', 'us',
|
||||
'gb', 'it', 'de',
|
||||
'nl', 'pl', 'id',
|
||||
'be', 'br', 'se',
|
||||
'ca', 'ru', 'cn',
|
||||
'in', 'fr', 'es',
|
||||
'us', 'gb', 'it',
|
||||
'de', 'nl', 'pl',
|
||||
'id', 'be', 'br',
|
||||
'se', 'ca', 'ru',
|
||||
'cn',
|
||||
);
|
||||
|
||||
foreach ($top_countries as $iso) {
|
||||
|
||||
@@ -137,7 +137,6 @@ class InstallControllerHttpSystem extends InstallControllerHttp
|
||||
'register_globals' => $this->l('PHP register_globals option is enabled'),
|
||||
'gz' => $this->l('GZIP compression is not activated'),
|
||||
'mbstring' => $this->l('Mbstring extension is not enabled'),
|
||||
'magicquotes' => $this->l('PHP magic quotes option is enabled'),
|
||||
'dom' => $this->l('Dom extension is not loaded'),
|
||||
)
|
||||
),
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
<tab id="Administration" id_parent="" active="1" hide_host_mode="0">
|
||||
<class_name>AdminAdmin</class_name>
|
||||
</tab>
|
||||
<tab id="Stats" id_parent="" active="1" hide_host_mode="0">
|
||||
<!-- <tab id="Stats" id_parent="" active="1" hide_host_mode="0">
|
||||
<class_name>AdminParentStats</class_name>
|
||||
</tab>
|
||||
</tab> -->
|
||||
<tab id="Stock" id_parent="" active="1" hide_host_mode="0">
|
||||
<class_name>AdminStock</class_name>
|
||||
</tab>
|
||||
@@ -282,15 +282,15 @@
|
||||
<tab id="Menus" id_parent="Administration" active="1" hide_host_mode="0">
|
||||
<class_name>AdminTabs</class_name>
|
||||
</tab>
|
||||
<tab id="Stats_1" id_parent="Stats" active="1" hide_host_mode="0">
|
||||
<tab id="Stats_1" id_parent="" active="1" hide_host_mode="0">
|
||||
<class_name>AdminStats</class_name>
|
||||
</tab>
|
||||
<tab id="Search_Engines" id_parent="Stats" active="1" hide_host_mode="0">
|
||||
<!-- <tab id="Search_Engines" id_parent="Stats" active="1" hide_host_mode="0">
|
||||
<class_name>AdminSearchEngines</class_name>
|
||||
</tab>
|
||||
<tab id="Referrers" id_parent="Stats" active="1" hide_host_mode="0">
|
||||
</tab> -->
|
||||
<!-- <tab id="Referrers" id_parent="Stats" active="1" hide_host_mode="0">
|
||||
<class_name>AdminReferrers</class_name>
|
||||
</tab>
|
||||
</tab> -->
|
||||
<tab id="Warehouses" id_parent="Stock" active="1" hide_host_mode="0">
|
||||
<class_name>AdminWarehouses</class_name>
|
||||
</tab>
|
||||
|
||||
@@ -756,7 +756,7 @@ $(document).ready(function()
|
||||
|
||||
|
||||
$('select.chosen').each(function(k, item){
|
||||
$(item).chosen({disable_search_threshold: 10, search_contains: true});
|
||||
$(item).chosen({disable_search_threshold: 5, search_contains: true});
|
||||
});
|
||||
// Apply chosen() when modal is loaded
|
||||
$(document).on('shown.bs.modal', function (e) {
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
<span style="color:#777">
|
||||
Here are your login details:<br />
|
||||
<span style="color:#333"><strong>E-mail address: <a href="mailto:{email}" style="color:#337ff1">{email}</a></strong></span><br />
|
||||
<span style="color:#333"><strong>Password:</strong></span> {passwd}
|
||||
</span>
|
||||
</font>
|
||||
</td>
|
||||
|
||||
@@ -9,8 +9,6 @@ Here are your login details:
|
||||
|
||||
E-MAIL ADDRESS: {email}
|
||||
|
||||
PASSWORD: {passwd}
|
||||
|
||||
Important Security Tips:
|
||||
|
||||
* Always keep your account details safe.
|
||||
|
||||
@@ -17,26 +17,6 @@
|
||||
* @license LICENSE.txt
|
||||
*/
|
||||
|
||||
/* scrollbar design - start */
|
||||
#dashguestcycle.dashboard-top ::-webkit-scrollbar {
|
||||
height: 12px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#dashguestcycle.dashboard-top ::-webkit-scrollbar-track {
|
||||
background-color: #DDD;
|
||||
margin: 0 6px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#dashguestcycle.dashboard-top ::-webkit-scrollbar-thumb {
|
||||
background-color: #BBB;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 5px;
|
||||
|
||||
}
|
||||
/* scrollbar design - end */
|
||||
|
||||
#dashguestcycle {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
@@ -186,14 +186,6 @@ class HotelOrderRefundRules extends ObjectModel
|
||||
if ($refRule['payment_type'] == HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_PERCENTAGE) {
|
||||
$bookingCancellationDetail['reduction_type'] = HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_PERCENTAGE;
|
||||
$bookingCancellationDetail['cancelation_charge'] = $paidAmount * ($refundValue / 100);
|
||||
|
||||
if ($defaultCurrency != $orderCurrency) {
|
||||
$bookingCancellationDetail['cancelation_charge'] = Tools::convertPriceFull(
|
||||
$bookingCancellationDetail['cancelation_charge'],
|
||||
$objDefaultCurrency,
|
||||
$objOrderCurrency
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$bookingCancellationDetail['reduction_type'] = HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_FIXED;
|
||||
if ($defaultCurrency != $orderCurrency) {
|
||||
|
||||
@@ -44,8 +44,11 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
|
||||
$this->context->cookie->id_cart = (int) $objCart->id;
|
||||
} else {
|
||||
// use previous cart
|
||||
if (!validate::isLoadedObject($objCart = new Cart($this->context->cookie->id_cart))) {
|
||||
$objCart = new Cart($this->context->cookie->id_cart);
|
||||
$isCartValid = Validate::isLoadedObject($objCart);
|
||||
if (!$isCartValid || ($isCartValid && $objCart->orderExists())) {
|
||||
$objCart = $this->createNewCart();
|
||||
$this->context->cookie->id_cart = (int) $objCart->id;
|
||||
}
|
||||
}
|
||||
$this->context->cart = $objCart;
|
||||
@@ -418,7 +421,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
|
||||
$bookingParams['date_from'] = $searchDateFrom;
|
||||
$bookingParams['date_to'] = $searchDateTo;
|
||||
$bookingParams['hotel_id'] = $searchIdHotel;
|
||||
$bookingParams['room_type'] = $searchIdRoomType;
|
||||
$bookingParams['id_room_type'] = $searchIdRoomType;
|
||||
$bookingParams['adults'] = $adults;
|
||||
$bookingParams['children'] = $children;
|
||||
$bookingParams['num_rooms'] = $num_rooms;
|
||||
|
||||
@@ -472,6 +472,22 @@ p.room_cat_data
|
||||
border-color: #4d90fe;
|
||||
}
|
||||
|
||||
.gm-style-iw-d h6 {
|
||||
font-family: unset;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.gm-style-iw-d p {
|
||||
font-family: unset;
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==== AdminHotelFeaturePricesSettingsController ==== */
|
||||
.week_days {
|
||||
display: none;
|
||||
|
||||
@@ -69,7 +69,8 @@ var GoogleMapsManager = {
|
||||
var that = this;
|
||||
that.setDefaultLatLng(function() {
|
||||
that.map = new google.maps.Map($(that.mapDiv).get(0), {
|
||||
zoom: that.defaultZoom
|
||||
zoom: that.defaultZoom,
|
||||
clickableIcons: true,
|
||||
});
|
||||
that.map.setCenter(that.defaultLatLng);
|
||||
if (that.defaultLatLng && that.formattedAddress) {
|
||||
@@ -80,11 +81,78 @@ var GoogleMapsManager = {
|
||||
// register marker events
|
||||
that.map.addListener('click', function (e) {
|
||||
var latLng = e.latLng;
|
||||
that.geocoder.geocode({ location: latLng }, function (results, status) {
|
||||
if (status == google.maps.GeocoderStatus.OK && results[0]) {
|
||||
that.addMarker(latLng, results[0]);
|
||||
}
|
||||
});
|
||||
|
||||
var isInfoWindowNeeded = true;
|
||||
// if it is a Place Of Interest (POI), event contains the property 'placeId'
|
||||
if (Object.hasOwn(e, 'placeId')) {
|
||||
isInfoWindowNeeded = false;
|
||||
|
||||
that.geocoder.geocode({ location: latLng }, function (results, status) {
|
||||
if (status == google.maps.GeocoderStatus.OK && results[0]) {
|
||||
var request = {
|
||||
placeId: e.placeId,
|
||||
fields: ['name'],
|
||||
};
|
||||
|
||||
that.placesService.getDetails(request, function(place, status) {
|
||||
if (status === google.maps.places.PlacesServiceStatus.OK) {
|
||||
var content = '<div><h6>' + place.name + '</h6><p>' +
|
||||
results[0].formatted_address + '</p></div>';
|
||||
|
||||
var callback = function (latLng) {
|
||||
that.setFormVars({
|
||||
lat: latLng.lat(),
|
||||
lng: latLng.lng(),
|
||||
formattedAddress: content,
|
||||
inputText: $('#pac-input').val(),
|
||||
});
|
||||
}
|
||||
|
||||
that.addMarker(
|
||||
latLng,
|
||||
results[0],
|
||||
null,
|
||||
isInfoWindowNeeded,
|
||||
callback(latLng)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.geocoder.geocode({ location: latLng }, function (results, status) {
|
||||
if (status == google.maps.GeocoderStatus.OK && results[0]) {
|
||||
var request = {
|
||||
placeId: results[0].place_id,
|
||||
fields: ['name'],
|
||||
};
|
||||
|
||||
that.placesService.getDetails(request, function(place, status) {
|
||||
if (status === google.maps.places.PlacesServiceStatus.OK) {
|
||||
var content = '<div><h6>' + place.name + '</h6><p>' +
|
||||
results[0].formatted_address + '</p></div>';
|
||||
|
||||
var callback = function (latLng) {
|
||||
that.setFormVars({
|
||||
lat: latLng.lat(),
|
||||
lng: latLng.lng(),
|
||||
formattedAddress: content,
|
||||
inputText: $('#pac-input').val(),
|
||||
});
|
||||
}
|
||||
|
||||
that.addMarker(
|
||||
latLng,
|
||||
results[0],
|
||||
null,
|
||||
isInfoWindowNeeded,
|
||||
callback(latLng)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if(cb && typeof cb === 'function') {
|
||||
cb();
|
||||
@@ -122,7 +190,7 @@ var GoogleMapsManager = {
|
||||
};
|
||||
that.addMarker(latLng, place);
|
||||
|
||||
var content = '<div><strong>' + place.name + '</strong><br>' + place.formatted_address;
|
||||
var content = '<div><h6>' + place.name + '</h6><p>' + place.formatted_address + '</p></div>';
|
||||
that.setFormVars({
|
||||
lat: latLng.lat,
|
||||
lng: latLng.lng,
|
||||
@@ -142,7 +210,7 @@ var GoogleMapsManager = {
|
||||
}
|
||||
});
|
||||
},
|
||||
addMarker: function(latLng, address = null, fa = null, cb = null) {
|
||||
addMarker: function(latLng, address = null, fa = null, addInfoWindow = true, cb = null) {
|
||||
var that = this;
|
||||
that.clearAllMarkers();
|
||||
var marker = new google.maps.Marker({
|
||||
@@ -163,23 +231,36 @@ var GoogleMapsManager = {
|
||||
});
|
||||
});
|
||||
|
||||
if (address === null && fa) {
|
||||
// open info window
|
||||
that.addInfoWindow(marker, fa);
|
||||
if (addInfoWindow) {
|
||||
if (address === null && fa) {
|
||||
// open info window
|
||||
that.addInfoWindow(marker, fa);
|
||||
} else {
|
||||
var request = {
|
||||
placeId: address.place_id,
|
||||
fields: ['name'],
|
||||
};
|
||||
|
||||
that.placesService.getDetails(request, function(place, status) {
|
||||
if (status === google.maps.places.PlacesServiceStatus.OK) {
|
||||
// open info window
|
||||
var content = '<div><h6>' + place.name + '</h6><p>' + address.formatted_address + '</p></div>';
|
||||
that.addInfoWindow(marker, content);
|
||||
|
||||
if(cb && typeof cb === 'function') {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
var request = {
|
||||
placeId: address.place_id,
|
||||
fields: ['name'],
|
||||
};
|
||||
that.placesService.getDetails(request, function(place, status) {
|
||||
if (status === google.maps.places.PlacesServiceStatus.OK) {
|
||||
// open info window
|
||||
var content = '<div><strong>' + place.name + '</strong><br>' +
|
||||
address.formatted_address + '</div>';
|
||||
that.addInfoWindow(marker, content);
|
||||
}
|
||||
});
|
||||
if(cb && typeof cb === 'function') {
|
||||
cb();
|
||||
}
|
||||
|
||||
return marker;
|
||||
}
|
||||
|
||||
},
|
||||
clearAllMarkers: function() {
|
||||
for (var i = 0; i < this.markers.length; i++) {
|
||||
@@ -190,13 +271,21 @@ var GoogleMapsManager = {
|
||||
addInfoWindow: function(marker, content) {
|
||||
if (typeof google === 'object') {
|
||||
var that = this;
|
||||
|
||||
var infoWindow = new google.maps.InfoWindow({
|
||||
content: content,
|
||||
maxWidth: 200,
|
||||
});
|
||||
|
||||
infoWindow.open({
|
||||
anchor: marker,
|
||||
map: that.map
|
||||
});
|
||||
|
||||
google.maps.event.addListener(infoWindow, 'closeclick', function () {
|
||||
that.clearAllMarkers();
|
||||
});
|
||||
|
||||
var latLng = marker.getPosition();
|
||||
that.setFormVars({
|
||||
lat: latLng.lat(),
|
||||
@@ -214,6 +303,10 @@ var GoogleMapsManager = {
|
||||
},
|
||||
}
|
||||
|
||||
$(document).on('click', 'button.gm-ui-hover-effect', function () {
|
||||
GoogleMapsManager.clearAllMarkers();
|
||||
});
|
||||
|
||||
function initGoogleMaps() {
|
||||
if (typeof enabledDisplayMap != 'undefined'
|
||||
&& typeof google === 'object'
|
||||
|
||||
@@ -28,6 +28,8 @@ $(document).ready(function() {
|
||||
url: rooms_booking_url,
|
||||
method: 'POST',
|
||||
extraParams: function() {
|
||||
removeInitializedTooltips();
|
||||
|
||||
return $.extend(
|
||||
{
|
||||
ajax: true,
|
||||
@@ -183,6 +185,14 @@ $(document).ready(function() {
|
||||
calendar.render();
|
||||
}
|
||||
|
||||
function removeInitializedTooltips() {
|
||||
$('#fullcalendar a.day-info, #fullcalendar .fc-daygrid-event').each(function () {
|
||||
if ($(this).data('ui-tooltip')) {
|
||||
$(this).tooltip('destroy');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getSearchData()
|
||||
{
|
||||
return {
|
||||
@@ -869,6 +879,12 @@ $(document).ready(function() {
|
||||
$("#cartModal").html(result.cart_content);
|
||||
}
|
||||
$("#cart_record").html(result.total_products_in_cart);
|
||||
|
||||
if (parseInt(result.total_products_in_cart) > 0) {
|
||||
$('#cart_record').closest('button').removeClass('disabled');
|
||||
} else {
|
||||
$('#cart_record').closest('button').addClass('disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
{l s='Upload images' mod='hotelreservationsystem'} :
|
||||
</label>
|
||||
<div class="col-sm-5">
|
||||
<input class="form-control-static" type="file" id="hotel_images" name="hotel_images[]" multiple>
|
||||
<input class="form-control-static" type="file" accept="image/gif, image/jpg, image/jpeg, image/png" id="hotel_images" name="hotel_images[]" multiple>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
@@ -497,4 +497,4 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
{/block}
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-info"></i> {if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}{l s='Booking Calender' mod='hotelreservationsystem'}{else}{l s='Service Products' mod='hotelreservationsystem'}{/if }
|
||||
<button type="button" class="btn btn-primary" id="cart_btn" data-toggle="modal" data-target="#cartModal"><i class="icon-shopping-cart"></i> {l s='Cart' mod='hotelreservationsystem'} <span class="badge" id="cart_record">{$total_products_in_cart}</span></button>
|
||||
<button type="button" class="btn btn-primary {if $total_products_in_cart|intval == 0}disabled{/if}" id="cart_btn" data-toggle="modal" data-target="#cartModal"><i class="icon-shopping-cart"></i> {l s='Cart' mod='hotelreservationsystem'} <span class="badge" id="cart_record">{$total_products_in_cart}</span></button>
|
||||
</div>
|
||||
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
|
||||
<div id='fullcalendar'></div>
|
||||
|
||||
@@ -64,7 +64,9 @@ class wkhotelfilterblock extends Module
|
||||
if ($this->context->controller->php_self == 'category') {
|
||||
|
||||
$htl_id_category = Tools::getValue('id_category');
|
||||
if (Validate::isLoadedObject($objCategory = new Category((int) $htl_id_category))) {
|
||||
if (Validate::isLoadedObject($objCategory = new Category((int) $htl_id_category))
|
||||
&& ($id_hotel = HotelBranchInformation::getHotelIdByIdCategory($htl_id_category))
|
||||
) {
|
||||
if ($objCategory->hasParent(Configuration::get('PS_LOCATIONS_CATEGORY'))) {
|
||||
Media::addJsDef(array('noRoomAvailTxt' => $this->l('No room available', false, true)));
|
||||
|
||||
@@ -73,8 +75,6 @@ class wkhotelfilterblock extends Module
|
||||
$id_lang = $this->context->language->id;
|
||||
$all_feat = FeatureCore::getFeatures($id_lang);
|
||||
|
||||
$id_hotel = HotelBranchInformation::getHotelIdByIdCategory($htl_id_category);
|
||||
|
||||
$max_adult = HotelRoomType::getMaxAdults($id_hotel);
|
||||
$max_child = HotelRoomType::getMaxChild($id_hotel);
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ $(document).ready(function() {
|
||||
data: {
|
||||
q: word,
|
||||
_: n,
|
||||
booking_product: '1',
|
||||
},
|
||||
success: function(result) {
|
||||
if (result) {
|
||||
|
||||
@@ -124,7 +124,9 @@ class WkRoomSearchBlock extends Module
|
||||
{
|
||||
if ('category' == Tools::getValue('controller')) {
|
||||
$idCategory = Tools::getValue('id_category');
|
||||
if (Validate::isLoadedObject($objCategory = new Category((int) $idCategory))) {
|
||||
if (Validate::isLoadedObject($objCategory = new Category((int) $idCategory))
|
||||
&& HotelBranchInformation::getHotelIdByIdCategory($idCategory)
|
||||
) {
|
||||
if ($objCategory->hasParent(Configuration::get('PS_LOCATIONS_CATEGORY'))) {
|
||||
$objSearchHelper = new WkRoomSearchHelper();
|
||||
$objSearchHelper->assignSearchPanelVariables();
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<th colspan="{$th_rows}" class="header">{l s='Tax Details' pdf='true'}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="header-left small">{l s='Tax Detail' pdf='true'}</th>
|
||||
<th class="header-left small">{l s='Taxable category' pdf='true'}</th>
|
||||
{if isset($showTaxName) && $showTaxName}
|
||||
<th class="header-left small">{l s='Tax Name' pdf='true'}</th>
|
||||
{/if}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</a>
|
||||
{foreach $product.images as $image}
|
||||
{if $image['cover'] == 0}
|
||||
<a href="{$link->getImageLink($product.link_rewrite, $image.id_image, 'large_default')|escape:'html':'UTF-8'}" rel="htl-images{$product['id_product']}" class="fancybox hidden">
|
||||
<a href="{$link->getImageLink($product.link_rewrite, $image.id_image, 'large_default')|escape:'html':'UTF-8'}" rel="htl-images{$product['id_product']}" class="fancybox hidden" title="{if !empty($image.legend)}{$image.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}">
|
||||
</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
@@ -22,14 +22,24 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{capture name=path}{l s='Your address'}{/capture}
|
||||
{capture name=path}
|
||||
<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
|
||||
{l s='My account'}
|
||||
</a>
|
||||
<span class="navigation-pipe">
|
||||
{$navigationPipe}
|
||||
</span>
|
||||
<span class="navigation_page">
|
||||
{l s='Address'}
|
||||
</span>
|
||||
{/capture}
|
||||
{if isset($smarty.get.updated) && $smarty.get.updated}
|
||||
<p class="alert alert-success">
|
||||
{l s='Your address has been successfully updated.'}
|
||||
</p>
|
||||
{/if}
|
||||
<div class="box">
|
||||
<h1 class="page-subheading">{l s='Your address'}</h1>
|
||||
<h1 class="page-subheading">{l s='Address'}</h1>
|
||||
<p class="info-title">
|
||||
{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}
|
||||
{l s='Modify address'}
|
||||
@@ -215,7 +225,7 @@
|
||||
<ul class="footer_links clearfix">
|
||||
<li>
|
||||
<a class="btn btn-defaul button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
|
||||
<span><i class="icon-chevron-left"></i> {l s='Back to your account'}</span>
|
||||
<span><i class="icon-chevron-left"></i> {l s='Back to My account'}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -409,11 +409,6 @@
|
||||
font-size: 14px;
|
||||
color: #0000FF;
|
||||
}
|
||||
#order-opc .avail_vouchers_block .avail_voucher_des {
|
||||
font-size: 12px;
|
||||
color: #777777;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
#order-opc .avail_vouchers_block .seperator {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{capture name=path}<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">{l s='My account'}</a><span class="navigation-pipe">{$navigationPipe}</span><span class="navigation_page">{l s='My vouchers'}</span>{/capture}
|
||||
{capture name=path}<a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">{l s='My account'}</a><span class="navigation-pipe">{$navigationPipe}</span><span class="navigation_page">{l s='Vouchers'}</span>{/capture}
|
||||
|
||||
<h1 class="page-heading">
|
||||
{l s='My vouchers'}
|
||||
{l s='Vouchers'}
|
||||
</h1>
|
||||
|
||||
{if isset($cart_rules) && $nb_cart_rules}
|
||||
@@ -33,7 +33,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sort-ignore="true" class="discount_code first_item">{l s='Code'}</th>
|
||||
<th data-sort-ignore="true" class="discount_description item">{l s='Description'}</th>
|
||||
<th data-sort-ignore="true" class="discount_description item">{l s='Name'}</th>
|
||||
<th class="discount_quantity item">{l s='Quantity'}</th>
|
||||
<th data-sort-ignore="true" data-hide="phone,tablet" class="discount_value item">{l s='Value'}</th>
|
||||
<th data-hide="phone,tablet" class="discount_minimum item">{l s='Minimum'}</th>
|
||||
@@ -98,7 +98,7 @@
|
||||
<li>
|
||||
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
|
||||
<span>
|
||||
<i class="icon-chevron-left"></i> {l s='Back to your account'}
|
||||
<i class="icon-chevron-left"></i> {l s='Back to My account'}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
{l s='My account'}
|
||||
</a>
|
||||
<span class="navigation-pipe">{$navigationPipe}</span>
|
||||
<span class="navigation_page">{l s='Order history'}</span>
|
||||
<span class="navigation_page">{l s='Bookings'}</span>
|
||||
{/capture}
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
<h1 class="page-heading bottom-indent">{l s='Order history'}</h1>
|
||||
<h1 class="page-heading bottom-indent">{l s='Bookings'}</h1>
|
||||
<p class="info-title">{l s='Here are the orders you\'ve placed since your account was created.'}</p>
|
||||
{if $slowValidation}
|
||||
<p class="alert alert-warning">{l s='If you have just placed an order, it may take a few minutes for it to be validated. Please refresh this page if your order is missing.'}</p>
|
||||
@@ -127,7 +127,7 @@
|
||||
<li>
|
||||
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
|
||||
<span>
|
||||
<i class="icon-chevron-left"></i> {l s='Back to Your Account'}
|
||||
<i class="icon-chevron-left"></i> {l s='Back to My account'}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
{$navigationPipe}
|
||||
</span>
|
||||
<span class="navigation_page">
|
||||
{l s='Your personal information'}
|
||||
{l s='Personal information'}
|
||||
</span>
|
||||
{/capture}
|
||||
<div class="box">
|
||||
<h1 class="page-subheading">
|
||||
{l s='Your personal information'}
|
||||
{l s='Personal information'}
|
||||
</h1>
|
||||
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
@@ -206,7 +206,7 @@
|
||||
<li>
|
||||
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)}">
|
||||
<span>
|
||||
<i class="icon-chevron-left"></i>{l s='Back to your account'}
|
||||
<i class="icon-chevron-left"></i>{l s='Back to My account'}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -630,8 +630,8 @@ function updatePaymentMethodsDisplay()
|
||||
|
||||
function updateAddressSelection(is_adv_api)
|
||||
{
|
||||
var idAddress_delivery = ($('#opc_id_address_delivery').length == 1 ? $('#opc_id_address_delivery').val() : $('#id_address_delivery').val());
|
||||
var idAddress_invoice = ($('#opc_id_address_invoice').length == 1 ? $('#opc_id_address_invoice').val() : ($('#addressesAreEquals:checked').length == 1 ? idAddress_delivery : ($('#id_address_invoice').length == 1 ? $('#id_address_invoice').val() : idAddress_delivery)));
|
||||
var idAddress_delivery = $('#opc_id_address_delivery').val();
|
||||
var idAddress_invoice = $('#opc_id_address_invoice').val();
|
||||
|
||||
$('#opc_account-overlay').fadeIn('slow');
|
||||
$('#opc_delivery_methods-overlay').fadeIn('slow');
|
||||
@@ -912,18 +912,17 @@ function confirmFreeOrder()
|
||||
url: orderOpcUrl + '?rand=' + new Date().getTime(),
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType : "html",
|
||||
dataType : 'JSON',
|
||||
data: 'ajax=true&method=makeFreeOrder&token=' + static_token ,
|
||||
success: function(html)
|
||||
success: function(response)
|
||||
{
|
||||
$('#confirmOrder').prop('disabled', false);
|
||||
var array_split = html.split(':');
|
||||
if (array_split[0] == 'freeorder')
|
||||
{
|
||||
if (isGuest)
|
||||
document.location.href = guestTrackingUrl+'?id_order='+encodeURIComponent(array_split[1])+'&email='+encodeURIComponent(array_split[2]);
|
||||
else
|
||||
document.location.href = historyUrl;
|
||||
if (response.success) {
|
||||
$('#confirmOrder').prop('disabled', false);
|
||||
if (isGuest) {
|
||||
document.location.href = guestTrackingUrl+'?id_order='+encodeURIComponent(response.reference)+'&email='+encodeURIComponent(response.email);
|
||||
} else {
|
||||
document.location.href = response.order_confirmation_url;
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
|
||||
@@ -35,20 +35,20 @@
|
||||
<div class="row addresses-lists">
|
||||
<div class="col-xs-12 col-sm-6 col-lg-4">
|
||||
<ul class="myaccount-link-list">
|
||||
<li><a href="{$link->getPageLink('address', true)|escape:'html':'UTF-8'}" title="{l s='My address'}"><i class="icon-building"></i><span>{l s='My address'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('history', true)|escape:'html':'UTF-8'}" title="{l s='Orders'}"><i class="icon-list-ol"></i><span>{l s='Order history and details'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('address', true)|escape:'html':'UTF-8'}" title="{l s='Address'}"><i class="icon-building"></i><span>{l s='Address'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('history', true)|escape:'html':'UTF-8'}" title="{l s='Bookings'}"><i class="icon-list-ol"></i><span>{l s='Bookings'}</span></a></li>
|
||||
{if $refundAllowed}
|
||||
<li><a href="{$link->getPageLink('order-follow', true)|escape:'html':'UTF-8'}" title="{l s='Booking Refund Requests'}"><i class="icon-refresh"></i><span>{l s='Booking Refund Requests'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('order-follow', true)|escape:'html':'UTF-8'}" title="{l s='Booking refund requests'}"><i class="icon-refresh"></i><span>{l s='Booking refund requests'}</span></a></li>
|
||||
{/if}
|
||||
<li><a href="{$link->getPageLink('order-slip', true)|escape:'html':'UTF-8'}" title="{l s='Credit slips'}"><i class="icon-file-o"></i><span>{l s='My credit slips'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('identity', true)|escape:'html':'UTF-8'}" title="{l s='Information'}"><i class="icon-user"></i><span>{l s='My personal information'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('order-slip', true)|escape:'html':'UTF-8'}" title="{l s='Credit slips'}"><i class="icon-file-o"></i><span>{l s='Credit slips'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('identity', true)|escape:'html':'UTF-8'}" title="{l s='Personal information'}"><i class="icon-user"></i><span>{l s='Personal information'}</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{if $voucherAllowed || isset($HOOK_CUSTOMER_ACCOUNT) && $HOOK_CUSTOMER_ACCOUNT !=''}
|
||||
<div class="col-xs-12 col-sm-6 col-lg-4">
|
||||
<ul class="myaccount-link-list">
|
||||
{if $voucherAllowed}
|
||||
<li><a href="{$link->getPageLink('discount', true)|escape:'html':'UTF-8'}" title="{l s='Vouchers'}"><i class="icon-barcode"></i><span>{l s='My vouchers'}</span></a></li>
|
||||
<li><a href="{$link->getPageLink('discount', true)|escape:'html':'UTF-8'}" title="{l s='Vouchers'}"><i class="icon-barcode"></i><span>{l s='Vouchers'}</span></a></li>
|
||||
{/if}
|
||||
{$HOOK_CUSTOMER_ACCOUNT}
|
||||
</ul>
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
<a class="button-exclusive btn btn-default" href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order|urlencode}&email={$email|urlencode}")|escape:'html':'UTF-8'}" title="{l s='Follow my order'}"><i class="icon-chevron-left"></i>{l s='Follow my order'}</a>
|
||||
</p>
|
||||
{else}
|
||||
{if isset($is_free_order) && $is_free_order}
|
||||
<p class="alert alert-success">{l s='Your order on %s is complete.' sprintf=$shop_name}</p><br />
|
||||
{/if}
|
||||
<p><strong>{l s='Order Status :'}</strong> <span>{l s='Confirmed'}</span></p>
|
||||
<p><strong>{l s='Order Reference :'}</strong> <span class="bold">{$order->reference}</span></p>
|
||||
{if $any_back_order}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{$navigationPipe}
|
||||
</span>
|
||||
<span class="navigation_page">
|
||||
{l s='Booking Refund Requests'}
|
||||
{l s='Booking refund requests'}
|
||||
</span>
|
||||
{/capture}
|
||||
|
||||
@@ -86,6 +86,6 @@
|
||||
</div>
|
||||
|
||||
<ul class="footer_links clearfix">
|
||||
<li><a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"><span><i class="icon-chevron-left"></i> {l s='Back to your account'}</span></a></li>
|
||||
<li><a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}"><span><i class="icon-chevron-left"></i> {l s='Back to My account'}</span></a></li>
|
||||
<li><a class="btn btn-default button button-small" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}"><span><i class="icon-chevron-left"></i> {l s='Home'}</span></a></li>
|
||||
</ul>
|
||||
@@ -46,6 +46,8 @@
|
||||
|
||||
{* Accordian for all blocks *}
|
||||
<div class="accordion" id="oprder-opc-accordion">
|
||||
<input type="hidden" name="opc_id_address_delivery" value="{$cart->id_address_delivery}" id="opc_id_address_delivery" />
|
||||
<input type="hidden" name="opc_id_address_invoice" value="{$cart->id_address_invoice}" id="opc_id_address_invoice" />
|
||||
{if isset($checkout_process_steps) && $checkout_process_steps}
|
||||
{foreach $checkout_process_steps as $step}
|
||||
{if $step->step_key == 'checkout_rooms_summary'}
|
||||
@@ -437,7 +439,6 @@
|
||||
<p class="avail_voucher_name">
|
||||
<span class="voucher_name" data-code="{$voucher.code|escape:'html':'UTF-8'}">{$voucher.code|escape:'html':'UTF-8'} - </span>{$voucher.name}
|
||||
</p>
|
||||
<p class="avail_voucher_des">{$voucher['description']}</p>
|
||||
{if not $smarty.foreach.availVoucher.last}
|
||||
<hr class="seperator">
|
||||
{/if}
|
||||
@@ -460,7 +461,6 @@
|
||||
{addJsDef imgDir=$img_dir}
|
||||
{addJsDef authenticationUrl=$link->getPageLink("authentication", true)|escape:'quotes':'UTF-8'}
|
||||
{addJsDef orderOpcUrl=$link->getPageLink("order-opc", true)|escape:'quotes':'UTF-8'}
|
||||
{addJsDef historyUrl=$link->getPageLink("history", true)|escape:'quotes':'UTF-8'}
|
||||
{addJsDef guestTrackingUrl=$link->getPageLink("guest-tracking", true)|escape:'quotes':'UTF-8'}
|
||||
{addJsDef addressUrl=$link->getPageLink("address", true, NULL, "back={$back_order_page}")|escape:'quotes':'UTF-8'}
|
||||
{addJsDef orderProcess='order-opc'}
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
<li>
|
||||
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
|
||||
<span>
|
||||
<i class="icon-chevron-left"></i> {l s='Back to your account'}
|
||||
<i class="icon-chevron-left"></i> {l s='Back to My account'}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -114,6 +114,11 @@ class Smarty_Internal_Method_ClearCompiledTemplate
|
||||
$unlink = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (substr($_filepath, -9) == 'index.php') {
|
||||
$unlink = false;
|
||||
}
|
||||
|
||||
if ($unlink && is_file($_filepath) && @unlink($_filepath)) {
|
||||
$_count++;
|
||||
if (function_exists('opcache_invalidate')
|
||||
|
||||
Reference in New Issue
Block a user