Merge branch 'develop' into gli-2538
This commit is contained in:
@@ -458,7 +458,7 @@
|
||||
<tr>
|
||||
<td>{dateFormat date=$payment['date_add'] full=true}</td>
|
||||
<td>{$payment['payment_method']|escape:'html':'UTF-8'}</td>
|
||||
<td>{$payment_types[$payment['payment_type']]['name']|escape:'html':'UTF-8'}</td>
|
||||
<td>{$payment_types[$payment['payment_type']]['name']|escape:'UTF-8'}</td>
|
||||
<td>{$payment['transaction_id']|escape:'html':'UTF-8'}</td>
|
||||
<td>{displayPrice price=$payment['real_paid_amount'] currency=$payment['id_currency']}</td>
|
||||
<td>{if isset($payment['invoice_number'])}{$payment['invoice_number']}{else}--{/if}</td>
|
||||
|
||||
@@ -101,8 +101,8 @@
|
||||
</td>
|
||||
<td class="col-sm-1 center">
|
||||
{if isset($room_info['id'])}
|
||||
{if $room_info['booked_dates']}
|
||||
<input type="hidden" class="booked-dates" name="{$var_name_room_info|cat:'[booked_dates]'}" value='{$room_info['booked_dates']|json_encode|escape:'html':'UTF-8'}'>
|
||||
{if isset($room_info['booked_dates']) && $room_info['booked_dates']}
|
||||
<input type="hidden" class="booked-dates" name="{$var_name_room_info|cat:'[booked_dates]'}" value='{$room_info['booked_dates']|escape:'html':'UTF-8'}'>
|
||||
<a href="#" class="view_htl_room btn btn-default" data-toggle="modal" data-target="#room-dates-modal" data-id-room="{$room_info['id']}"><i class="icon-info"></i></a>
|
||||
{/if}
|
||||
<a href="#" class="rm_htl_room btn btn-default" data-id-htl-info="{$room_info['id']}"><i class="icon-trash"></i></a>
|
||||
|
||||
@@ -413,13 +413,6 @@ $(document).ready(function () {
|
||||
<td>
|
||||
{$featurePlan['feature_price_name']}
|
||||
</td>
|
||||
<td>
|
||||
{if $featurePlan['impact_type'] == HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE}
|
||||
{l s='Percentage'}
|
||||
{else}
|
||||
{l s='Fixed Amount'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $featurePlan['impact_way'] == HotelRoomTypeFeaturePricing::IMPACT_WAY_DECREASE}
|
||||
{l s='Decrease'}
|
||||
@@ -427,6 +420,13 @@ $(document).ready(function () {
|
||||
{l s='Increase'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $featurePlan['impact_type'] == HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE}
|
||||
{l s='Percentage'}
|
||||
{else}
|
||||
{l s='Fixed Amount'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $featurePlan['impact_type'] == HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE}
|
||||
{$featurePlan['impact_value']|round:2}%
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<li>
|
||||
<a id="page-header-desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass|escape}{else}{$k}{/if}" class="toolbar_btn {if isset($btn.target) && $btn.target} _blank{/if} pointer"{if isset($btn.href)} href="{$btn.href|escape}"{/if} title="{if isset($btn.help)}{$btn.help}{else}{$btn.desc|escape}{/if}"{if isset($btn.js) && $btn.js} onclick="{$btn.js}"{/if}{if isset($btn.modal_target) && $btn.modal_target} data-target="{$btn.modal_target}" data-toggle="modal"{/if}{if isset($btn.help)} data-toggle="tooltip" data-placement="bottom"{/if}>
|
||||
<i class="{if isset($btn.icon)}{$btn.icon|escape}{else}process-icon-{if isset($btn.imgclass)}{$btn.imgclass|escape}{else}{$k}{/if}{/if}{if isset($btn.class)} {$btn.class|escape}{/if}"></i>
|
||||
<span{if isset($btn.force_desc) && $btn.force_desc == true } class="locked"{/if}>{$btn.desc|escape}</span>
|
||||
<span{if isset($btn.force_desc) && $btn.force_desc == true } class="locked"{/if}>{$btn.desc}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
@@ -149,8 +149,7 @@ class CustomerCore extends ObjectModel
|
||||
'last_passwd_gen' => array('setter' => null),
|
||||
'secure_key' => array('setter' => null),
|
||||
'deleted' => array(),
|
||||
'passwd' => array('setter' => 'setWsPasswd'),
|
||||
'phone' => array()
|
||||
'passwd' => array('setter' => 'setWsPasswd')
|
||||
),
|
||||
'associations' => array(
|
||||
'groups' => array('resource' => 'group'),
|
||||
@@ -180,6 +179,7 @@ class CustomerCore extends ObjectModel
|
||||
'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'),
|
||||
'siret' => array('type' => self::TYPE_STRING, 'validate' => 'isSiret'),
|
||||
'ape' => array('type' => self::TYPE_STRING, 'validate' => 'isApe'),
|
||||
'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32),
|
||||
'outstanding_allow_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'copy_post' => false),
|
||||
'show_public_prices' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false),
|
||||
'id_risk' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false),
|
||||
@@ -206,12 +206,8 @@ class CustomerCore extends ObjectModel
|
||||
$this->id_default_group = (int)Configuration::get('PS_CUSTOMER_GROUP');
|
||||
parent::__construct($id);
|
||||
|
||||
if ($this->email) {
|
||||
$this->phone = CustomerGuestDetail::getCustomerPhone($this->email, false);
|
||||
}
|
||||
|
||||
if (Configuration::get('PS_ONE_PHONE_AT_LEAST')) {
|
||||
$this->webserviceParameters['fields']['phone']['required'] = true;
|
||||
self::$definition['fields']['phone']['required'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +260,7 @@ class CustomerCore extends ObjectModel
|
||||
}
|
||||
$success = parent::add($autodate, $null_values);
|
||||
$this->updateGroup($this->groupBox);
|
||||
$this->updateCustomerAdditionalDetails(CustomerGuestDetail::getIdCustomerGuest($this->email, false));
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
@@ -289,22 +285,9 @@ class CustomerCore extends ObjectModel
|
||||
|
||||
$objOldCustomer = new Customer($this->id);
|
||||
$success = parent::update(true);
|
||||
$this->updateCustomerAdditionalDetails(CustomerGuestDetail::getIdCustomerGuest($objOldCustomer->email, false));
|
||||
return $success;
|
||||
}
|
||||
|
||||
public function updateCustomerAdditionalDetails($idCustomerGuest)
|
||||
{
|
||||
$objCustomerGuestDetail = new CustomerGuestDetail($idCustomerGuest);
|
||||
$objCustomerGuestDetail->id_customer = 0;
|
||||
$objCustomerGuestDetail->id_gender = $this->id_gender;
|
||||
$objCustomerGuestDetail->firstname = $this->firstname;
|
||||
$objCustomerGuestDetail->lastname = $this->lastname;
|
||||
$objCustomerGuestDetail->email = $this->email;
|
||||
$objCustomerGuestDetail->phone = $this->phone;
|
||||
return $objCustomerGuestDetail->save();
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
if (!count(Order::getCustomerOrders((int)$this->id))) {
|
||||
@@ -344,8 +327,6 @@ class CustomerCore extends ObjectModel
|
||||
|
||||
CartRule::deleteByIdCustomer((int)$this->id);
|
||||
// delete customer data from customerGuest table
|
||||
$objCustomerGuestDetail = new CustomerGuestDetail(CustomerGuestDetail::getIdCustomerGuest($this->email, false));
|
||||
$objCustomerGuestDetail->delete();
|
||||
return parent::delete();
|
||||
}
|
||||
|
||||
|
||||
@@ -1384,7 +1384,7 @@ abstract class PaymentModuleCore extends Module
|
||||
} // End foreach $order_detail_list
|
||||
|
||||
// delete cart feature prices after booking creation success
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($id_cart);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($id_cart);
|
||||
|
||||
if (count($cart_rules)) {
|
||||
foreach ($cart_rules as $idCartRule => $cartRule) {
|
||||
|
||||
@@ -3043,7 +3043,7 @@ class ProductCore extends ObjectModel
|
||||
public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null,
|
||||
$only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null,
|
||||
$id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null,
|
||||
$use_customer_price = true, $id_product_roomtype = false)
|
||||
$use_customer_price = true, $id_product_roomtype = false, $id_group = null)
|
||||
{
|
||||
if (!$context) {
|
||||
$context = Context::getContext();
|
||||
@@ -3060,14 +3060,16 @@ class ProductCore extends ObjectModel
|
||||
}
|
||||
|
||||
// Initializations
|
||||
$id_group = null;
|
||||
if ($id_customer) {
|
||||
$id_group = Customer::getDefaultGroupId((int)$id_customer);
|
||||
}
|
||||
|
||||
if (!$id_group) {
|
||||
$id_group = (int)Group::getCurrent()->id;
|
||||
if ($id_customer) {
|
||||
$id_group = Customer::getDefaultGroupId((int)$id_customer);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$id_group || !Validate::isLoadedObject(new Group((int) $id_group))) {
|
||||
$id_group = (int)Group::getCurrent()->id;
|
||||
}
|
||||
// If there is cart in context or if the specified id_cart is different from the context cart id
|
||||
if (!is_object($cur_cart) || (Validate::isUnsignedInt($id_cart) && $id_cart && $cur_cart->id != $id_cart)) {
|
||||
/*
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
class TranslateCore
|
||||
{
|
||||
public static $ignore_folder = array('.', '..', '.svn', '.git', '.htaccess', 'index.php');
|
||||
public static $adminTranslations = array();
|
||||
public static $moduleTranslations = array();
|
||||
|
||||
/**
|
||||
* Get a translation for an admin controller
|
||||
@@ -43,21 +45,19 @@ class TranslateCore
|
||||
public static function getAdminTranslation($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true, $sprintf = null)
|
||||
{
|
||||
static $modules_tabs = null;
|
||||
|
||||
// @todo remove global keyword in translations files and use static
|
||||
global $_LANGADM;
|
||||
|
||||
if ($modules_tabs === null) {
|
||||
$modules_tabs = Tab::getModuleTabList();
|
||||
}
|
||||
|
||||
if ($_LANGADM == null) {
|
||||
$iso = Context::getContext()->language->iso_code;
|
||||
if (empty($iso)) {
|
||||
$iso = Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
}
|
||||
$iso = Context::getContext()->language->iso_code;
|
||||
if (empty($iso)) {
|
||||
$iso = Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
}
|
||||
|
||||
if (!isset(self::$adminTranslations[$iso])) {
|
||||
if (file_exists(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php')) {
|
||||
include_once(_PS_TRANSLATIONS_DIR_.$iso.'/admin.php');
|
||||
self::$adminTranslations[$iso] = $GLOBALS['_LANGADM'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,10 +71,10 @@ class TranslateCore
|
||||
|
||||
$string = preg_replace("/\\\*'/", "\'", $string);
|
||||
$key = md5($string);
|
||||
if (isset($_LANGADM[$class.$key])) {
|
||||
$str = $_LANGADM[$class.$key];
|
||||
if (isset(self::$adminTranslations[$iso][$class.$key])) {
|
||||
$str = self::$adminTranslations[$iso][$class.$key];
|
||||
} else {
|
||||
$str = Translate::getGenericAdminTranslation($string, $key, $_LANGADM);
|
||||
$str = Translate::getGenericAdminTranslation($string, $key, self::$adminTranslations[$iso]);
|
||||
}
|
||||
|
||||
if ($htmlentities) {
|
||||
@@ -128,7 +128,7 @@ class TranslateCore
|
||||
*/
|
||||
public static function getModuleTranslation($module, $string, $source, $sprintf = null, $addslashes = false, $language = null)
|
||||
{
|
||||
global $_MODULES, $_MODULE, $_LANGADM;
|
||||
global $_MODULE;
|
||||
|
||||
static $lang_cache = array();
|
||||
// $_MODULES is a cache of translations for all module.
|
||||
@@ -146,15 +146,19 @@ class TranslateCore
|
||||
$force_refresh = true;
|
||||
}
|
||||
|
||||
if ((!isset($translations_merged[$name]) && isset(Context::getContext()->language)) || $force_refresh) {
|
||||
$iso = $language->iso_code;
|
||||
if (!isset(self::$moduleTranslations[$iso])) {
|
||||
self::$moduleTranslations[$iso] = array();
|
||||
}
|
||||
if ((isset(Context::getContext()->language) && !isset($translations_merged[$name])) || $force_refresh) {
|
||||
$files_by_priority = array(
|
||||
// Translations in theme
|
||||
_PS_THEME_DIR_.'modules/'.$name.'/translations/'.$language->iso_code.'.php',
|
||||
_PS_THEME_DIR_.'modules/'.$name.'/'.$language->iso_code.'.php',
|
||||
_PS_THEME_DIR_.'modules/'.$name.'/translations/'.$iso.'.php',
|
||||
_PS_THEME_DIR_.'modules/'.$name.'/'.$iso.'.php',
|
||||
// PrestaShop 1.5 translations
|
||||
_PS_MODULE_DIR_.$name.'/translations/'.$language->iso_code.'.php',
|
||||
_PS_MODULE_DIR_.$name.'/translations/'.$iso.'.php',
|
||||
// PrestaShop 1.4 translations
|
||||
_PS_MODULE_DIR_.$name.'/'.$language->iso_code.'.php'
|
||||
_PS_MODULE_DIR_.$name.'/'.$iso.'.php'
|
||||
);
|
||||
// if force_refresh is set reverse the list because array_merge will overrite the previous file with new file
|
||||
if ($force_refresh) {
|
||||
@@ -163,8 +167,8 @@ class TranslateCore
|
||||
foreach ($files_by_priority as $file) {
|
||||
if (file_exists($file)) {
|
||||
include_once($file);
|
||||
$_MODULES = !empty($_MODULES) ? ($force_refresh ? array_merge($_MODULES, $_MODULE) : $_MODULES + $_MODULE) : $_MODULE; //we use "+" instead of array_merge() when force_refresh is false because array merge erase existing values.
|
||||
$translations_merged[$name] = true;
|
||||
self::$moduleTranslations[$iso] = !empty(self::$moduleTranslations[$iso]) ? ($force_refresh ? array_merge(self::$moduleTranslations[$iso], $_MODULE) : self::$moduleTranslations[$iso] + $_MODULE) : $_MODULE; //we use "+" instead of array_merge() when force_refresh is false because array merge erase existing values.
|
||||
$translations_merged[$language->iso_code][$name] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -174,7 +178,7 @@ class TranslateCore
|
||||
$cache_key = $name.'|'.$string.'|'.$source.'|'.(int)$addslashes;
|
||||
|
||||
if (!isset($lang_cache[$cache_key])) {
|
||||
if ($_MODULES == null) {
|
||||
if (self::$moduleTranslations[$iso] == null) {
|
||||
if ($sprintf !== null) {
|
||||
$string = Translate::checkAndReplaceArgs($string, $sprintf);
|
||||
}
|
||||
@@ -190,18 +194,18 @@ class TranslateCore
|
||||
$default_key_file = strtolower('<{'.$name.'}prestashop>'.$file).'_'.$key;
|
||||
}
|
||||
|
||||
if (isset($current_key_file) && !empty($_MODULES[$current_key_file])) {
|
||||
$ret = stripslashes($_MODULES[$current_key_file]);
|
||||
} elseif (isset($default_key_file) && !empty($_MODULES[$default_key_file])) {
|
||||
$ret = stripslashes($_MODULES[$default_key_file]);
|
||||
} elseif (!empty($_MODULES[$current_key])) {
|
||||
$ret = stripslashes($_MODULES[$current_key]);
|
||||
} elseif (!empty($_MODULES[$default_key])) {
|
||||
$ret = stripslashes($_MODULES[$default_key]);
|
||||
if (isset($current_key_file) && !empty(self::$moduleTranslations[$iso][$current_key_file])) {
|
||||
$ret = stripslashes(self::$moduleTranslations[$iso][$current_key_file]);
|
||||
} elseif (isset($default_key_file) && !empty(self::$moduleTranslations[$iso][$default_key_file])) {
|
||||
$ret = stripslashes(self::$moduleTranslations[$iso][$default_key_file]);
|
||||
} elseif (!empty(self::$moduleTranslations[$iso][$current_key])) {
|
||||
$ret = stripslashes(self::$moduleTranslations[$iso][$current_key]);
|
||||
} elseif (!empty(self::$moduleTranslations[$iso][$default_key])) {
|
||||
$ret = stripslashes(self::$moduleTranslations[$iso][$default_key]);
|
||||
}
|
||||
// if translation was not found in module, look for it in AdminController or Helpers
|
||||
elseif (!empty($_LANGADM)) {
|
||||
$ret = stripslashes(Translate::getGenericAdminTranslation($string, $key, $_LANGADM));
|
||||
elseif (isset(self::$adminTranslations[$iso]) && !empty(self::$adminTranslations[$iso])) {
|
||||
$ret = stripslashes(Translate::getGenericAdminTranslation($string, $key, self::$adminTranslations[$iso]));
|
||||
} else {
|
||||
$ret = stripslashes($string);
|
||||
}
|
||||
|
||||
1
classes/cache/Cache.php
vendored
1
classes/cache/Cache.php
vendored
@@ -90,6 +90,7 @@ abstract class CacheCore
|
||||
'page_viewed',
|
||||
'employee',
|
||||
'log',
|
||||
'htl_cart_booking_data',
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1269,7 +1269,7 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
|
||||
$this->bookingCustomer = $objCustomer;
|
||||
} else {
|
||||
$objCustomer = new Customer();
|
||||
$this->bookingCustomer = $objCustomer->getByEmail($guestDetails['email']);
|
||||
$this->bookingCustomer = $objCustomer->getByEmail($guestDetails['email'], null, false);
|
||||
}
|
||||
|
||||
if (isset($this->bookingCustomer->id)
|
||||
@@ -1710,7 +1710,7 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
|
||||
'id_cart' => (int) $this->context->cart->id,
|
||||
'id_guest' => (int) $this->context->cart->id_guest,
|
||||
'date_from' => date('Y-m-d', strtotime($dateFrom)),
|
||||
'date_to' => date('Y-m-d', strtotime($dateTo)),
|
||||
'date_to' => date('Y-m-d', strtotime($dateTo) - _TIME_1_DAY_),
|
||||
'id_room' => $objCartBookingData->id_room,
|
||||
'price' => $room['unit_price_without_tax']
|
||||
)
|
||||
@@ -2331,7 +2331,7 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
|
||||
}
|
||||
|
||||
$this->deleteWsFeaturePrices();
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($this->context->cart->id);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($this->context->cart->id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2878,8 +2878,8 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
|
||||
$objRoomTypeFeaturePricing->id_room = (int) $params['id_room'];
|
||||
$objRoomTypeFeaturePricing->feature_price_name = $feature_price_name;
|
||||
$objRoomTypeFeaturePricing->date_selection_type = HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE;
|
||||
$objRoomTypeFeaturePricing->date_from = date('Y-m-d', strtotime($params['date_from']));
|
||||
$objRoomTypeFeaturePricing->date_to = date('Y-m-d', strtotime($params['date_to']));
|
||||
$objRoomTypeFeaturePricing->date_from = $params['date_from'];
|
||||
$objRoomTypeFeaturePricing->date_to = $params['date_to'];
|
||||
$objRoomTypeFeaturePricing->is_special_days_exists = 0;
|
||||
$objRoomTypeFeaturePricing->special_days = json_encode(false);
|
||||
$objRoomTypeFeaturePricing->impact_way = HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE;
|
||||
@@ -2970,7 +2970,7 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
|
||||
'id_cart' => (int) $objCart->id,
|
||||
'id_guest' => (int) $objCart->id_guest,
|
||||
'date_from' => date('Y-m-d', strtotime($objHotelBookingDetail->date_from)),
|
||||
'date_to' => date('Y-m-d', strtotime($objHotelBookingDetail->date_to)),
|
||||
'date_to' => date('Y-m-d', strtotime($objHotelBookingDetail->date_to) - _TIME_1_DAY_),
|
||||
'id_room' => $objHotelBookingDetail->id_room,
|
||||
'price' => $room['unit_price_without_tax']
|
||||
)
|
||||
@@ -3006,7 +3006,7 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
|
||||
$objOrder->total_products_wt += $objHotelBookingDetail->total_price_tax_incl;
|
||||
$objOrder->update();
|
||||
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($objCart->id);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($objCart->id);
|
||||
$this->deleteWsFeaturePrices();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -952,7 +952,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
$this->context->cart = new Cart($id_cart);
|
||||
|
||||
$date_from = date('Y-m-d H:i:s', strtotime($date_from));
|
||||
$date_to = date('Y-m-d H:i:s', strtotime($date_to));
|
||||
$date_to = date('Y-m-d H:i:s', strtotime($date_to) - _TIME_1_DAY_);
|
||||
|
||||
if ($this->context->cart->id_currency != (int)Configuration::get('PS_CURRENCY_DEFAULT')) {
|
||||
$currency = Currency::getCurrencyInstance($this->context->cart->id_currency);
|
||||
@@ -960,7 +960,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if ($this->tabAccess['edit'] === '1') {
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($id_cart, $id_product, $id_room, $date_from, $date_to);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($id_cart, $id_product, $id_room, $date_from, $date_to);
|
||||
$feature_price_name = array();
|
||||
foreach (Language::getIDs(true) as $id_lang) {
|
||||
$feature_price_name[$id_lang] = 'Auto-generated';
|
||||
|
||||
@@ -141,6 +141,11 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'align' => 'text-right',
|
||||
'badge_success' => true
|
||||
),
|
||||
'phone' => array(
|
||||
'title' => $this->l('Phone'),
|
||||
'optional' => true,
|
||||
'visible_default' => false,
|
||||
),
|
||||
'active' => array(
|
||||
'title' => $this->l('Enabled'),
|
||||
'align' => 'text-center',
|
||||
|
||||
@@ -1680,6 +1680,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->context->cart = $objCart;
|
||||
$this->context->currency = new Currency((int)$objCart->id_currency);
|
||||
|
||||
// Setting the customer in context to get the order total with the group discount.
|
||||
$this->context->customer = new Customer($objCart->id_customer);
|
||||
$this->errors = HotelCartBookingData::validateCartBookings();
|
||||
$orderTotal = $objCart->getOrderTotal(true, Cart::BOTH);
|
||||
if ($objCart->is_advance_payment) {
|
||||
@@ -4684,7 +4686,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
// delete cart feature prices after room addition success
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($this->context->cart->id);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($this->context->cart->id);
|
||||
|
||||
die(json_encode(array(
|
||||
'result' => true,
|
||||
@@ -4845,7 +4847,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
// delete cart feature prices after booking update success
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($cart->id);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($cart->id);
|
||||
|
||||
// Calculate differences of price (Before / After)
|
||||
$diff_price_tax_incl = $totalRoomPriceAfterTI - $totalRoomPriceBeforeTI;
|
||||
@@ -6148,7 +6150,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$obj_hotel_cart_detail = new HotelCartBookingData();
|
||||
$deleted = $obj_hotel_cart_detail->deleteCartBookingData($cart_id, $id_product, $room_id, $dt_frm, $dt_to);
|
||||
if ($deleted) {
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($cart_id, $id_product, $room_id, $dt_frm, $dt_to );
|
||||
$obj_product_process = new HotelCartBookingData();
|
||||
$num_cart_rooms = 0;
|
||||
if ($rooms = $obj_hotel_cart_detail->getCartCurrentDataByCartId($cart_id)) {
|
||||
@@ -6156,6 +6157,8 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$numDays = HotelHelper::getNumberOfDays($dt_frm, $dt_to);
|
||||
$dt_to = date('Y-m-d H:i:s', strtotime($dt_to) - _TIME_1_DAY_);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($cart_id, $id_product, $room_id, $dt_frm, $dt_to);
|
||||
$changed = $obj_product_process->changeProductDataByRoomId($room_id, $id_product, $numDays, $cart_id);
|
||||
if ($changed) {
|
||||
$result['status'] = 'deleted';
|
||||
|
||||
@@ -2966,7 +2966,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
$bookedDate['date_from_formatted'] = Tools::displayDate($bookedDate['date_from']);
|
||||
$bookedDate['date_to_formatted'] = Tools::displayDate($bookedDate['date_to']);
|
||||
}
|
||||
$room['booked_dates'] = $bookedDates;
|
||||
$room['booked_dates'] = json_encode($bookedDates);
|
||||
|
||||
if ($room['id_status'] == HotelRoomInformation::STATUS_TEMPORARY_INACTIVE) {
|
||||
$disableDates = $objRoomDisableDates->getRoomDisableDates($room['id']);
|
||||
|
||||
@@ -606,6 +606,7 @@ CREATE TABLE `PREFIX_customer` (
|
||||
`max_payment_days` int(10) unsigned NOT NULL DEFAULT '60',
|
||||
`secure_key` varchar(32) NOT NULL DEFAULT '-1',
|
||||
`note` text,
|
||||
`phone` varchar(32) DEFAULT NULL,
|
||||
`active` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`is_guest` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`deleted` tinyint(1) NOT NULL DEFAULT '0',
|
||||
|
||||
105
install/upgrade/php/add_order_detail_meta_page_161.php
Normal file
105
install/upgrade/php/add_order_detail_meta_page_161.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
function add_order_detail_meta_page_161()
|
||||
{
|
||||
|
||||
if (!Db::getInstance()->getValue('
|
||||
SELECT id_meta
|
||||
FROM `'._DB_PREFIX_.'meta` m
|
||||
WHERE m.`page` = "order-detail"')
|
||||
) {
|
||||
// meta
|
||||
Db::getInstance()->insert(
|
||||
'meta',
|
||||
array(
|
||||
'page' => 'order-detail',
|
||||
'configurable' => 1,
|
||||
)
|
||||
);
|
||||
if ($last_id = Db::getInstance()->Insert_ID()) {
|
||||
// meta lang
|
||||
$pageDetail = array(
|
||||
'en' => array(
|
||||
'title' => 'Booking details',
|
||||
'url_rewrite' => 'order-detail'
|
||||
),
|
||||
'fr' => array(
|
||||
'title' => 'Détails de réservation',
|
||||
'url_rewrite' => 'details-de-reservation'
|
||||
)
|
||||
);
|
||||
if ($languages = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM `'._DB_PREFIX_.'lang`')) {
|
||||
$row = array();
|
||||
foreach ($languages as $lang) {
|
||||
if (in_array(strtolower($lang['iso_code']), array_keys($pageDetail))) {
|
||||
$row[] = array(
|
||||
'id_meta' => (int)$last_id,
|
||||
'id_shop' => 1,
|
||||
'id_lang' => (int)$lang['id_lang'],
|
||||
'title' => $pageDetail[strtolower($lang['iso_code'])]['title'],
|
||||
'description' => '',
|
||||
'keywords' => '',
|
||||
'url_rewrite' => $pageDetail[strtolower($lang['iso_code'])]['url_rewrite']
|
||||
);
|
||||
} else {
|
||||
$row[] = array(
|
||||
'id_meta' => (int)$last_id,
|
||||
'id_shop' => 1,
|
||||
'id_lang' => (int)$lang['id_lang'],
|
||||
'title' => $pageDetail['en']['title'],
|
||||
'description' => '',
|
||||
'keywords' => '',
|
||||
'url_rewrite' => $pageDetail['en']['url_rewrite']
|
||||
);
|
||||
}
|
||||
}
|
||||
Db::getInstance()->insert(
|
||||
'meta_lang',
|
||||
$row
|
||||
);
|
||||
}
|
||||
|
||||
// meta themes
|
||||
$row = array();
|
||||
if ($themes = Db::getInstance()->executeS('SELECT id_theme FROM `'._DB_PREFIX_.'theme`')) {
|
||||
foreach ($themes as $theme) {
|
||||
$row[] = array(
|
||||
'id_theme' => (int)$theme,
|
||||
'id_meta' => (int)$last_id,
|
||||
'left_column' => 0,
|
||||
'right_column' => 0
|
||||
);
|
||||
}
|
||||
Db::getInstance()->insert(
|
||||
'theme_meta',
|
||||
$row
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
install/upgrade/php/clean_product_description_161.php
Normal file
39
install/upgrade/php/clean_product_description_161.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
function clean_product_description_161()
|
||||
{
|
||||
if ($descriptions = Db::getInstance()->executeS(
|
||||
'SELECT `id_product`, `id_lang`, `description_short` FROM `'._DB_PREFIX_.'product_lang`'
|
||||
)) {
|
||||
$sql = 'UPDATE `'._DB_PREFIX_.'product_lang`
|
||||
SET description_short = CASE';
|
||||
foreach ($descriptions as $description) {
|
||||
$sql .= ' WHEN id_product = '.(int)$description['id_product'].' AND id_lang = '.(int)$description['id_lang'].'
|
||||
THEN "'.pSQL(Tools::getDescriptionClean($description['description_short'])).'"';
|
||||
}
|
||||
$sql .= ' END';
|
||||
Db::getInstance()->execute($sql);
|
||||
}
|
||||
|
||||
}
|
||||
51
install/upgrade/php/update_order_payment_type_160.php
Normal file
51
install/upgrade/php/update_order_payment_type_160.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
function update_order_payment_type_160()
|
||||
{
|
||||
if ($orders = Db::getInstance()->executeS(
|
||||
'SELECT `id_order`, `module` FROM `'._DB_PREFIX_.'orders`'
|
||||
)) {
|
||||
$sql = 'UPDATE `'._DB_PREFIX_.'orders`
|
||||
SET payment_type = CASE';
|
||||
$modulePaymentType = array();
|
||||
foreach ($orders as &$order) {
|
||||
if (!isset($modulePaymentType[$order['module']])) {
|
||||
$module = Module::getInstanceByName($order['module']);
|
||||
if ($module instanceof Module && $module->payment_type) {
|
||||
$modulePaymentType[$order['module']] = $module->payment_type;
|
||||
} else {
|
||||
$modulePaymentType[$order['module']] = 1;
|
||||
}
|
||||
}
|
||||
$sql .= ' WHEN id_order = '.(int)$order['id_order'].' THEN '.(int)$modulePaymentType[$order['module']];
|
||||
}
|
||||
$sql .= ' END WHERE id_order IN ('.pSQL(implode(', ', array_column($orders, 'id_order'))).')';
|
||||
Db::getInstance()->execute($sql);
|
||||
}
|
||||
Db::getInstance()->execute(
|
||||
'UPDATE `'._DB_PREFIX_.'order_payment` op
|
||||
INNER JOIN `'._DB_PREFIX_.'orders` o ON (op.`order_reference` = o.`reference`)
|
||||
SET op.`payment_type` = o.`payment_type`'
|
||||
);
|
||||
}
|
||||
67
install/upgrade/php/update_order_states_161.php
Normal file
67
install/upgrade/php/update_order_states_161.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
function update_order_states_161()
|
||||
{
|
||||
$data = array(
|
||||
'invoice' => 0,
|
||||
'send_email' => 0,
|
||||
'color' => '#FF69B4',
|
||||
'unremovable' => 1,
|
||||
'hidden' => 0,
|
||||
'logable' => 0,
|
||||
'delivery' => 0,
|
||||
'shipped' => 0,
|
||||
'paid' => 0,
|
||||
'pdf_delivery' => 0,
|
||||
'pdf_invoice' => 0,
|
||||
'deleted' => 0
|
||||
);
|
||||
Db::getInstance()->insert('order_state', $data);
|
||||
if ($last_id = Db::getInstance()->Insert_ID()) {
|
||||
if ($languages = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM `'._DB_PREFIX_.'lang`')) {
|
||||
$row = array();
|
||||
foreach ($languages as $lang) {
|
||||
$row[] = array(
|
||||
'id_order_state' => (int)$last_id,
|
||||
'id_lang' => (int)$lang['id_lang'],
|
||||
'name' => 'Overbooking (Partial payment)',
|
||||
'template' => '',
|
||||
);
|
||||
}
|
||||
Db::getInstance()->insert(
|
||||
'order_state_lang',
|
||||
$row
|
||||
);
|
||||
}
|
||||
if (file_exists(dirname(__FILE__).'/../../data/img/os/Overbooking_partial_paid.gif')) {
|
||||
copy(dirname(__FILE__).'/../../data/img/os/Overbooking_partial_paid.gif', _PS_ROOT_DIR_.'/img/os/'.$last_id.'.gif');
|
||||
}
|
||||
Db::getInstance()->insert('configuration',[
|
||||
'name' => 'PS_OS_OVERBOOKING_PARTIAL_PAID',
|
||||
'value' => $last_id,
|
||||
'date_add' => date('Y-m-d H:i:s'),
|
||||
'date_upd' => date('Y-m-d H:i:s')
|
||||
]);
|
||||
}
|
||||
}
|
||||
58
install/upgrade/php/update_tabs_161.php
Normal file
58
install/upgrade/php/update_tabs_161.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
function update_tabs_161()
|
||||
{
|
||||
$remove_tabs = array(
|
||||
'AdminParentStats',
|
||||
'AdminSearchEngines',
|
||||
'AdminReferrers',
|
||||
);
|
||||
|
||||
$ids = array();
|
||||
foreach ($remove_tabs as $tab) {
|
||||
if ($id = get_tab_id($tab)) {
|
||||
$ids[] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
if ($ids) {
|
||||
Db::getInstance()->delete('tab', 'id_tab IN ('.implode(', ', $ids).')');
|
||||
Db::getInstance()->delete('tab_lang', 'id_tab IN ('.implode(', ', $ids).')');
|
||||
}
|
||||
|
||||
// remove id parent of stats tab
|
||||
$idAdminStats = get_tab_id('AdminStats');
|
||||
$position = Db::getInstance()->getValue('SELECT MAX(`position`) FROM `'._DB_PREFIX_.'tab` WHERE `id_parent` = 0');
|
||||
Db::getInstance()->update('tab', array('id_parent' => 0, 'position' => ($position + 1)), '`id_tab` = '.$idAdminStats);
|
||||
}
|
||||
|
||||
function get_tab_id($class_name)
|
||||
{
|
||||
static $cache = array();
|
||||
|
||||
if (!isset($cache[$class_name])) {
|
||||
$cache[$class_name] = Db::getInstance()->getValue('SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = \''.pSQL($class_name).'\'');
|
||||
}
|
||||
return $cache[$class_name];
|
||||
}
|
||||
65
install/upgrade/sql/1.6.1.0.sql
Normal file
65
install/upgrade/sql/1.6.1.0.sql
Normal file
@@ -0,0 +1,65 @@
|
||||
SET NAMES 'utf8';
|
||||
|
||||
INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES
|
||||
('PS_ALLOW_EMP', '0', NOW(), NOW()),
|
||||
('PS_ALLOW_EMP_MAX_ATTEMPTS', '0', NOW(), NOW()),
|
||||
('PS_KPI_BEST_SELLING_ROOM_TYPE_NB_DAYS', '30', NOW(), NOW()),
|
||||
('PS_ORDER_LIST_PRICE_DISPLAY_CURRENCY', '1', NOW(), NOW()),
|
||||
('PS_OVERBOOKING_ORDER_ACTION', '1', NOW(), NOW()),
|
||||
('PS_MAX_OVERBOOKING_PER_HOTEL_PER_DAY', '2', NOW(), NOW()),
|
||||
|
||||
('PS_CUSTOMER_BIRTHDATE', '1', NOW(), NOW()),
|
||||
|
||||
('PS_KPI_FREQUENT_CUSTOMER_NB_ORDERS', '5', NOW(), NOW()),
|
||||
('PS_KPI_REVPAC_NB_DAYS', '30', NOW(), NOW()),
|
||||
('PS_KPI_CONVERSION_RATE_NB_DAYS', '30', NOW(), NOW()),
|
||||
('PS_ORDER_KPI_AVG_ORDER_VALUE_NB_DAYS', '30', NOW(), NOW()),
|
||||
('PS_ORDER_KPI_PER_VISITOR_PROFIT_NB_DAYS', '30', NOW(), NOW()),
|
||||
('PS_KPI_NEW_CUSTOMERS_NB_DAYS', '30', NOW(), NOW()),
|
||||
|
||||
('PS_BACKDATE_ORDER_SUPERADMIN', '1', NOW(), NOW()),
|
||||
('PS_BACKDATE_ORDER_EMPLOYEES', '0', NOW(), NOW());
|
||||
|
||||
UPDATE `PREFIX_configuration`
|
||||
set `value` = 1
|
||||
WHERE `name` = 'PS_TAX_DISPLAY';
|
||||
|
||||
UPDATE `PREFIX_configuration`
|
||||
set `value` = 'id_address_invoice'
|
||||
WHERE `name` = 'PS_TAX_ADDRESS_TYPE';
|
||||
|
||||
|
||||
UPDATE `PREFIX_configuration`
|
||||
set `value` = STR_TO_DATE(`value`, '%d-%m-%Y')
|
||||
WHERE `name` = 'MAX_GLOBAL_BOOKING_DATE';
|
||||
|
||||
UPDATE `PREFIX_product`
|
||||
set `show_at_front` = 1
|
||||
WHERE `booking_product` = 1;
|
||||
UPDATE `PREFIX_product_shop` ps
|
||||
INNER JOIN `PREFIX_product` p on(ps.`id_product` = p.`id_product`)
|
||||
set ps.`show_at_front` = 1
|
||||
WHERE p.`booking_product` = 1;
|
||||
|
||||
INSERT INTO `PREFIX_cart_customer_guest_detail`
|
||||
(`phone`, `id_gender`, `firstname`, `lastname`, `email`, `id_cart`, `date_add`, `date_upd`)
|
||||
SELECT
|
||||
IF(a.phone_mobile IS NOT NULL AND a.phone_mobile != '', a.phone_mobile, a.phone) AS phone,
|
||||
c.id_gender, c.firstname, c.lastname, c.email, 0 AS id_cart,
|
||||
NOW() AS date_add, NOW() AS date_upd
|
||||
FROM
|
||||
`PREFIX_address` a
|
||||
INNER JOIN
|
||||
`PREFIX_customer` c ON a.`id_customer` = c.`id_customer`
|
||||
WHERE
|
||||
a.`auto_generated` = 0
|
||||
GROUP BY
|
||||
c.`id_customer`;
|
||||
|
||||
|
||||
|
||||
/* PHP:add_order_detail_meta_page_161(); */;
|
||||
/* PHP:clean_product_description_161(); */;
|
||||
/* PHP:update_tabs_161(); */;
|
||||
/* PHP:update_order_states_161(); */;
|
||||
|
||||
46
modules/blocknavigationmenu/upgrade/upgrade-1.1.3.php
Normal file
46
modules/blocknavigationmenu/upgrade/upgrade-1.1.3.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_1_3($module)
|
||||
{
|
||||
$objUpgrade = new upgradeBlockNavigationMenu113($module);
|
||||
return $objUpgrade->initUpgrade();
|
||||
}
|
||||
|
||||
class upgradeBlockNavigationMenu113
|
||||
{
|
||||
public function __construct($module)
|
||||
{
|
||||
$this->module = $module;
|
||||
}
|
||||
|
||||
public function initUpgrade()
|
||||
{
|
||||
return ($this->module->registerHook('actionObjectCMSUpdateAfter')
|
||||
&& $this->module->registerHook('actionObjectCMSDeleteAfter'));
|
||||
|
||||
}
|
||||
}
|
||||
32
modules/blocknewsletter/upgrade/index.php
Normal file
32
modules/blocknewsletter/upgrade/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
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;
|
||||
87
modules/blocknewsletter/upgrade/upgrade-2.3.0.php
Normal file
87
modules/blocknewsletter/upgrade/upgrade-2.3.0.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_3_0($module)
|
||||
{
|
||||
$objUpgrade = new upgradeBlocknewsletter230($module);
|
||||
if (!$objUpgrade->registerHooks()
|
||||
|| !$objUpgrade->callInstallTab()
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
class upgradeBlocknewsletter230
|
||||
{
|
||||
public function __construct($module)
|
||||
{
|
||||
$this->module = $module;
|
||||
}
|
||||
|
||||
public function registerHooks()
|
||||
{
|
||||
if (!$this->module->registerHook('actionObjectCustomerUpdateBefore')
|
||||
|| !$this->module->registerHook('actionCustomerCartRulesModifier')
|
||||
|| !$this->module->registerHook('actionValidateCartRule')
|
||||
|| !$this->module->registerHook('actionObjectCustomerDeleteAfter')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function callInstallTab()
|
||||
{
|
||||
$result = $this->installTab('AdminParentNewsletter', 'Newsletter', false, true);
|
||||
$result &= $this->installTab('AdminNewsletter', 'Configuration', 'AdminParentNewsletter', true);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function installTab($className, $tabName, $tabParentName = false, $hidden = false)
|
||||
{
|
||||
$tab = new Tab();
|
||||
$tab->active = 1;
|
||||
$tab->class_name = $className;
|
||||
$tab->name = array();
|
||||
foreach (Language::getLanguages(false) as $lang) {
|
||||
$tab->name[$lang['id_lang']] = $tabName;
|
||||
}
|
||||
if ($tabParentName) {
|
||||
$tab->id_parent = (int) Tab::getIdFromClassName($tabParentName);
|
||||
} elseif ($hidden) {
|
||||
$tab->id_parent = -1;
|
||||
} else {
|
||||
$tab->id_parent = 0;
|
||||
}
|
||||
$tab->module = $this->module->name;
|
||||
|
||||
return $tab->add();
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ class HotelBookingDetail extends ObjectModel
|
||||
public $adults;
|
||||
public $children;
|
||||
public $child_ages;
|
||||
public $planned_check_out;
|
||||
|
||||
public $date_add;
|
||||
public $date_upd;
|
||||
@@ -124,6 +125,7 @@ class HotelBookingDetail extends ObjectModel
|
||||
'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 255, 'required' => true),
|
||||
'check_in_time' => array('type' => self::TYPE_STRING, 'required' => true),
|
||||
'check_out_time' => array('type' => self::TYPE_STRING, 'required' => true),
|
||||
'planned_check_out' => array('type' => self::TYPE_STRING, 'required' => true),
|
||||
'adults' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'children' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'child_ages' => array('type' => self::TYPE_STRING),
|
||||
@@ -2136,7 +2138,7 @@ class HotelBookingDetail extends ObjectModel
|
||||
}
|
||||
|
||||
// delete cart feature prices after room addition success
|
||||
HotelRoomTypeFeaturePricing::deleteByIdCart($this->context->cart->id);
|
||||
HotelRoomTypeFeaturePricing::deleteFeaturePrices($this->context->cart->id);
|
||||
|
||||
// ===============================================================
|
||||
// END: Add Process of the old booking
|
||||
@@ -3665,4 +3667,18 @@ class HotelBookingDetail extends ObjectModel
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function add($auto_date = true, $null_values = false)
|
||||
{
|
||||
if (!$this->planned_check_out) {
|
||||
$objHotelBranchInfo = new HotelBranchInformation((int) $this->id_hotel);
|
||||
$dateTo = new DateTime($this->date_to);
|
||||
$timeParts = explode(':', $objHotelBranchInfo->check_out);
|
||||
$dateTo->setTime($timeParts[0], $timeParts[1]);
|
||||
|
||||
$this->planned_check_out = $dateTo->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
return parent::add($auto_date, $null_values);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1357,10 +1357,11 @@ class HotelCartBookingData extends ObjectModel
|
||||
$id_room = 0
|
||||
) {
|
||||
if ($id_cart && $id_room) {
|
||||
if ($featurePrice = Db::getInstance()->getRow(
|
||||
'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp
|
||||
if ($featurePrice = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp
|
||||
WHERE fp.`id_product` = '.(int) $id_product.' AND fp.`id_cart` = '.(int) $id_cart.'
|
||||
AND fp.`id_guest` = '.(int) $id_guest.' AND fp.`id_room` = '.(int) $id_room.' AND fp.`active` = 1')
|
||||
AND fp.`id_guest` = '.(int) $id_guest.' AND fp.`id_room` = '.(int) $id_room.'
|
||||
AND fp.`active` = 1 AND fp.`date_from` <= \''.pSQL($date).'\'
|
||||
AND fp.`date_to` >= \''.pSQL($date).'\'')
|
||||
) {
|
||||
return $featurePrice;
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ class HotelReservationSystemDb
|
||||
`comment` text NOT NULL,
|
||||
`check_in` datetime NOT NULL,
|
||||
`check_out` datetime NOT NULL,
|
||||
`planned_check_out` datetime NOT NULL,
|
||||
`date_from` datetime NOT NULL,
|
||||
`date_to` datetime NOT NULL,
|
||||
`total_price_tax_excl` decimal(20,6) NOT NULL,
|
||||
|
||||
@@ -363,7 +363,8 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
$params['roomTypeId'] = $id_product;
|
||||
$params['featurePriceName'] = 'Webservice Feature Price';
|
||||
$params['dateFrom'] = $dateFrom;
|
||||
$params['dateTo'] = $dateTo;
|
||||
$featurePriceDateTo = date('Y-m-d', (strtotime($dateTo) - _TIME_1_DAY_));
|
||||
$params['dateTo'] = $featurePriceDateTo;
|
||||
$params['priceImpactWay'] = $priceImpactWay;
|
||||
$params['isSpecialDaysExists'] = 0;
|
||||
$params['jsonSpecialDays'] = null;
|
||||
@@ -376,7 +377,7 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
$featurePriceExists = $this->checkRoomTypeFeaturePriceExistance(
|
||||
$id_product,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
$featurePriceDateTo,
|
||||
'specific_date'
|
||||
);
|
||||
if ($featurePriceExists) {
|
||||
@@ -393,12 +394,12 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
$featurePriceExists = $this->checkRoomTypeFeaturePriceExistance(
|
||||
$id_product,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
$featurePriceDateTo,
|
||||
'date_range'
|
||||
);
|
||||
if ($featurePriceExists) {
|
||||
if ($featurePriceExists['date_from'] == $dateFrom
|
||||
&& $featurePriceExists['date_to'] == $dateTo
|
||||
&& $featurePriceExists['date_to'] == $featurePriceDateTo
|
||||
) {
|
||||
if (!$this->saveFeaturePricePlan(
|
||||
$featurePriceExists['id'],
|
||||
@@ -409,8 +410,8 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
}
|
||||
} else {
|
||||
for($date = $dateFrom; $date < $dateTo; $date = date('Y-m-d', strtotime('+1 day', strtotime($date)))) {
|
||||
$currentDate = date('Y-m-d', $date);
|
||||
$nextDayDate = date('Y-m-d', strtotime('+1 day', strtotime($currentDate)));
|
||||
// Creating feature prices day wise, for single days.
|
||||
$nextDayDate = $currentDate = date('Y-m-d', $date);
|
||||
$params['dateFrom'] = $currentDate;
|
||||
$params['dateTo'] = $nextDayDate;
|
||||
$params['dateSelectionType'] = self::DATE_SELECTION_TYPE_SPECIFIC;
|
||||
@@ -608,20 +609,17 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
foreach ($languages as $language) {
|
||||
$roomTypeFeaturePricing->feature_price_name[$language['id_lang']] = $params['featurePriceName'];
|
||||
}
|
||||
|
||||
$roomTypeFeaturePricing->date_selection_type = $params['dateSelectionType'];
|
||||
if ($dateSelectionType == self::DATE_SELECTION_TYPE_RANGE) {
|
||||
$roomTypeFeaturePricing->date_from = $params['dateFrom'];
|
||||
$roomTypeFeaturePricing->date_to = $params['dateTo'];
|
||||
} else {
|
||||
$roomTypeFeaturePricing->date_from = $params['dateFrom'];
|
||||
$roomTypeFeaturePricing->date_to = $params['dateTo'];
|
||||
}
|
||||
$roomTypeFeaturePricing->date_from = $params['dateFrom'];
|
||||
$roomTypeFeaturePricing->date_to = $params['dateTo'];
|
||||
$roomTypeFeaturePricing->impact_way = $params['priceImpactWay'];
|
||||
$roomTypeFeaturePricing->is_special_days_exists = $params['isSpecialDaysExists'];
|
||||
$roomTypeFeaturePricing->special_days = $params['jsonSpecialDays'];
|
||||
$roomTypeFeaturePricing->impact_type = $params['priceImpactType'];
|
||||
$roomTypeFeaturePricing->impact_value = $params['impactValue'];
|
||||
$roomTypeFeaturePricing->active = $params['enableFeaturePrice'];
|
||||
|
||||
return $roomTypeFeaturePricing->save();
|
||||
}
|
||||
|
||||
@@ -651,8 +649,8 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
$totalPrice['total_price_tax_excl'] = 0;
|
||||
$featureImpactPriceTE = 0;
|
||||
$featureImpactPriceTI = 0;
|
||||
$productPriceTI = Product::getPriceStatic((int) $id_product, true, false, 6, null, false, $use_reduc);
|
||||
$productPriceTE = Product::getPriceStatic((int) $id_product, false, false, 6, null, false, $use_reduc);
|
||||
$productPriceTI = Product::getPriceStatic((int) $id_product, 1, 0, 6, null, 0, $use_reduc, 1, 0, null, null, null, $nothing, 1, 1, null, 1, 0, $id_group);
|
||||
$productPriceTE = Product::getPriceStatic((int) $id_product, 0, 0, 6, null, 0, $use_reduc, 1, 0, null, null, null, $nothing, 1, 1, null, 1, 0, $id_group);
|
||||
if ($productPriceTE) {
|
||||
$taxRate = (($productPriceTI-$productPriceTE)/$productPriceTE)*100;
|
||||
} else {
|
||||
|
||||
@@ -110,7 +110,8 @@ class RoomTypeServiceProductPrice extends ObjectModel
|
||||
$useTax = null,
|
||||
$id_cart = false,
|
||||
$id_address = null,
|
||||
$use_reduc= 1
|
||||
$use_reduc= 1,
|
||||
$idGroup = null
|
||||
) {
|
||||
if ($useTax === null)
|
||||
$useTax = Product::$_taxCalculationMethod == PS_TAX_EXC ? false : true;
|
||||
@@ -135,7 +136,8 @@ class RoomTypeServiceProductPrice extends ObjectModel
|
||||
true,
|
||||
null,
|
||||
true,
|
||||
(int)$idProductRoomType
|
||||
(int)$idProductRoomType,
|
||||
$idGroup
|
||||
);
|
||||
|
||||
Hook::exec('actionServicePriceModifier',
|
||||
|
||||
78
modules/hotelreservationsystem/upgrade/upgrade-1.6.0.php
Normal file
78
modules/hotelreservationsystem/upgrade/upgrade-1.6.0.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_6_0($module)
|
||||
{
|
||||
$objUpgrade = new UpgradeHotelreservationSystem160($module);
|
||||
return $objUpgrade->initUpgrade();
|
||||
}
|
||||
|
||||
class UpgradeHotelreservationSystem160
|
||||
{
|
||||
public function __construct($module)
|
||||
{
|
||||
$this->module = $module;
|
||||
}
|
||||
|
||||
public function initUpgrade()
|
||||
{
|
||||
if (!$this->updateTabs()
|
||||
|| !$this->updateDefaultConfiguration()
|
||||
|| !$this->updateHooks()
|
||||
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function updateHooks()
|
||||
{
|
||||
if (!$this->module->registerHook('actionFrontControllerSetMedia')
|
||||
|| !$this->module->registerHook('displayNav')
|
||||
|| !$this->module->registerHook('displayExternalNavigationHook')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function updateTabs()
|
||||
{
|
||||
$id_tab = Tab::getIdFromClassName('AdminAssignHotelFeatures');
|
||||
$objTab = new Tab($id_tab);
|
||||
return $objTab->delete();
|
||||
}
|
||||
|
||||
public function updateDefaultConfiguration()
|
||||
{
|
||||
Configuration::updateValue('WK_CUSTOMER_SUPPORT_PHONE_NUMBER', Configuration::get('WK_HOTEL_GLOBAL_CONTACT_NUMBER'));
|
||||
Configuration::updateValue('WK_CUSTOMER_SUPPORT_EMAIL', Configuration::get('WK_HOTEL_GLOBAL_CONTACT_EMAIL'));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -680,7 +680,7 @@ $(document).ready(function() {
|
||||
},
|
||||
onSelect: function(selectedDate) {
|
||||
let objDateToMin = $.datepicker.parseDate('dd-mm-yy', selectedDate);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
objDateToMin.setDate(objDateToMin.getDate());
|
||||
|
||||
$('#feature_plan_date_to').datepicker('option', 'minDate', objDateToMin);
|
||||
},
|
||||
@@ -705,7 +705,7 @@ $(document).ready(function() {
|
||||
objDateToMin = new Date();
|
||||
}
|
||||
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
objDateToMin.setDate(objDateToMin.getDate());
|
||||
$('#feature_plan_date_to').datepicker('option', 'minDate', objDateToMin);
|
||||
},
|
||||
//for calender Css
|
||||
|
||||
@@ -85,6 +85,7 @@ class QloCleaner extends Module
|
||||
}
|
||||
Hook::exec('actionCleanData', array('method' => 'checkAndFix'));
|
||||
$html .= $this->displayConfirmation($conf);
|
||||
Cache::getInstance()->flush();
|
||||
} elseif (Tools::isSubmit('submitCleanAndOptimize')) {
|
||||
$logs = self::cleanAndOptimize();
|
||||
if (count($logs)) {
|
||||
@@ -95,14 +96,17 @@ class QloCleaner extends Module
|
||||
}
|
||||
Hook::exec('actionCleanData', array('method' => 'cleanAndOptimize'));
|
||||
$html .= $this->displayConfirmation($conf);
|
||||
Cache::getInstance()->flush();
|
||||
} elseif (Tools::getValue('submitTruncateCatalog') && Tools::getValue('checkTruncateCatalog')) {
|
||||
self::truncate('catalog');
|
||||
Hook::exec('actionCleanData', array('method' => 'catalog'));
|
||||
$html .= $this->displayConfirmation($this->l('Catalog truncated successfuly, please run functional Integrity constraints to clean the database.'));
|
||||
Cache::getInstance()->flush();
|
||||
} elseif (Tools::getValue('submitTruncateSales') && Tools::getValue('checkTruncateSales')) {
|
||||
self::truncate('sales');
|
||||
Hook::exec('actionCleanData', array('method' => 'sales'));
|
||||
$html .= $this->displayConfirmation($this->l('Orders and customers truncated successfuly, please run functional Integrity constraints to clean the database'));
|
||||
Cache::getInstance()->flush();
|
||||
}
|
||||
|
||||
$html .= $this->context->smarty->fetch(_PS_MODULE_DIR_.$this->name.'/views/templates/admin/qlocleaner_script.tpl');
|
||||
@@ -665,7 +669,8 @@ class QloCleaner extends Module
|
||||
array('warehouse_carrier', 'id_carrier', 'carrier', 'id_carrier'),
|
||||
array('warehouse_product_location', 'id_product', 'product', 'id_product'),
|
||||
array('warehouse_product_location', 'id_warehouse', 'warehouse', 'id_warehouse'),
|
||||
array('specific_price', 'id_product', 'customer', 'id_customer'),
|
||||
array('specific_price', 'id_product', 'product', 'id_product'),
|
||||
array('specific_price', 'id_customer', 'customer', 'id_customer'),
|
||||
array('specific_price', 'id_group', 'group', 'id_group'),
|
||||
array('htl_features_block_data_lang', 'id_features_block', 'htl_features_block_data', 'id_features_block'),
|
||||
array('cart_rule', 'id_customer', 'customer', 'id_customer'),
|
||||
@@ -699,13 +704,18 @@ class QloCleaner extends Module
|
||||
array('profile_lang', 'id_lang', 'lang', 'id_lang'),
|
||||
array('htl_access', 'id_profile', 'profile', 'id_profile'),
|
||||
array('htl_access', 'id_hotel', 'htl_branch_info', 'id'),
|
||||
array('htl_room_disable_dates', 'id_room_type', 'htl_room_type', 'id'),
|
||||
array('htl_room_disable_dates', 'id_room_type', 'htl_room_type', 'id_product'),
|
||||
array('htl_room_type_feature_pricing_lang', 'id_feature_price', 'htl_room_type_feature_pricing', 'id_feature_price'),
|
||||
array('htl_room_type_feature_pricing_lang', 'id_lang', 'lang', 'id_lang'),
|
||||
array('htl_order_restrict_date', 'id_hotel', 'htl_branch_info', 'id'),
|
||||
array('htl_branch_refund_rules', 'id_hotel', 'htl_branch_info', 'id'),
|
||||
array('htl_order_refund_rules_lang', 'id_refund_rule', 'htl_branch_refund_rules', 'id_refund_rule'),
|
||||
array('htl_advance_payment', 'id_product', 'product', 'id_product'),
|
||||
array('htl_order_refund_rules_lang', 'id_lang', 'lang', 'id_lang'),
|
||||
array('htl_room_type_service_product', 'id_product', 'product', 'id_product'),
|
||||
array('htl_room_type_service_product', 'id_element', 'product', 'id_product'),
|
||||
array('htl_room_type_service_product_price', 'id_product', 'product', 'id_product'),
|
||||
array('htl_room_type_service_product_price', 'id_element', 'product', 'id_product'),
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -802,7 +812,9 @@ class QloCleaner extends Module
|
||||
'htl_room_block_data',
|
||||
'htl_features_block_data',
|
||||
'htl_testimonials_block_data',
|
||||
'htl_room_type_global_demand'
|
||||
'htl_room_type_global_demand',
|
||||
'htl_room_type_service_product',
|
||||
'htl_room_type_service_product_price',
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -854,8 +866,6 @@ class QloCleaner extends Module
|
||||
'htl_room_type_service_product_order_detail',
|
||||
'htl_room_type_service_product_cart_detail',
|
||||
'htl_hotel_service_product_cart_detail',
|
||||
'htl_order_refund_rules',
|
||||
'htl_order_refund_rules_lang',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
32
modules/qlohotelreview/upgrade/index.php
Normal file
32
modules/qlohotelreview/upgrade/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
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;
|
||||
44
modules/qlohotelreview/upgrade/upgrade-1.0.1.php
Normal file
44
modules/qlohotelreview/upgrade/upgrade-1.0.1.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_0_1($module)
|
||||
{
|
||||
$objUpgrade = new UpgradeQloHotelReview101($module);
|
||||
return $objUpgrade->initUpgrade();
|
||||
}
|
||||
|
||||
class UpgradeQloHotelReview101
|
||||
{
|
||||
public function __construct($module)
|
||||
{
|
||||
$this->module = $module;
|
||||
}
|
||||
|
||||
public function initUpgrade()
|
||||
{
|
||||
return $this->module->registerHook('actionCleanData');
|
||||
}
|
||||
}
|
||||
44
modules/wkhotelroom/upgrade/upgrade-1.1.9.php
Normal file
44
modules/wkhotelroom/upgrade/upgrade-1.1.9.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_1_9($module)
|
||||
{
|
||||
$objUpgrade = new UpgradeWkHotelRoom119($module);
|
||||
return $objUpgrade->initUpgrade();
|
||||
}
|
||||
|
||||
class UpgradeWkHotelRoom119
|
||||
{
|
||||
public function __construct($module)
|
||||
{
|
||||
$this->module = $module;
|
||||
}
|
||||
|
||||
public function initUpgrade()
|
||||
{
|
||||
return $this->module->registerHook('actionCleanData');
|
||||
}
|
||||
}
|
||||
@@ -406,20 +406,6 @@
|
||||
<td class="text-right">{$guestInformations['phone']|escape:'html':'UTF-8'} </td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if isset($address_invoice->phone_mobile) && $address_invoice->phone_mobile}
|
||||
<tr>
|
||||
<td>{l s='Mobile'}</td>
|
||||
<td class="text-right">{$address_invoice->phone_mobile|escape:'html':'UTF-8'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if isset($address_invoice->phone) && $address_invoice->phone}
|
||||
<tr>
|
||||
<td>{l s='Phone'}</td>
|
||||
<td class="text-right">{$address_invoice->phone|escape:'html':'UTF-8'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{block name='displayOrderDetailGuestDetailsRow'}
|
||||
@@ -798,19 +784,6 @@
|
||||
<td class="text-right">{$guestInformations['phone']|escape:'html':'UTF-8'} </td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($address_invoice->phone_mobile) && $address_invoice->phone_mobile}
|
||||
<tr>
|
||||
<td>{l s='Mobile'}</td>
|
||||
<td class="text-right">{$address_invoice->phone_mobile|escape:'html':'UTF-8'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if isset($address_invoice->phone) && $address_invoice->phone}
|
||||
<tr>
|
||||
<td>{l s='Phone'}</td>
|
||||
<td class="text-right">{$address_invoice->phone|escape:'html':'UTF-8'}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{block name='displayOrderDetailGuestDetailsRow'}
|
||||
|
||||
Reference in New Issue
Block a user