Merge branch 'develop' into gli-1739
This commit is contained in:
@@ -149,13 +149,16 @@ class AddressCore extends ObjectModel
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'addresses',
|
||||
'fields' => array(
|
||||
'id_customer' => array('xlink_resource'=> 'customers'),
|
||||
'id_customer' => array('xlink_resource'=> 'customers', 'required' => true),
|
||||
'id_manufacturer' => array('xlink_resource'=> 'manufacturers'),
|
||||
'id_supplier' => array('xlink_resource'=> 'suppliers'),
|
||||
'id_warehouse' => array('xlink_resource'=> 'warehouse'),
|
||||
'id_country' => array('xlink_resource'=> 'countries'),
|
||||
'id_state' => array('xlink_resource'=> 'states'),
|
||||
),
|
||||
'hidden_fields' => array(
|
||||
'id_hotel'
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -551,4 +554,37 @@ class AddressCore extends ObjectModel
|
||||
)
|
||||
');
|
||||
}
|
||||
|
||||
public function validateFields($die = true, $error_return = false)
|
||||
{
|
||||
if (isset($this->webservice_validation) && $this->webservice_validation) {
|
||||
if (!$this->id_customer || !Validate::isLoadedObject(new Customer((int) $this->id_customer))) {
|
||||
$message = Tools::displayError('Invalid Id customer.');
|
||||
} elseif (Customer::getCustomerIdAddress($this->id_customer, false) && !$this->id) {
|
||||
$message = Tools::displayError('A single customer cannot have multiple addresses.');
|
||||
} elseif (!$this->id_country || !Validate::isLoadedObject($objCountry = new Country($this->id_country))) {
|
||||
$message = Tools::displayError('Invalid Id country');
|
||||
} elseif ($objCountry->contains_states
|
||||
&& (!$this->id_state || !Validate::isLoadedObject($objState = new State((int) $this->id_state)))
|
||||
) {
|
||||
$message = Tools::displayError('Invalid Id state');
|
||||
} elseif (isset($objState) && ($objCountry->id != $objState->id_country)) {
|
||||
$message = Tools::displayError('The given provided Id state does not belongs to the provided Id country');
|
||||
} elseif ($objCountry->zip_code_format && !$objCountry->checkZipCode($this->postcode)) {
|
||||
$message = Tools::displayError('Your Zip/postal code is incorrect');
|
||||
} elseif (empty($this->postcode) && $objCountry->need_zip_code) {
|
||||
$message = Tools::displayError('A Zip/postal code is required.');
|
||||
} elseif ($this->postcode && !Validate::isPostCode($this->postcode)) {
|
||||
$message = Tools::displayError('The Zip/postal code is invalid.');
|
||||
}
|
||||
|
||||
if (isset($message)) {
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
return parent::validateFields($die, $error_return);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4698,7 +4698,7 @@ class CartCore extends ObjectModel
|
||||
public function getWsCartBookings()
|
||||
{
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT `id`
|
||||
SELECT `id`, `date_from`, `date_to`, `id_hotel`, `id_product`
|
||||
FROM `'._DB_PREFIX_.'htl_cart_booking_data`
|
||||
WHERE id_cart = '.(int)$this->id.' ORDER BY `id` ASC'
|
||||
);
|
||||
|
||||
@@ -141,4 +141,12 @@ class CustomerMessageCore extends ObjectModel
|
||||
');
|
||||
}
|
||||
|
||||
public function validateFields($die = true, $error_return = false)
|
||||
{
|
||||
if (isset($this->webservice_validation) && $this->webservice_validation) {
|
||||
$this->message = trim($this->message);
|
||||
}
|
||||
|
||||
return parent::validateFields($die, $error_return);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,9 +173,18 @@ class GuestCore extends ObjectModel
|
||||
public function mergeWithCustomer($idGuest, $idCustomer)
|
||||
{
|
||||
// Since the guests are merged, the guest id in the connections table must be changed too
|
||||
Db::getInstance()->update('connections', [
|
||||
'id_guest' => (int) $idGuest,
|
||||
], 'id_guest = ' . (int) $this->id);
|
||||
// If guest entry is already there in the connection within 30 mins then delete the visitor entry else update it with guest id of the customer
|
||||
|
||||
$sql = 'SELECT SQL_NO_CACHE `id_guest` FROM `'._DB_PREFIX_.'connections`
|
||||
WHERE `id_guest` = '.(int)$idGuest.' AND `date_add` > \''.pSQL(date('Y-m-d H:i:00', time() - 1800)).'\''.
|
||||
Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).' ORDER BY `date_add` DESC';
|
||||
if (Db::getInstance()->getRow($sql, false)) {
|
||||
Db::getInstance()->delete('connections', 'id_guest = ' . (int) $this->id);
|
||||
} else {
|
||||
Db::getInstance()->update('connections', [
|
||||
'id_guest' => (int) $idGuest,
|
||||
], 'id_guest = ' . (int) $this->id);
|
||||
}
|
||||
|
||||
// Since the guests are merged, the guest id in the cart table must be changed too
|
||||
Db::getInstance()->update('cart', [
|
||||
@@ -198,4 +207,21 @@ class GuestCore extends ObjectModel
|
||||
$guest->save();
|
||||
$cookie->id_guest = (int)($guest->id);
|
||||
}
|
||||
|
||||
public function validateFields($die = true, $error_return = false)
|
||||
{
|
||||
if (isset($this->webservice_validation) && $this->webservice_validation) {
|
||||
if ((int) $this->id_customer && !Validate::isLoadedObject(new Customer((int) $this->id_customer))) {
|
||||
$message = Tools::displayError('Invalid Id customer.');
|
||||
}
|
||||
|
||||
if (isset($message)) {
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
return parent::validateFields($die, $error_return);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,36 +373,22 @@ class ProductCore extends ObjectModel
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
'update' => 'updateWs',
|
||||
'add' => 'addWsRoomType',
|
||||
'update' => 'updateWsRoomType',
|
||||
'delete' => 'deleteWs'
|
||||
),
|
||||
|
||||
'objectsNodeName' => 'room_types',
|
||||
'objectNodeName' => 'room_type',
|
||||
'retrieveData' => array(
|
||||
'retrieveMethod' => 'getRoomTypesObjectList'
|
||||
),
|
||||
'fields' => array(
|
||||
'id_hotel' => array(
|
||||
'getter' => 'getWsHotel',
|
||||
'setter' => 'setWsHotel',
|
||||
'xlink_resource' => 'hotels'
|
||||
),
|
||||
'adults' => array(
|
||||
'getter' => 'getWsAdults',
|
||||
'setter' => 'setWsAdults',
|
||||
),
|
||||
'children' => array(
|
||||
'getter' => 'getWsChildren',
|
||||
'setter' => 'setWsChildren',
|
||||
),
|
||||
'id_manufacturer' => array(
|
||||
'xlink_resource' => 'manufacturers'
|
||||
),
|
||||
'id_supplier' => array(
|
||||
'xlink_resource' => 'suppliers'
|
||||
),
|
||||
'id_category_default' => array(
|
||||
'xlink_resource' => 'categories'
|
||||
),
|
||||
'id_hotel' => array('getter' => 'getWsHotel','setter' => 'setWsHotel', 'xlink_resource' => 'hotels'),
|
||||
'adults' => array('getter' => 'getWsAdults','setter' => 'setWsAdults'),
|
||||
'children' => array('getter' => 'getWsChildren','setter' => 'setWsChildren'),
|
||||
'id_manufacturer' => array('xlink_resource' => 'manufacturers'),
|
||||
'id_supplier' => array('xlink_resource' => 'suppliers'),
|
||||
'id_category_default' => array('xlink_resource' => 'categories'),
|
||||
'new' => array(),
|
||||
'cache_default_attribute' => array(),
|
||||
'id_default_image' => array(
|
||||
@@ -420,36 +406,28 @@ class ProductCore extends ObjectModel
|
||||
// 'resourceName' => 'combinations'
|
||||
// )
|
||||
// ),
|
||||
'id_tax_rules_group' => array(
|
||||
'xlink_resource' => array(
|
||||
'resourceName' => 'tax_rule_groups'
|
||||
)
|
||||
),
|
||||
'position_in_category' => array(
|
||||
'getter' => 'getWsPositionInCategory',
|
||||
'setter' => 'setWsPositionInCategory'
|
||||
),
|
||||
'id_tax_rules_group' => array('xlink_resource' => array('resourceName' => 'tax_rule_groups')),
|
||||
'position_in_category' => array('getter' => 'getWsPositionInCategory', 'setter' => 'setWsPositionInCategory'),
|
||||
// 'manufacturer_name' => array(
|
||||
// 'getter' => 'getWsManufacturerName',
|
||||
// 'setter' => false
|
||||
// ),
|
||||
'quantity' => array(
|
||||
'getter' => false,
|
||||
'setter' => false
|
||||
),
|
||||
'type' => array(
|
||||
'getter' => 'getWsType',
|
||||
'setter' => 'setWsType',
|
||||
),
|
||||
'id_advance_paypent' => array(
|
||||
'xlink_resource' => array(
|
||||
'resourceName' => 'advance_payments'
|
||||
),
|
||||
'getter' => 'getWsRoomTypeAdvancePayment',
|
||||
'setter' => false
|
||||
),
|
||||
'type' => array('getter' => 'getWsType', 'setter' => 'setWsType'),
|
||||
),
|
||||
'associations' => array(
|
||||
'advance_payments' => array(
|
||||
'resource' => 'advance_payment',
|
||||
'getter' => 'getWsAdvancePayments',
|
||||
'setter' => 'setWsAdvancePayments',
|
||||
'fields' => array(
|
||||
'id' => array(),
|
||||
'payment_type' => array(),
|
||||
'tax_include' => array(),
|
||||
'value' => array(),
|
||||
'active' => array(),
|
||||
'calculate_from' => array(),
|
||||
),
|
||||
),
|
||||
'categories' => array(
|
||||
'resource' => 'category',
|
||||
'fields' => array(
|
||||
@@ -466,7 +444,8 @@ class ProductCore extends ObjectModel
|
||||
'id' => array('required' => true),
|
||||
)
|
||||
),
|
||||
'tags' => array('resource' => 'tag',
|
||||
'tags' => array(
|
||||
'resource' => 'tag',
|
||||
'fields' => array(
|
||||
'id' => array('required' => true),
|
||||
)
|
||||
@@ -484,13 +463,78 @@ class ProductCore extends ObjectModel
|
||||
)
|
||||
),
|
||||
'extra_demands' => array(
|
||||
'setter' => false,
|
||||
'resource' => 'extra_demand',
|
||||
'fields' => array(
|
||||
'id' => array('required' => true),
|
||||
'id_option' => array(),
|
||||
'price' => array(),
|
||||
)
|
||||
),
|
||||
'services' => array(
|
||||
'resource' => 'service',
|
||||
'fields' => array(
|
||||
'id' => array('validate' => 'isUnsignedId', 'required' => true),
|
||||
'price' => array('validate' => 'isPrice', 'required' => true),
|
||||
'id_tax_rules_group' => array('validate' => 'isUnsignedId')
|
||||
)
|
||||
),
|
||||
),
|
||||
'hidden_fields' => array(
|
||||
'booking_product',
|
||||
'service_product_type'
|
||||
),
|
||||
);
|
||||
|
||||
protected $webserviceServicesParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWsServices',
|
||||
'update' => 'updateWsServices',
|
||||
'delete' => 'deleteWs'
|
||||
),
|
||||
'objectsNodeName' => 'services',
|
||||
'objectNodeName' => 'service',
|
||||
'retrieveData' => array(
|
||||
'retrieveMethod' => 'getServicesObjectList'
|
||||
),
|
||||
'fields' => array(
|
||||
'id_manufacturer' => array('xlink_resource' => 'manufacturers'),
|
||||
'id_supplier' => array('xlink_resource' => 'suppliers'),
|
||||
'id_category_default' => array('xlink_resource' => 'categories'),
|
||||
'new' => array(),
|
||||
'cache_default_attribute' => array(),
|
||||
'id_default_image' => array(
|
||||
'getter' => 'getCoverWs',
|
||||
'setter' => 'setCoverWs',
|
||||
'xlink_resource' => array(
|
||||
'resourceName' => 'images',
|
||||
'subResourceName' => 'room_types'
|
||||
)
|
||||
),
|
||||
'id_tax_rules_group' => array('xlink_resource' => array('resourceName' => 'tax_rule_groups')),
|
||||
'position_in_category' => array('getter' => 'getWsPositionInCategory', 'setter' => 'setWsPositionInCategory'),
|
||||
// 'manufacturer_name' => array(
|
||||
// 'getter' => 'getWsManufacturerName',
|
||||
// 'setter' => false
|
||||
// ),
|
||||
'quantity' => array('getter' => false, 'setter' => false),
|
||||
'type' => array('getter' => 'getWsType', 'setter' => 'setWsType'),
|
||||
),
|
||||
'associations' => array(
|
||||
'categories' => array(
|
||||
'resource' => 'category',
|
||||
'fields' => array('id' => array('required' => true))
|
||||
),
|
||||
'images' => array('resource' => 'image', 'fields' => array('id' => array())),
|
||||
'feature_prices' => array(
|
||||
'setter' => false, 'resource' => 'feature_price',
|
||||
'fields' => array(
|
||||
'id' => array('required' => true),
|
||||
)
|
||||
),
|
||||
),
|
||||
'hidden_fields' => array(
|
||||
'booking_product',
|
||||
),
|
||||
);
|
||||
|
||||
const CUSTOMIZE_FILE = 0;
|
||||
@@ -5695,8 +5739,11 @@ class ProductCore extends ObjectModel
|
||||
*/
|
||||
public function getCoverWs()
|
||||
{
|
||||
$result = $this->getCover($this->id);
|
||||
return $result['id_image'];
|
||||
if ($result = $this->getCover($this->id)) {
|
||||
return $result['id_image'];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5985,8 +6032,9 @@ class ProductCore extends ObjectModel
|
||||
return true;
|
||||
}
|
||||
|
||||
public function addWs($autodate = true, $null_values = false)
|
||||
public function addWsRoomType($autodate = true, $null_values = false)
|
||||
{
|
||||
$this->booking_product = 1;
|
||||
if ($success = $this->add($autodate, $null_values)) {
|
||||
if (Configuration::get('PS_SEARCH_INDEXATION')) {
|
||||
Search::indexation(false, $this->id);
|
||||
@@ -5998,19 +6046,56 @@ class ProductCore extends ObjectModel
|
||||
return $success;
|
||||
}
|
||||
|
||||
public function updateWs($null_values = false)
|
||||
public function updateWsRoomType($null_values = false)
|
||||
{
|
||||
$success = parent::update($null_values);
|
||||
if ($success && Configuration::get('PS_SEARCH_INDEXATION')) {
|
||||
Search::indexation(false, $this->id);
|
||||
if (self::isBookingProduct($this->id)) {
|
||||
$this->booking_product = 1; // Since there is nothing set from the API, it might get set as false
|
||||
$success = parent::update($null_values);
|
||||
if ($success && Configuration::get('PS_SEARCH_INDEXATION')) {
|
||||
Search::indexation(false, $this->id);
|
||||
}
|
||||
|
||||
$this->setWsRoomTypeInfo();
|
||||
|
||||
Hook::exec('updateProduct', array('id_product' => (int)$this->id));
|
||||
return $success;
|
||||
}
|
||||
|
||||
$this->setWsRoomTypeInfo();
|
||||
WebserviceRequest::getInstance()->setError(500, Tools::displayError('Room type not found.'), 134);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function addWsServices()
|
||||
{
|
||||
$this->booking_product = 0;
|
||||
if ($success = $this->add()) {
|
||||
if (Configuration::get('PS_SEARCH_INDEXATION')) {
|
||||
Search::indexation(false, $this->id);
|
||||
}
|
||||
}
|
||||
|
||||
Hook::exec('updateProduct', array('id_product' => (int)$this->id));
|
||||
return $success;
|
||||
}
|
||||
|
||||
public function updateWsServices($null_values = false)
|
||||
{
|
||||
if (!self::isBookingProduct($this->id)) {
|
||||
$this->booking_product = 0; // Since there is nothing set from the API.
|
||||
$success = parent::update($null_values);
|
||||
if ($success && Configuration::get('PS_SEARCH_INDEXATION')) {
|
||||
Search::indexation(false, $this->id);
|
||||
}
|
||||
|
||||
Hook::exec('updateProduct', array('id_product' => (int)$this->id));
|
||||
return $success;
|
||||
}
|
||||
|
||||
WebserviceRequest::getInstance()->setError(500, Tools::displayError('Service not found.'), 134);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* For a given product, returns its real quantity
|
||||
*
|
||||
@@ -6370,6 +6455,20 @@ class ProductCore extends ObjectModel
|
||||
return $cache_id;
|
||||
}
|
||||
|
||||
public function getRoomTypesObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
|
||||
{
|
||||
$sql_filter .= ' AND main.`booking_product` = 1';
|
||||
|
||||
return parent::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit);
|
||||
}
|
||||
|
||||
public function getServicesObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
|
||||
{
|
||||
$sql_filter .= ' AND main.`booking_product` = 0';
|
||||
|
||||
return parent::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit);
|
||||
}
|
||||
|
||||
public static function setPackStockType($id_product, $pack_stock_type)
|
||||
{
|
||||
return Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'product p
|
||||
@@ -6394,10 +6493,55 @@ class ProductCore extends ObjectModel
|
||||
public function getWsAdvancePayments()
|
||||
{
|
||||
return Db::getInstance()->executeS(
|
||||
'SELECT `id` FROM `'._DB_PREFIX_.'htl_advance_payment` WHERE `id_product` = '.(int)$this->id.' ORDER BY `id` ASC'
|
||||
'SELECT * FROM `'._DB_PREFIX_.'htl_advance_payment` WHERE `id_product` = '.(int)$this->id.' ORDER BY `id` ASC'
|
||||
);
|
||||
}
|
||||
|
||||
public function setWsAdvancePayments($adv_payment)
|
||||
{
|
||||
$obj_adv_pmt = new HotelAdvancedPayment();
|
||||
if (!$adv_payment) {
|
||||
if ($adv_pmt_info = $obj_adv_pmt->getIdAdvPaymentByIdProduct($this->id)) {
|
||||
$obj_adv_pmt = new HotelAdvancedPayment((int) $adv_pmt_info['id']);
|
||||
}
|
||||
|
||||
$obj_adv_pmt->payment_type = '';
|
||||
$obj_adv_pmt->id_product = $this->id;
|
||||
$obj_adv_pmt->value = '';
|
||||
$obj_adv_pmt->id_currency = '';
|
||||
$obj_adv_pmt->tax_include = '';
|
||||
$obj_adv_pmt->calculate_from = 0;
|
||||
$obj_adv_pmt->active = 0;
|
||||
|
||||
return $obj_adv_pmt->save();
|
||||
} else if (is_array($adv_payment) && count($adv_payment) == 1) {
|
||||
$fields = array_shift($adv_payment);
|
||||
if (!Validate::isLoadedObject($obj_adv_pmt = new HotelAdvancedPayment($fields['id']))) {
|
||||
if ($adv_pmt_info = $obj_adv_pmt->getIdAdvPaymentByIdProduct($this->id)) {
|
||||
$obj_adv_pmt = new HotelAdvancedPayment((int) $adv_pmt_info['id']);
|
||||
}
|
||||
}
|
||||
|
||||
$obj_adv_pmt->id_product = $this->id;
|
||||
$obj_adv_pmt->active = 1;
|
||||
$obj_adv_pmt->payment_type = $fields['payment_type'];
|
||||
$obj_adv_pmt->value = $fields['value'];
|
||||
|
||||
if ($fields['payment_type'] == 2) {
|
||||
$obj_adv_pmt->id_currency = (int) Configuration::get('PS_CURRENCY_DEFAULT');
|
||||
} else {
|
||||
$obj_adv_pmt->id_currency = '';
|
||||
}
|
||||
|
||||
$obj_adv_pmt->tax_include = $fields['tax_include'];
|
||||
$obj_adv_pmt->calculate_from = $fields['calculate_from'];
|
||||
|
||||
return $obj_adv_pmt->save();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getWsHotel()
|
||||
{
|
||||
return Db::getInstance()->getValue(
|
||||
@@ -6421,8 +6565,41 @@ class ProductCore extends ObjectModel
|
||||
|
||||
public function getWsExtraDemands()
|
||||
{
|
||||
return Db::getInstance()->getValue(
|
||||
'SELECT `id_global_demand` as `id` FROM `'._DB_PREFIX_.'htl_room_type_demand` WHERE `id_product` = '.(int)$this->id
|
||||
$objHotelRoomTypeDemand = new HotelRoomTypeDemand();
|
||||
$selectedDemands = Db::getInstance()->executeS(
|
||||
'SELECT `id_global_demand` as `id` FROM `'._DB_PREFIX_.'htl_room_type_demand`
|
||||
WHERE `id_product` = '.(int)$this->id
|
||||
);
|
||||
$res = array();
|
||||
$demands = $objHotelRoomTypeDemand->getRoomTypeDemands($this->id);
|
||||
if ($selectedDemands) {
|
||||
foreach ($selectedDemands as $id_demand => $demand) {
|
||||
$option['id'] = $demand['id'];
|
||||
if (isset($demands[$demand['id']]['adv_option']) && count($demands[$demand['id']]['adv_option'])) {
|
||||
foreach ($demands[$demand['id']]['adv_option'] as $id_option => $adv_option) {
|
||||
$option['id_option'] = $id_option;
|
||||
$option['price'] = $adv_option['price_tax_excl'];
|
||||
$res[] = $option;
|
||||
}
|
||||
} else {
|
||||
$option['id_option'] = false;
|
||||
$option['price'] = $demand['price_tax_excl'];
|
||||
$res[] = $option;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function getWsServices()
|
||||
{
|
||||
return Db::getInstance()->executeS(
|
||||
'SELECT spp.`price`, spp.`id_tax_rules_group`, sp.`id_product` AS id
|
||||
FROM `'._DB_PREFIX_.'htl_room_type_service_product` sp
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product_price` spp
|
||||
ON (spp.`id_product` = sp.`id_product` AND spp.`id_element` = sp.`id_element` AND spp.`element_type` = sp.`element_type`)
|
||||
WHERE sp.`id_element` = '.(int)$this->id
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6476,4 +6653,106 @@ class ProductCore extends ObjectModel
|
||||
{
|
||||
return $this->delete();
|
||||
}
|
||||
|
||||
public function setWsExtraDemands($demands)
|
||||
{
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'htl_room_type_demand`
|
||||
WHERE `id_product` = '.(int)$this->id
|
||||
);
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'htl_room_type_demand_price`
|
||||
WHERE `id_product` = '.(int)$this->id
|
||||
);
|
||||
$objAdvOption = new HotelRoomTypeGlobalDemandAdvanceOption();
|
||||
$savedDemands = array();
|
||||
foreach ($demands as $globalDemand) {
|
||||
if (Validate::isLoadedObject($objGlobalDemand = new HotelRoomTypeGlobalDemand($globalDemand['id']))) {
|
||||
if (!isset($savedDemands[$globalDemand['id']])) {
|
||||
$objRoomTypeDemand = new HotelRoomTypeDemand();
|
||||
$objRoomTypeDemand->id_product = $this->id;
|
||||
$objRoomTypeDemand->id_global_demand = $objGlobalDemand->id;
|
||||
$objRoomTypeDemand->save();
|
||||
$savedDemands[$globalDemand['id']] = $objRoomTypeDemand->id;
|
||||
}
|
||||
|
||||
if (isset($globalDemand['price'])) {
|
||||
if ($objAdvOption->getGlobalDemandAdvanceOptions($objGlobalDemand->id)
|
||||
&& isset($globalDemand['id_option'])
|
||||
&& Validate::isLoadedObject($objAdvOption = new HotelRoomTypeGlobalDemandAdvanceOption($globalDemand['id_option']))
|
||||
) {
|
||||
if ($globalDemand['price'] != $objAdvOption->price) {
|
||||
$objRoomTypeDemandPrice = new HotelRoomTypeDemandPrice();
|
||||
$objRoomTypeDemandPrice->id_product = $this->id;
|
||||
$objRoomTypeDemandPrice->id_global_demand = $objGlobalDemand->id;
|
||||
$objRoomTypeDemandPrice->id_option = $objAdvOption->id;
|
||||
$objRoomTypeDemandPrice->price = $globalDemand['price'];
|
||||
$objRoomTypeDemandPrice->save();
|
||||
}
|
||||
} else {
|
||||
// save selected demands prices for this room type
|
||||
if ($objGlobalDemand->price != $globalDemand['price']) {
|
||||
$objRoomTypeDemandPrice = new HotelRoomTypeDemandPrice();
|
||||
$objRoomTypeDemandPrice->id_product = $this->id;
|
||||
$objRoomTypeDemandPrice->id_global_demand = $objGlobalDemand->id;
|
||||
$objRoomTypeDemandPrice->id_option = 0;
|
||||
$objRoomTypeDemandPrice->price = $globalDemand['price'];
|
||||
$objRoomTypeDemandPrice->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function setWsServices($services)
|
||||
{
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'htl_room_type_service_product`
|
||||
WHERE `id_element` = '.(int)$this->id
|
||||
);
|
||||
Db::getInstance()->execute('
|
||||
DELETE FROM `'._DB_PREFIX_.'htl_room_type_service_product_price`
|
||||
WHERE `id_element` = '.(int)$this->id
|
||||
);
|
||||
if ($this->booking_product) {
|
||||
if ($allServiceProducts = $this->getServiceProducts()) {
|
||||
$formttedServiceProducts = array();
|
||||
foreach ($allServiceProducts as $product) {
|
||||
$formttedServiceProducts[$product['id_product']] = $product;
|
||||
}
|
||||
|
||||
$allServiceProducts = $formttedServiceProducts;
|
||||
|
||||
foreach ($services as $service) {
|
||||
if (isset($service['id'])
|
||||
&& Validate::isLoadedObject($objServiceProduct = new Product($service['id']))
|
||||
&& !$objServiceProduct->booking_product
|
||||
&& isset($allServiceProducts[$objServiceProduct->id])
|
||||
) {
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
$objRoomTypeServiceProduct->addRoomProductLink(
|
||||
$objServiceProduct->id,
|
||||
$this->id,
|
||||
RoomTypeServiceProduct::WK_ELEMENT_TYPE_ROOM_TYPE
|
||||
);
|
||||
|
||||
$objRoomTypeServiceProductPrice = new RoomTypeServiceProductPrice();
|
||||
$objRoomTypeServiceProductPrice->id_product = $objServiceProduct->id;
|
||||
$objRoomTypeServiceProductPrice->id_element = $this->id;
|
||||
$objRoomTypeServiceProductPrice->element_type = RoomTypeServiceProduct::WK_ELEMENT_TYPE_ROOM_TYPE;
|
||||
$objRoomTypeServiceProductPrice->price = isset($service['price']) ? $service['price'] : $allServiceProducts[$objServiceProduct->id]['price'];
|
||||
$objRoomTypeServiceProductPrice->id_tax_rules_group = isset($service['id_tax_rules_group']) ? $service['id_tax_rules_group'] : $allServiceProducts[$objServiceProduct->id]['id_tax_rules_group'];
|
||||
$objRoomTypeServiceProductPrice->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class TranslatedConfigurationCore extends Configuration
|
||||
'id_shop' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'),
|
||||
'value' => array('type' => self::TYPE_STRING, 'lang' => true),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'lang' => true),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -1216,6 +1216,7 @@ class FrontControllerCore extends Controller
|
||||
*/
|
||||
if ($this->context->language->is_rtl) {
|
||||
$this->addCSS(_THEME_CSS_DIR_.'rtl.css');
|
||||
$this->addCSS(_THEME_CSS_DIR_.'rtl_grid.css');
|
||||
$this->addCSS(_THEME_CSS_DIR_.$this->context->language->iso_code.'.css');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,6 +632,7 @@ class WebserviceOutputBuilderCore
|
||||
$value = $object_assoc;
|
||||
}
|
||||
if (empty($fields_assoc)) {
|
||||
$value['id'] = isset($value['id']) ? $value['id'] : '';
|
||||
$fields_assoc = array(array('id' => $value['id']));
|
||||
}
|
||||
$output_details .= $this->renderFlatAssociation($object, $depth, $assoc_name, $association['resource'], $fields_assoc, $value, $parent_details);
|
||||
@@ -680,7 +681,7 @@ class WebserviceOutputBuilderCore
|
||||
$field['sqlId'] = 'id';
|
||||
$field['value'] = isset($object_assoc['id']) ? $object_assoc['id'] : null;
|
||||
} elseif (!isset($field['sqlId'])) {
|
||||
$field['sqlId'] = $field_name;
|
||||
$field['sqlId'] = $field_name ? $field_name : 'id';
|
||||
$field['value'] = isset($object_assoc[$field_name]) ? $object_assoc[$field_name] : null;
|
||||
}
|
||||
|
||||
@@ -829,4 +830,10 @@ class WebserviceOutputBuilderCore
|
||||
{
|
||||
$this->fieldsToDisplay = $fields;
|
||||
}
|
||||
|
||||
public function setWsParameters($class, $parameters)
|
||||
{
|
||||
WebserviceOutputBuilder::$_cache_ws_parameters[$class] = $parameters;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ class WebserviceOutputXMLCore implements WebserviceOutputInterface
|
||||
if (array_key_exists('setter', $params['associations'][$assoc_name]) && !$params['associations'][$assoc_name]['setter']) {
|
||||
$more .= ' readOnly="true"';
|
||||
}
|
||||
$more .= ' nodeType="'.$params['associations'][$assoc_name]['resource'].'"';
|
||||
$more .= (isset($params['associations'][$assoc_name]['resource'])? ' nodeType="'.$params['associations'][$assoc_name]['resource'].'"' : ' ');
|
||||
if (isset($params['associations'][$assoc_name]['virtual_entity']) && $params['associations'][$assoc_name]['virtual_entity']) {
|
||||
$more .= ' virtualEntity="true"';
|
||||
} else {
|
||||
|
||||
@@ -290,6 +290,7 @@ class WebserviceRequestCore
|
||||
'room_type_options' => array('description' => 'The product options','class' => 'AttributeGroup'),
|
||||
'room_type_option_values' => array('description' => 'The product options value','class' => 'Attribute'),
|
||||
'room_types' => array('description' => 'The room types','class' => 'Product'),
|
||||
'services' => array('description' => 'Services', 'class' => 'Product', 'parameters_attribute' => 'webserviceServicesParameters'),
|
||||
'states' => array('description' => 'The available states of countries','class' => 'State'),
|
||||
'stores' => array('description' => 'The stores', 'class' => 'Store'),
|
||||
'suppliers' => array('description' => 'The product suppliers','class' => 'Supplier'),
|
||||
@@ -512,6 +513,8 @@ class WebserviceRequestCore
|
||||
$object = new $url_resource['class']();
|
||||
if (isset($this->resourceList[$this->urlSegment[0]]['parameters_attribute'])) {
|
||||
$this->resourceConfiguration = $object->getWebserviceParameters($this->resourceList[$this->urlSegment[0]]['parameters_attribute']);
|
||||
// Setting the parameters for the output builder in cache for the resources having parameters_attribute.
|
||||
$this->objOutput->setWsParameters($url_resource['class'], $this->resourceConfiguration);
|
||||
} else {
|
||||
$this->resourceConfiguration = $object->getWebserviceParameters();
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
||||
'room_types' => array(),
|
||||
'hotels' => array(),
|
||||
'categories' => array(),
|
||||
'extra_service' => array(),
|
||||
// 'manufacturers' => array(),
|
||||
// 'suppliers' => array(),
|
||||
// 'stores' => array(),
|
||||
@@ -286,7 +287,9 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
||||
|
||||
$this->imageType = $this->wsObject->urlSegment[1];
|
||||
// if image type requested is room_types then process products images
|
||||
if ($this->imageType == 'room_types') {
|
||||
if ($this->imageType == 'room_types'
|
||||
|| $this->imageType == 'extra_services'
|
||||
) {
|
||||
$this->imageType = 'products';
|
||||
}
|
||||
|
||||
|
||||
@@ -295,9 +295,12 @@ class AdminDashboardControllerCore extends AdminController
|
||||
public function postProcess()
|
||||
{
|
||||
if (Tools::isSubmit('submitDateRange')) {
|
||||
if (!Validate::isDate(Tools::getValue('date_from'))
|
||||
|| !Validate::isDate(Tools::getValue('date_to'))) {
|
||||
if (!Validate::isDate(Tools::getValue('date_from')) && !Validate::isDate(Tools::getValue('date_to'))) {
|
||||
$this->errors[] = Tools::displayError('The selected date range is not valid.');
|
||||
} elseif (!Validate::isDate(Tools::getValue('date_from'))) {
|
||||
$this->errors[] = Tools::displayError('Date from in not selected. Please select a date range from the calendar.');
|
||||
} elseif (!Validate::isDate(Tools::getValue('date_to'))) {
|
||||
$this->errors[] = Tools::displayError('Date to in not selected. Please select a date range from the calendar.');
|
||||
}
|
||||
|
||||
if (Tools::getValue('datepicker_compare')) {
|
||||
|
||||
@@ -91,6 +91,12 @@ class AdminOrdersControllerCore extends AdminController
|
||||
} elseif (Tools::getValue('orders_stay_over')) {
|
||||
$this->_where .= ' AND hbd.`is_refunded` = 0 AND hbd.`is_back_order` = 0 AND hbd.`id_status` = '.(int) HotelBookingDetail::STATUS_CHECKED_IN.'
|
||||
AND hbd.`date_to` > \''.pSQL(date('Y-m-d')).' 00:00:00\'';
|
||||
} elseif (Tools::getValue('orders_not_paid')) {
|
||||
$this->_where .= ' AND os.`paid` = 0 AND a.`current_state` NOT IN ('.implode(',', array(
|
||||
Configuration::get('PS_OS_CANCELED'),
|
||||
Configuration::get('PS_OS_REFUND'),
|
||||
Configuration::get('PS_OS_ERROR')
|
||||
)).')';
|
||||
}
|
||||
|
||||
$this->_orderBy = 'id_order';
|
||||
|
||||
@@ -516,6 +516,46 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
}
|
||||
}
|
||||
|
||||
public static function getRefunds($date_from, $date_to, $granularity = false, $id_hotel = 0)
|
||||
{
|
||||
if ($granularity == 'day') {
|
||||
$refunds = array();
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT
|
||||
LEFT(`invoice_date`, 10) as date,
|
||||
SUM(orr.`refunded_amount`) as total_refund_amount,
|
||||
(
|
||||
SELECT hbd.`id_hotel`
|
||||
FROM`'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
WHERE hbd.`id_order` = o.`id_order` LIMIT 1
|
||||
) AS id_hotel
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_return` orr ON (o.id_order = orr.id_order)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (o.current_state = os.id_order_state)
|
||||
WHERE orr.`payment_mode` != "" AND `invoice_date` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1'.'
|
||||
GROUP BY LEFT(`invoice_date`, 10) HAVING 1 '.HotelBranchInformation::addHotelRestriction($id_hotel));
|
||||
|
||||
foreach ($result as $row) {
|
||||
$refunds[strtotime($row['date'])] = $row['total_refund_amount'];
|
||||
}
|
||||
|
||||
return $refunds;
|
||||
} else {
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(
|
||||
'SELECT SUM(orr.`refunded_amount`),
|
||||
(
|
||||
SELECT hbd.`id_hotel`
|
||||
FROM`'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
WHERE hbd.`id_order` = o.`id_order` LIMIT 1
|
||||
) AS id_hotel
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_return` orr ON (o.id_order = orr.id_order)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (o.current_state = os.id_order_state)
|
||||
WHERE orr.`payment_mode` != "" AND orr.`id_transaction` != "" AND `invoice_date` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59" AND os.logable = 1 HAVING 1 '.HotelBranchInformation::addHotelRestriction($id_hotel)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getExpenses($date_from, $date_to, $granularity = false, $id_hotel = 0)
|
||||
{
|
||||
$expenses = ($granularity == 'day' ? array() : 0);
|
||||
@@ -1165,7 +1205,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
ON (p.`id_product` = hri.`id_product`)
|
||||
WHERE p.`active` = 1
|
||||
AND hbd.`is_refunded` = 0
|
||||
AND hbd.`date_from` < "'.pSQL($dateTo).' 00:00:00" AND hbd.`date_to` > "'.pSQL($dateFrom).' 00:00:00"'.
|
||||
AND IF(hbd.`id_status` = '. HotelBookingDetail::STATUS_CHECKED_OUT .', hbd.`date_from` < DATE_FORMAT(hbd.`check_out`, "%Y-%m-%d") AND hbd.`date_from` < \''.pSQL($dateTo).'\' AND DATE_FORMAT(hbd.`check_out`, "%Y-%m-%d") > \''.pSQL($dateFrom).'\', hbd.`date_from` < \''.pSQL($dateTo).'\' AND hbd.`date_to` > \''.pSQL($dateFrom).'\')'.
|
||||
HotelBranchInformation::addHotelRestriction($idsHotel, 'hbd')
|
||||
);
|
||||
|
||||
@@ -1257,7 +1297,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
return $averageDailyRates;
|
||||
}
|
||||
|
||||
// Average Daily Rate is the average income per paid occupied room in a given time period
|
||||
// Average Daily Rate is the average income per occupied room in a given time period
|
||||
public static function getAverageDailyRate($dateFrom, $dateTo, $idHotel = null)
|
||||
{
|
||||
$roomsRevenueByDates = self::getRoomsRevenueForDiscreteDates($dateFrom, $dateTo, $idHotel);
|
||||
@@ -1552,7 +1592,8 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function getTotalRevenueForDiscreteDates($dateFrom, $dateTo = null, $idHotel = null, $useCache = true)
|
||||
// Calculate total services revenue (services and demands)
|
||||
public static function getServicesRevenueForDiscreteDates($dateFrom, $dateTo = null, $idHotel = null, $useCache = true)
|
||||
{
|
||||
$dateTo = !$dateTo ? date('Y-m-d', strtotime('+1 day', strtotime($dateFrom))) : $dateTo;
|
||||
|
||||
@@ -1570,41 +1611,55 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
|
||||
$result = array();
|
||||
foreach ($discreteDates as $discreteDate) {
|
||||
$cacheKey = 'AdminStats::getTotalRevenueForDiscreteDates'.'_'.(int) $discreteDate['timestamp_from'].'_'.
|
||||
(!is_array($idHotel) ? (int) $idHotel : implode('_', $idHotel));
|
||||
if (!Cache::isStored($cacheKey) || !$useCache) {
|
||||
$sql = 'SELECT SUM((current_parts / total_parts) * total_paid_tax_excl) AS total_revenue
|
||||
FROM (
|
||||
SELECT o.`id_order`,
|
||||
o.`total_paid_tax_excl` / o.`conversion_rate` AS total_paid_tax_excl,
|
||||
(
|
||||
SELECT SUM(DATEDIFF(hbd.`date_to`, hbd.`date_from`))
|
||||
FROM `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = hbd.`id_product`)
|
||||
WHERE hbd.`id_order` = o.`id_order`
|
||||
AND p.`active` = 1 AND hbd.`is_refunded` = 0 AND o.`valid` = 1'.
|
||||
(!is_null($idHotel) ? HotelBranchInformation::addHotelRestriction($idHotel, 'hbd') : '').'
|
||||
) AS total_parts,
|
||||
(
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = hbd.`id_product`)
|
||||
WHERE hbd.`id_order` = o.`id_order`
|
||||
AND hbd.`date_from` <= "'.pSQL($discreteDate['date_from']).' 00:00:00" AND hbd.`date_to` >= "'.pSQL($discreteDate['date_to']).' 00:00:00"
|
||||
AND p.`active` = 1 AND hbd.`is_refunded` = 0 AND o.`valid` = 1'.
|
||||
(!is_null($idHotel) ? HotelBranchInformation::addHotelRestriction($idHotel, 'hbd') : '').'
|
||||
) AS current_parts
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
HAVING total_parts IS NOT NULL AND current_parts > 0
|
||||
ORDER BY o.`id_order`
|
||||
) AS t';
|
||||
$totalServicesRevenue = 0;
|
||||
// Calculate services revenue
|
||||
$servicesRevenueSql = 'SELECT SUM((rtspod.`total_price_tax_excl` / o.`conversion_rate`) / DATEDIFF(hbd.`date_to`, hbd.`date_from`))
|
||||
FROM `'._DB_PREFIX_.'htl_room_type_service_product_order_detail` rtspod
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
ON (rtspod.`id_htl_booking_detail` = hbd.`id`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = hbd.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = hbd.`id_order`)
|
||||
WHERE p.`active` = 1
|
||||
AND o.`valid` = 1
|
||||
AND hbd.`is_refunded` = 0
|
||||
AND hbd.`date_from` < "'.pSQL($discreteDate['date_to']).' 00:00:00" AND hbd.`date_to` > "'.pSQL($discreteDate['date_from']).' 00:00:00"'.
|
||||
(!is_null($idHotel) ? HotelBranchInformation::addHotelRestriction($idHotel, 'hbd') : '');
|
||||
|
||||
$value = Db::getInstance()->getValue($sql);
|
||||
$value = !$value ? 0: (float) $value;
|
||||
Cache::store($cacheKey, $value);
|
||||
if ($servicesRevenue = Db::getInstance()->getValue($servicesRevenueSql)) {
|
||||
$totalServicesRevenue += $servicesRevenue;
|
||||
}
|
||||
|
||||
$result[$discreteDate['timestamp_from']] = Cache::retrieve($cacheKey);
|
||||
// Calculate demands revenue
|
||||
$demandsRevenueSql = 'SELECT SUM((hdmd.`total_price_tax_excl` / o.`conversion_rate`) / DATEDIFF(hbd.`date_to`, hbd.`date_from`))
|
||||
FROM `'._DB_PREFIX_.'htl_booking_demands` hdmd
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
ON (hdmd.`id_htl_booking` = hbd.`id`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = hbd.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = hbd.`id_order`)
|
||||
WHERE p.`active` = 1
|
||||
AND o.`valid` = 1
|
||||
AND hbd.`is_refunded` = 0
|
||||
AND hbd.`date_from` < "'.pSQL($discreteDate['date_to']).' 00:00:00" AND hbd.`date_to` > "'.pSQL($discreteDate['date_from']).' 00:00:00"'.
|
||||
(!is_null($idHotel) ? HotelBranchInformation::addHotelRestriction($idHotel, 'hbd') : '');
|
||||
|
||||
if ($demandsRevenue = Db::getInstance()->getValue($demandsRevenueSql)) {
|
||||
$totalServicesRevenue += $demandsRevenue;
|
||||
}
|
||||
|
||||
$result[$discreteDate['timestamp_from']] = $totalServicesRevenue;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function getTotalRevenueForDiscreteDates($dateFrom, $dateTo = null, $idHotel = null, $useCache = true)
|
||||
{
|
||||
$result = array();
|
||||
$servicesRevenueByDates = self::getServicesRevenueForDiscreteDates($dateFrom, $dateTo, $idHotel);
|
||||
if ($roomsRevenueByDates = self::getRoomsRevenueForDiscreteDates($dateFrom, $dateTo, $idHotel)) {
|
||||
foreach ($roomsRevenueByDates as $key => $value) {
|
||||
$result[$key] = (isset($servicesRevenueByDates[$key]) ? $servicesRevenueByDates[$key] : 0) + $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
@@ -2020,18 +2075,18 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
$roomsSql = 'SELECT
|
||||
IFNULL(SUM(
|
||||
CASE
|
||||
WHEN od.`original_wholesale_price` <> "0.000000"
|
||||
THEN od.`original_wholesale_price`
|
||||
WHEN p.`wholesale_price` <> "0.000000"
|
||||
THEN p.`wholesale_price`
|
||||
WHEN od.`purchase_supplier_price` <> "0.000000"
|
||||
THEN od.`purchase_supplier_price`
|
||||
WHEN od.`purchase_supplier_price` = "0.000000"
|
||||
THEN (od.`original_product_price` / o.`conversion_rate`) * '.(int)Configuration::get('CONF_AVERAGE_PRODUCT_MARGIN').' / 100
|
||||
END
|
||||
), 0)
|
||||
FROM `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p
|
||||
ON (p.`id_product` = hbd.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_detail` od
|
||||
ON (od.`id_order_detail` = hbd.`id_order_detail`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = hbd.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = hbd.`id_order_detail`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (od.`id_order` = o.`id_order`)
|
||||
WHERE p.`active` = 1
|
||||
AND o.`valid` = 1
|
||||
AND hbd.`is_refunded` = 0
|
||||
AND hbd.`date_from` < "'.pSQL($discreteDate['date_to']).' 00:00:00" AND hbd.`date_to` > "'.pSQL($discreteDate['date_from']).' 00:00:00"'.
|
||||
(!is_null($idHotel) ? HotelBranchInformation::addHotelRestriction($idHotel, 'hbd') : '');
|
||||
@@ -2044,20 +2099,20 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
$servicesSql = 'SELECT
|
||||
IFNULL(SUM(
|
||||
CASE
|
||||
WHEN od.`original_wholesale_price` <> "0.000000"
|
||||
THEN od.`original_wholesale_price`
|
||||
WHEN p.`wholesale_price` <> "0.000000"
|
||||
THEN p.`wholesale_price`
|
||||
WHEN od.`purchase_supplier_price` <> "0.000000"
|
||||
THEN (od.`purchase_supplier_price` / (IF (od.`product_price_calculation_method` = '.Product::PRICE_CALCULATION_METHOD_PER_BOOKING.', DATEDIFF(hbd.`date_to`, hbd.`date_from`), 1)))
|
||||
WHEN od.`purchase_supplier_price` = "0.000000"
|
||||
THEN ((od.`original_product_price` / o.`conversion_rate`) * '.(int)Configuration::get('CONF_AVERAGE_PRODUCT_MARGIN').' / 100) / (IF (od.`product_price_calculation_method` = '.Product::PRICE_CALCULATION_METHOD_PER_BOOKING.', DATEDIFF(hbd.`date_to`, hbd.`date_from`), 1))
|
||||
END
|
||||
), 0)
|
||||
FROM `'._DB_PREFIX_.'htl_room_type_service_product_order_detail` rtspod
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
ON (rtspod.`id_htl_booking_detail` = hbd.`id`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p
|
||||
ON (p.`id_product` = hbd.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_detail` od
|
||||
ON (od.`id_order_detail` = rtspod.`id_order_detail`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = rtspod.`id_product`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON (od.`id_order_detail` = rtspod.`id_order_detail`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (od.`id_order` = o.`id_order`)
|
||||
WHERE p.`active` = 1
|
||||
AND o.`valid` = 1
|
||||
AND hbd.`is_refunded` = 0
|
||||
AND hbd.`date_from` < "'.pSQL($discreteDate['date_to']).' 00:00:00" AND hbd.`date_to` > "'.pSQL($discreteDate['date_from']).' 00:00:00"'.
|
||||
(!is_null($idHotel) ? HotelBranchInformation::addHotelRestriction($idHotel, 'hbd') : '');
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<ul class="stats-list">
|
||||
<li>
|
||||
<span class="item-label">
|
||||
<a href="{$link->getAdminLink("AdminOrders")|escape:"html":"UTF-8"}" target="_blank">
|
||||
<a href="{$link->getAdminLink("AdminOrders")|escape:"html":"UTF-8"}&orders_not_paid=1" target="_blank">
|
||||
<span>{l s="Bookings (not paid)" mod='dashactivity'}</span>
|
||||
</a>
|
||||
</span>
|
||||
@@ -90,7 +90,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<span class="item-label">
|
||||
<a href="{$link->getAdminLink("AdminOrderRefundRequests")|escape:"html":"UTF-8"}&&submitFilterorder_return=1&order_returnFilter_total_pending_requests=1" target="_blank">
|
||||
<a href="{$link->getAdminLink("AdminOrderRefundRequests")|escape:"html":"UTF-8"}&&submitFilterorder_return=1&order_returnFilter_total_pending_requests[0]=1" target="_blank">
|
||||
<span>{l s="Refunds" mod='dashactivity'}</span>
|
||||
</a>
|
||||
</span>
|
||||
@@ -100,7 +100,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<span class="item-label">
|
||||
<a href="{$link->getAdminLink("AdminCarts")|escape:"html":"UTF-8"}&submitFiltercart=1&cartFilter_filter_ids_order=Abandoned cart" target="_blank">
|
||||
<a href="{$link->getAdminLink("AdminCarts")|escape:"html":"UTF-8"}&action=filterOnlyAbandonedCarts" target="_blank">
|
||||
<span>{l s="Abandoned Carts" mod='dashactivity'}</span>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@@ -21,9 +21,8 @@ function line_chart_dashinsights(widget_name, chart_details) {
|
||||
$('#dashinsights_room_nights svg').html('');
|
||||
nv.addGraph(function () {
|
||||
var chart = nv.models.lineChart()
|
||||
.useInteractiveGuideline(true)
|
||||
.x(function (d) { return (d !== undefined ? d[0] : 0); })
|
||||
.y(function (d) { return (d !== undefined ? d[1] : 0); })
|
||||
.y(function (d) { return (d !== undefined ? parseInt(d[1]) : 0); })
|
||||
.forceY([0, 1])
|
||||
.margin({
|
||||
left: 40,
|
||||
@@ -32,7 +31,7 @@ function line_chart_dashinsights(widget_name, chart_details) {
|
||||
|
||||
chart.yAxis.scale().domain([0, 1]);
|
||||
// create content for the tooltip of chart
|
||||
chart.interactiveLayer.tooltip.contentGenerator((obj, element) => {
|
||||
chart.tooltip.contentGenerator((obj, element) => {
|
||||
var totalNightsBooked = 0;
|
||||
var tooltipContent = '';
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<section>
|
||||
<div class="row stats-wrap">
|
||||
<div class="col-xs-6 col-lg-3">
|
||||
<div class="stat-box label-tooltip" data-toggle="tooltip" data-original-title="{l s='Average Daily Rate (ADR) represents the average rental income per paid occupied room over a given time period.' mod='dashperformance'}" data-placement="top" style="background-color: #B7F0FF;">
|
||||
<div class="stat-box label-tooltip" data-toggle="tooltip" data-original-title="{l s='Average Daily Rate (ADR) represents the average rental income per occupied room over a given time period.' mod='dashperformance'}" data-placement="top" style="background-color: #B7F0FF;">
|
||||
<div class="title-wrapper">
|
||||
<p>{l s='Average Daily Rate' mod='dashperformance'}</p>
|
||||
</div>
|
||||
|
||||
@@ -107,6 +107,7 @@ class Dashtrends extends Module
|
||||
$tmp_data['total_paid_tax_excl'][$date] = $tmp_data['orders'][$date] * $tmp_data['average_cart_value'][$date];
|
||||
$tmp_data['total_purchases'][$date] = $tmp_data['total_paid_tax_excl'][$date] * rand(50, 70) / 100;
|
||||
$tmp_data['total_expenses'][$date] = $tmp_data['total_paid_tax_excl'][$date] * rand(0, 10) / 100;
|
||||
$tmp_data['total_refunds'][$date] = $tmp_data['total_paid_tax_excl'][$date] * rand(0, 5) / 100;
|
||||
}
|
||||
} else {
|
||||
$tmp_data['visits'] = AdminStatsController::getVisits(false, $date_from, $date_to, 'day');
|
||||
@@ -114,6 +115,7 @@ class Dashtrends extends Module
|
||||
$tmp_data['total_paid_tax_excl'] = AdminStatsController::getTotalSales($date_from, $date_to, 'day', $id_hotel);
|
||||
$tmp_data['total_purchases'] = AdminStatsController::getPurchases($date_from, $date_to, 'day', $id_hotel);
|
||||
$tmp_data['total_expenses'] = AdminStatsController::getExpenses($date_from, $date_to, 'day', $id_hotel);
|
||||
$tmp_data['total_refunds'] = AdminStatsController::getRefunds($date_from, $date_to, 'day', $id_hotel);
|
||||
}
|
||||
|
||||
return $tmp_data;
|
||||
@@ -151,6 +153,7 @@ class Dashtrends extends Module
|
||||
$refined_data['net_profits'][$date] += (isset($gross_data['total_paid_tax_excl'][$date]) ? $gross_data['total_paid_tax_excl'][$date] : 0);
|
||||
$refined_data['net_profits'][$date] -= (isset($gross_data['total_purchases'][$date]) ? $gross_data['total_purchases'][$date] : 0);
|
||||
$refined_data['net_profits'][$date] -= (isset($gross_data['total_expenses'][$date]) ? $gross_data['total_expenses'][$date] : 0);
|
||||
$refined_data['net_profits'][$date] -= (isset($gross_data['total_refunds'][$date]) ? $gross_data['total_refunds'][$date] : 0);
|
||||
}
|
||||
|
||||
return $refined_data;
|
||||
|
||||
@@ -71,10 +71,10 @@ class HotelBranchInformation extends ObjectModel
|
||||
public $zipcode;
|
||||
public $address;
|
||||
public $phone;
|
||||
public $use_global_max_order_date;
|
||||
public $max_order_date;
|
||||
public $use_global_preparation_time;
|
||||
public $preparation_time;
|
||||
public $use_global_max_order_date = 1;
|
||||
public $max_order_date = '0000-00-00';
|
||||
public $use_global_preparation_time = 1;
|
||||
public $preparation_time = '0000-00-00';
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'hotels',
|
||||
@@ -140,7 +140,7 @@ class HotelBranchInformation extends ObjectModel
|
||||
$this->moduleInstance = Module::getInstanceByName('hotelreservationsystem');
|
||||
parent::__construct($id, $id_lang, $id_shop);
|
||||
|
||||
$this->use_global_max_order_date = $this->max_order_date = $this->use_global_preparation_time = $this->preparation_time = $this->id_country = $this->id_state = $this->city = $this->zipcode = $this->address = $this->phone = null;
|
||||
$this->id_country = $this->id_state = $this->city = $this->zipcode = $this->address = $this->phone = null;
|
||||
if ($id) {
|
||||
if ($hotelAddress = $this->getAddress($id)) {
|
||||
$this->id_country = $hotelAddress['id_country'];
|
||||
@@ -1015,18 +1015,26 @@ class HotelBranchInformation extends ObjectModel
|
||||
}
|
||||
|
||||
$hotelName = $this->hotel_name[Configuration::get('PS_LANG_DEFAULT')];
|
||||
$hotelName = preg_replace('/[0-9!<>,;"?=+()@#°{}_$%:]*/u', '', $hotelName);
|
||||
|
||||
$hotelName = trim(preg_replace('/[0-9!<>,;?=+()@#"°{}_$%:]*$/u', '', $hotelName));
|
||||
$objAddress->id_hotel = $this->id;
|
||||
$objAddress->id_country = $this->id_country;
|
||||
$objAddress->id_state = $this->id_state;
|
||||
$objAddress->city = $this->city;
|
||||
$objAddress->postcode = $this->zipcode;
|
||||
$objAddress->lastname = $hotelName;
|
||||
$objAddress->firstname = $hotelName;
|
||||
$objAddress->alias = $hotelName;
|
||||
$objAddress->address1 = $this->address;
|
||||
$objAddress->phone = $this->phone;
|
||||
$objAddress->alias = substr($hotelName, 0, 32);
|
||||
$addressFirstName = $hotelName;
|
||||
$addressLastName = $hotelName;
|
||||
if (Tools::strlen($hotelName) > 32) {
|
||||
$addressFirstName = trim(substr($hotelName, 0, 32));
|
||||
if (!$addressLastName = trim(substr($hotelName, 32, 32))) {
|
||||
$addressLastName = $addressFirstName;
|
||||
}
|
||||
}
|
||||
|
||||
$objAddress->firstname = $addressFirstName;
|
||||
$objAddress->lastname = $addressLastName;
|
||||
|
||||
return $objAddress->save();
|
||||
}
|
||||
@@ -1061,186 +1069,96 @@ class HotelBranchInformation extends ObjectModel
|
||||
if (isset($this->webservice_validation) && $this->webservice_validation) {
|
||||
if ($this->rating < 1 || $this->rating > 5) {
|
||||
$message = Tools::displayError('Rating must be between 1 and 5.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
|
||||
if (!strtotime($this->check_in)) {
|
||||
} elseif (!strtotime($this->check_in)) {
|
||||
$message = Tools::displayError('Check In time is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
if (!strtotime($this->check_out)) {
|
||||
} elseif (!strtotime($this->check_out)) {
|
||||
$message = Tools::displayError('Check out time is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
|
||||
if ($this->check_in && $this->check_out && strtotime($this->check_out) >= strtotime($this->check_in)) {
|
||||
} elseif ($this->check_in && $this->check_out && strtotime($this->check_out) >= strtotime($this->check_in)) {
|
||||
$message = Tools::displayError('Check Out time must be before Check In time.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
if (!$this->phone) {
|
||||
} elseif (!trim($this->phone)) {
|
||||
$message = Tools::displayError('Phone number is required field.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif (!Validate::isPhoneNumber($this->phone)) {
|
||||
$message = Tools::displayError('Please enter a valid phone number.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
if ($this->address == '') {
|
||||
} elseif (trim($this->address) == '') {
|
||||
$message = Tools::displayError('Address is required field.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif (!Validate::isAddress($this->address)) {
|
||||
$message = Tools::displayError('Address is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
|
||||
if (!$this->id_country) {
|
||||
} elseif (!$this->id_country) {
|
||||
$message = Tools::displayError('Country is required field.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} else {
|
||||
if (Validate::isLoadedObject($objCountry = new Country($this->id_country))) {
|
||||
$statesbycountry = State::getStatesByIdCountry($this->id_country);
|
||||
/*If selected country has states only the validate state field*/
|
||||
if ($this->id_state) {
|
||||
$objState = new State($this->id_state);
|
||||
if ($objState->id_country != $this->id_country) {
|
||||
$message = Tools::displayError('State is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
} else {
|
||||
if ($statesbycountry) {
|
||||
$message = Tools::displayError('State is required field.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
/* Check zip code format */
|
||||
if (empty($this->zipcode) && $objCountry->need_zip_code) {
|
||||
$message = Tools::displayError('A Zip / Postal code is required.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif ($objCountry->zip_code_format && !$objCountry->checkZipCode($this->zipcode)) {
|
||||
$message = sprintf(Tools::displayError('The Zip/Postal code you have entered is invalid. It must follow this format: %s'), str_replace('C', $objCountry->iso_code, str_replace('N', '0', str_replace('L', 'A', $objCountry->zip_code_format))));
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif ($this->zipcode && !Validate::isPostCode($this->zipcode)) {
|
||||
$message = Tools::displayError('The Zip / Postal code is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
} else {
|
||||
$message = Tools::displayError('country is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->city == '') {
|
||||
} elseif ($this->city == '') {
|
||||
$message = Tools::displayError('City is required field.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif (!Validate::isCityName($this->city)) {
|
||||
$message = Tools::displayError('Enter a Valid City Name.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
|
||||
if (!Validate::isBool($this->use_global_max_order_date)) {
|
||||
} elseif (!Validate::isBool($this->use_global_max_order_date)) {
|
||||
$message = Tools::displayError('invalid value for use_global_max_order_date.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
|
||||
if (!Validate::isBool($this->use_global_preparation_time)) {
|
||||
} elseif (!Validate::isBool($this->use_global_preparation_time)) {
|
||||
$message = Tools::displayError('invalid value for use_global_preparation_time.');
|
||||
} elseif (!$this->use_global_max_order_date && $this->max_order_date == '') {
|
||||
$message = Tools::displayError('Maximum date to book a room is required.');
|
||||
} elseif (!$this->use_global_max_order_date && !Validate::isDate($this->max_order_date)) {
|
||||
$message = Tools::displayError('Maximum date to book a room is invalid.');
|
||||
} elseif (!$this->use_global_max_order_date
|
||||
&& ($maxOrderDateFormatted = date('Y-m-d', strtotime($this->max_order_date)))
|
||||
&& strtotime($maxOrderDateFormatted) < strtotime(date('Y-m-d'))
|
||||
) {
|
||||
$message = Tools::displayError('Maximum Global Date to book a room can not be a past date. Please use a future date.');
|
||||
} elseif (!$this->use_global_preparation_time && $this->preparation_time === '') {
|
||||
$message = Tools::displayError('Minimum booking offset is a required.');
|
||||
} elseif (!$this->use_global_preparation_time && $this->preparation_time !== '0' && !Validate::isUnsignedInt($this->preparation_time)) {
|
||||
$message = Tools::displayError('Minimum booking offset is invalid.');
|
||||
} elseif (!Validate::isLoadedObject($objCountry = new Country($this->id_country))) {
|
||||
$message = Tools::displayError('country is invalid.');
|
||||
} elseif ($this->id_state
|
||||
&& (!Validate::isLoadedObject($objState = new State($this->id_state)) || $objState->id_country != $this->id_country)
|
||||
) {
|
||||
$message = Tools::displayError('State is invalid.');
|
||||
} elseif (State::getStatesByIdCountry($this->id_country) && !$this->id_state) {
|
||||
$message = Tools::displayError('State is required field.');
|
||||
} elseif (empty($this->zipcode) && $objCountry->need_zip_code) {
|
||||
$message = Tools::displayError('A Zip / Postal code is required.');
|
||||
} elseif ($objCountry->zip_code_format && !$objCountry->checkZipCode($this->zipcode)) {
|
||||
$message = sprintf(Tools::displayError('The Zip/Postal code you have entered is invalid. It must follow this format: %s'), str_replace('C', $objCountry->iso_code, str_replace('N', '0', str_replace('L', 'A', $objCountry->zip_code_format))));
|
||||
} elseif ($this->zipcode && !Validate::isPostCode($this->zipcode)) {
|
||||
$message = Tools::displayError('The Zip / Postal code is invalid.');
|
||||
} else {
|
||||
if ($addressValidation = Address::getValidationRules('Address')) {
|
||||
foreach ($addressValidation['size'] as $field => $maxSize) {
|
||||
if ('phone' == $field && Tools::strlen($this->phone) > $maxSize) {
|
||||
$message = sprintf(
|
||||
Tools::displayError('The Hotel phone number is too long (%1$d chars max).'),
|
||||
$maxSize
|
||||
);
|
||||
break;
|
||||
} elseif ('address1' == $field && Tools::strlen($this->address) > $maxSize) {
|
||||
$message = sprintf(
|
||||
Tools::displayError('The Hotel address is too long (%1$d chars max).'),
|
||||
$maxSize
|
||||
);
|
||||
break;
|
||||
} elseif ('city' == $field && Tools::strlen($this->city) > $maxSize) {
|
||||
$message = sprintf(
|
||||
Tools::displayError('The Hotel city name is too long (%1$d chars max).'),
|
||||
$maxSize
|
||||
);
|
||||
break;
|
||||
} elseif ('postcode' == $field && Tools::strlen($this->zipcode) > $maxSize) {
|
||||
$message = sprintf(
|
||||
Tools::displayError('The Hotel zip code is too long (%1$d chars max).'),
|
||||
$maxSize
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($message) && $message != '') {
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
|
||||
if (!$this->use_global_max_order_date) {
|
||||
$maxOrderDateFormatted = date('Y-m-d', strtotime($this->max_order_date));
|
||||
if ($this->max_order_date == '') {
|
||||
$message = Tools::displayError('Maximum date to book a room is required.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif (!Validate::isDate($this->max_order_date)) {
|
||||
$message = Tools::displayError('Maximum date to book a room is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif (strtotime($maxOrderDateFormatted) < strtotime(date('Y-m-d'))) {
|
||||
$message = Tools::displayError('Maximum Global Date to book a room can not be a past date. Please use a future date.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->use_global_preparation_time) {
|
||||
if ($this->preparation_time === '') {
|
||||
$message = Tools::displayError('Minimum booking offset is a required.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
} elseif ($this->preparation_time !== '0' && !Validate::isUnsignedInt($this->preparation_time)) {
|
||||
$message = Tools::displayError('Minimum booking offset is invalid.');
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return parent::validateFields($die, $error_return);
|
||||
@@ -1272,6 +1190,11 @@ class HotelBranchInformation extends ObjectModel
|
||||
}
|
||||
$objCountry = new Country();
|
||||
$countryName = $objCountry->getNameById($idLang, $this->id_country);
|
||||
$linkRewriteArray = array();
|
||||
foreach (Language::getLanguages(true) as $lang) {
|
||||
$linkRewriteArray[$lang['id_lang']] = Tools::link_rewrite($this->hotel_name[$lang['id_lang']]);
|
||||
}
|
||||
|
||||
if ($catCountry = $this->addCategory($countryName, false, $groupIds)) {
|
||||
if ($this->id_state) {
|
||||
$objState = new State();
|
||||
@@ -1284,8 +1207,15 @@ class HotelBranchInformation extends ObjectModel
|
||||
if ($catState) {
|
||||
if ($catCity = $this->addCategory($this->city, $catState, $groupIds)) {
|
||||
$hotelCatName = $this->hotel_name[Configuration::get('PS_LANG_DEFAULT')];
|
||||
if ($catHotel = $this->addCategory(
|
||||
$hotelCatName, $catCity, $groupIds, 1, $this->id
|
||||
if ($this->id_category) {
|
||||
$objCategory = new Category($this->id_category);
|
||||
$objCategory->name = $this->hotel_name;
|
||||
$objCategory->link_rewrite = $linkRewriteArray;
|
||||
$objCategory->id_parent = $catCity;
|
||||
$objCategory->save();
|
||||
Category::regenerateEntireNtree();
|
||||
} else if ($catHotel = $this->addCategory(
|
||||
$hotelCatName, $catCity, $groupIds, 1, $this->id, $linkRewriteArray
|
||||
)) {
|
||||
$this->id_category = $catHotel;
|
||||
$this->save();
|
||||
|
||||
@@ -1905,13 +1905,31 @@ class HotelCartBookingData extends ObjectModel
|
||||
}
|
||||
}
|
||||
|
||||
public function update($null_values = false)
|
||||
{
|
||||
if (!$this->extra_demands) {
|
||||
$this->extra_demands = json_encode(array());
|
||||
}
|
||||
|
||||
return parent::update($null_values);
|
||||
}
|
||||
|
||||
public function add($auto_date = true, $null_values = false)
|
||||
{
|
||||
if (!$this->extra_demands) {
|
||||
$this->extra_demands = json_encode(array());
|
||||
}
|
||||
|
||||
return parent::add($auto_date, $null_values);
|
||||
}
|
||||
|
||||
// Webservice :: get extra demands for the cart booking
|
||||
public function getWsExtraDemands()
|
||||
{
|
||||
$extraDemands = json_decode($this->extra_demands, true);
|
||||
if (count($extraDemands)) {
|
||||
foreach ($extraDemands as &$demnad) {
|
||||
$demnad['id'] = $demnad['id_global_demand'];
|
||||
if ($extraDemands) {
|
||||
foreach ($extraDemands as &$demand) {
|
||||
$demand['id'] = $demand['id_global_demand'];
|
||||
}
|
||||
return $extraDemands;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,10 @@ class HotelRoomInformation extends ObjectModel
|
||||
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($this->id_product)) {
|
||||
$this->id_hotel = $roomTypeInfo['id_hotel'];
|
||||
return $this->add($autodate, $null_values);
|
||||
} else {
|
||||
WebserviceRequest::getInstance()->setError(400, 'Invalid id product', 134);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -296,7 +299,10 @@ class HotelRoomInformation extends ObjectModel
|
||||
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($this->id_product)) {
|
||||
$this->id_hotel = $roomTypeInfo['id_hotel'];
|
||||
return $this->update($null_values);
|
||||
} else {
|
||||
WebserviceRequest::getInstance()->setError(400, 'Invalid id product', 134);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -419,4 +419,24 @@ class HotelRoomType extends ObjectModel
|
||||
'SELECT `id` FROM `'._DB_PREFIX_.'htl_room_information` WHERE `id_product` = '.(int)$this->id_product.' ORDER BY `id` ASC'
|
||||
);
|
||||
}
|
||||
|
||||
public function validateFields($die = true, $error_return = false)
|
||||
{
|
||||
if (isset($this->webservice_validation) && $this->webservice_validation) {
|
||||
if (!(int) $this->id_product || !Validate::isLoadedObject(new Product((int) $this->id_product))) {
|
||||
$message = Tools::displayError('Invalid Id product.');
|
||||
} elseif (!(int)$this->id_hotel || !Validate::isLoadedObject(new HotelBranchInformation((int) $this->id_hotel))) {
|
||||
$message = Tools::displayError('Invalid Id hotel.');
|
||||
}
|
||||
|
||||
if (isset($message)) {
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
return parent::validateFields($die, $error_return);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -82,10 +82,6 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'feature_prices',
|
||||
'objectNodeName' => 'feature_price',
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
'update' => 'updateWs',
|
||||
),
|
||||
'fields' => array(
|
||||
'id_product' => array(
|
||||
'xlink_resource' => array(
|
||||
@@ -277,7 +273,7 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
$date_from = date('Y-m-d', strtotime($date_from));
|
||||
$date_to = date('Y-m-d', strtotime($date_to));
|
||||
for($date = $date_from; $date < $date_to; $date = date('Y-m-d', strtotime('+1 day', strtotime($date)))) {
|
||||
$currentDate = date('Y-m-d', $date);
|
||||
$currentDate = date('Y-m-d', strtotime($date));
|
||||
$nextDayDate = date('Y-m-d', strtotime('+1 day', strtotime($currentDate)));
|
||||
if ($id_product) {
|
||||
$bookingParams = array(
|
||||
@@ -924,72 +920,37 @@ class HotelRoomTypeFeaturePricing extends ObjectModel
|
||||
return true;
|
||||
}
|
||||
|
||||
// Webservice :: function will run when feature price added from API
|
||||
public function addWs($autodate = true, $null_values = false)
|
||||
public function validateFields($die = true, $error_return = false)
|
||||
{
|
||||
$postData = trim(file_get_contents('php://input'));
|
||||
libxml_use_internal_errors(true);
|
||||
$xml = simplexml_load_string(utf8_decode($postData));
|
||||
$postFieldsObj = json_decode(json_encode($xml));
|
||||
|
||||
// we will check this also as empty value comes in empty std class
|
||||
$specialDaysArray = (array) $postFieldsObj->feature_price->special_days;
|
||||
|
||||
if (!empty($postFieldsObj->feature_price->special_days)
|
||||
&& $postFieldsObj->feature_price->special_days
|
||||
&& $specialDaysArray
|
||||
) {
|
||||
if (isset($this->webservice_validation) && $this->webservice_validation) {
|
||||
$weekDays = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'];
|
||||
$specialDays = json_decode($postFieldsObj->feature_price->special_days, true);
|
||||
if (is_array($specialDays) && $specialDays) {
|
||||
if (count(array_diff($specialDays, $weekDays))) {
|
||||
WebserviceRequest::getInstance()->setError(400, 'Invalid special days. format must match with : ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]', 134);
|
||||
|
||||
return false;
|
||||
if($this->is_special_days_exists) {
|
||||
if ($this->special_days
|
||||
&& ($specialDays = json_decode($this->special_days, true))
|
||||
) {
|
||||
if (is_array($specialDays) && $specialDays) {
|
||||
if (count(array_diff($specialDays, $weekDays))) {
|
||||
$message = Tools::displayError('Invalid special days. format must match with : ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]', false);
|
||||
}
|
||||
} else {
|
||||
$message = Tools::displayError('Invalid special days. format must match with : ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]', false);
|
||||
}
|
||||
} else {
|
||||
$message = Tools::displayError('Invalid special days. format must match with : ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]', false);
|
||||
}
|
||||
} else {
|
||||
WebserviceRequest::getInstance()->setError(400, 'Invalid special days. format must match with : ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]', 134);
|
||||
}
|
||||
|
||||
return false;
|
||||
if (isset($message) && $message != '') {
|
||||
if ($die) {
|
||||
throw new PrestaShopException($message);
|
||||
}
|
||||
|
||||
return $error_return ? $message : false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->add($autodate, $null_values);
|
||||
return parent::validateFields($die, $error_return);
|
||||
}
|
||||
|
||||
// Webservice :: function will run when feature price updated from API
|
||||
public function updateWs($null_values = false)
|
||||
{
|
||||
$postData = trim(file_get_contents('php://input'));
|
||||
libxml_use_internal_errors(true);
|
||||
$xml = simplexml_load_string(utf8_decode($postData));
|
||||
$postFieldsObj = json_decode(json_encode($xml));
|
||||
|
||||
// we will check this also as empty value comes in empty std class
|
||||
$specialDaysArray = (array) $postFieldsObj->feature_price->special_days;
|
||||
|
||||
if (!empty($postFieldsObj->feature_price->special_days)
|
||||
&& $postFieldsObj->feature_price->special_days
|
||||
&& $specialDaysArray
|
||||
) {
|
||||
$weekDays = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'];
|
||||
$specialDays = json_decode($postFieldsObj->feature_price->special_days, true);
|
||||
if (is_array($specialDays) && $specialDays) {
|
||||
if (count(array_diff($specialDays, $weekDays))) {
|
||||
WebserviceRequest::getInstance()->setError(400, 'Invalid special days. format must match with : ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]', 134);
|
||||
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
WebserviceRequest::getInstance()->setError(400, 'Invalid special days. format must match with : ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]', 134);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->update($null_values);
|
||||
}
|
||||
|
||||
public static function createAutoFeaturePrice($params)
|
||||
{
|
||||
$context = Context::getContext();
|
||||
|
||||
@@ -107,11 +107,15 @@ class WebserviceSpecificManagementQlo implements WebserviceSpecificManagementInt
|
||||
if (!isset($this->wsObject->urlFragments['id_hotel']) ) {
|
||||
throw new WebserviceException('You have to set \'id_hotel\', \'date_from\' and \'date_to\'parameters to get a result', array(100, 400));
|
||||
}
|
||||
$kwargs = [
|
||||
$dateFrom = isset($this->wsObject->urlFragments['date_from']) ? $this->wsObject->urlFragments['date_from'] : date('Y-m-d');
|
||||
$dateTo = isset($this->wsObject->urlFragments['date_to']) ? $this->wsObject->urlFragments['date_to'] : date('Y-m-d', strtotime($dateFrom.' + 1 day'));
|
||||
$kwargs = array(
|
||||
'idHotel' => $this->wsObject->urlFragments['id_hotel'],
|
||||
'dateFrom' => $this->wsObject->urlFragments['date_from'],
|
||||
'dateTo' => $this->wsObject->urlFragments['date_to'],
|
||||
];
|
||||
'dateFrom' => $dateFrom,
|
||||
'dateTo' => $dateTo,
|
||||
'idRoomType' => isset($this->wsObject->urlFragments['id_room_type']) ? $this->wsObject->urlFragments['id_room_type'] : 0,
|
||||
);
|
||||
|
||||
$this->output .= $objQloRoomType->getRoomRates($kwargs);
|
||||
break;
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
|
||||
$this->fields_list['total_pending_requests'] = array(
|
||||
'title' => $this->l('Pending Requests'),
|
||||
'align' => 'center',
|
||||
'type' => 'range',
|
||||
'havingFilter' => true,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ class HotelReservationSystem extends Module
|
||||
'bookings' => array('description' => 'Order bookings', 'class' => 'HotelBookingDetail'),
|
||||
'booking_extra_demands' => array('description' => 'Booking extra demands', 'class' => 'HotelBookingDemands'),
|
||||
'extra_demands' => array('description' => 'Extra demands', 'class' => 'HotelRoomTypeGlobalDemand'),
|
||||
'extra_services' => array('description' => 'Extra services', 'class' => 'Product', 'parameters_attribute' => 'webserviceRoomTypeServicesParameters'),
|
||||
'demand_advance_options' => array('description' => 'Extra demand advance options', 'class' => 'HotelRoomTypeGlobalDemandAdvanceOption'),
|
||||
'hotel_ari' => array('description' => 'Search availability, rates and inventory', 'specific_management' => true),
|
||||
'qlo' => array('description' => 'qlo API', 'specific_management' => true),
|
||||
|
||||
@@ -271,9 +271,15 @@
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#hotel-reviews .review-sort-by-container {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#hotel-reviews .review-sort-by button {
|
||||
text-align: left;
|
||||
min-width: 170px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#hotel-reviews .dropdown-menu {
|
||||
@@ -285,3 +291,12 @@
|
||||
top: 15px;
|
||||
right: 12px;
|
||||
}
|
||||
|
||||
#hotel-reviews.rtl .sort-by {
|
||||
margin-left: 5px;
|
||||
margin-right: unset;
|
||||
}
|
||||
|
||||
#hotel-reviews.rtl [class*=col]{
|
||||
float: right !important;
|
||||
}
|
||||
@@ -23,17 +23,19 @@
|
||||
<div class="">
|
||||
<div class="dropdown review-sort-by">
|
||||
<label class="sort-by">{l s='SORT BY' mod='qlohotelreview'}</label>
|
||||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" data-value="{QhrHotelReview::QHR_SORT_BY_TIME_NEW}">
|
||||
<span>{l s='Newest First' mod='qlohotelreview'}</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu text-left">
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_RELEVANCE}" href="#">{l s='Most Relevant' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_TIME_NEW}" href="#">{l s='Newest First' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_TIME_OLD}" href="#">{l s='Oldest First' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_RATING_HIGH}" href="#">{l s='Positive First' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_RATING_LOW}" href="#">{l s='Negative First' mod='qlohotelreview'}</a></li>
|
||||
</ul>
|
||||
<div class="review-sort-by-container">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" data-value="{QhrHotelReview::QHR_SORT_BY_TIME_NEW}">
|
||||
<span>{l s='Newest First' mod='qlohotelreview'}</span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu text-left">
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_RELEVANCE}" href="#">{l s='Most Relevant' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_TIME_NEW}" href="#">{l s='Newest First' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_TIME_OLD}" href="#">{l s='Oldest First' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_RATING_HIGH}" href="#">{l s='Positive First' mod='qlohotelreview'}</a></li>
|
||||
<li><a class="sort-by-option" data-id-hotel="{$id_hotel}" data-value="{QhrHotelReview::QHR_SORT_BY_RATING_LOW}" href="#">{l s='Negative First' mod='qlohotelreview'}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* @license LICENSE.txt
|
||||
*}
|
||||
|
||||
<div id="hotel-reviews" class="tab-pane card">
|
||||
<div id="hotel-reviews" class="tab-pane card {if isset($language_is_rtl) && $language_is_rtl} rtl {/if}">
|
||||
{if is_array($reviews) && count($reviews)}
|
||||
{include file='./_partials/review-summary.tpl'}
|
||||
{include file='./_partials/media-list.tpl'}
|
||||
|
||||
@@ -41,6 +41,12 @@
|
||||
border-top: 0;
|
||||
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.rtl .chosen-container .chosen-drop {
|
||||
right: -9999px;
|
||||
}
|
||||
.rtl .chosen-container.chosen-with-drop .chosen-drop {
|
||||
right: 0;
|
||||
}
|
||||
.chosen-container.chosen-container-single-nosearch .chosen-drop {
|
||||
top: 100%;
|
||||
}
|
||||
@@ -173,6 +179,10 @@
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
.rtl .chosen-container-single.chosen-container-single-nosearch .chosen-search {
|
||||
display:none;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
/* @group Results */
|
||||
.chosen-container .chosen-results {
|
||||
|
||||
@@ -215,9 +215,7 @@
|
||||
border-radius: 4px;}
|
||||
.submit_occupancy_btn {
|
||||
background-color: #1292FF;
|
||||
font-size: 13px;
|
||||
border: none;
|
||||
padding: 5px 20px;
|
||||
border-radius: 4px;}
|
||||
|
||||
|
||||
@@ -229,7 +227,7 @@
|
||||
overflow: auto;
|
||||
box-shadow: 0 8px 25px -4px rgba(0,0,0,0.39);
|
||||
left: 0px;
|
||||
padding: 12px 20px;}
|
||||
padding: 15px 20px;}
|
||||
#search_occupancy_wrapper.top {
|
||||
top: unset;
|
||||
bottom: 100%; }
|
||||
@@ -253,8 +251,11 @@
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
color: #0000FF;
|
||||
line-height: 24px;}
|
||||
color: #0000FF;}
|
||||
#search_occupancy_wrapper .occupancy_block_actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;}
|
||||
#search_occupancy_wrapper .add_new_occupancy_btn:active, #search_occupancy_wrapper .add_new_occupancy_btn:focus, #search_occupancy_wrapper .add_new_occupancy_btn:hover {
|
||||
text-decoration: none;
|
||||
color: #0000FF;}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<input type="hidden" id="max_order_date" name="max_order_date" value="{if isset($max_order_date)}{$max_order_date|escape:'htmlall':'UTF-8'}{/if}">
|
||||
<input type="hidden" id="preparation_time" name="preparation_time" value="{if isset($preparation_time)}{$preparation_time|escape:'htmlall':'UTF-8'}{/if}">
|
||||
|
||||
<div class="hotel-selector-wrap">
|
||||
<div class="hotel-selector-wrap {if isset($language_is_rtl) && $language_is_rtl}rtl{/if}">
|
||||
<select name="id_hotel" class="chosen header-rmsearch-input" data-placeholder="{l s='Select Hotel' mod='wkroomsearchblock'}" id="id_hotel_button">
|
||||
<option value=""></option>
|
||||
{foreach $hotels_info as $name_val}
|
||||
@@ -210,12 +210,12 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div>
|
||||
<div class="occupancy_block_actions">
|
||||
<span id="add_new_occupancy">
|
||||
<a class="add_new_occupancy_btn" href="#"><i class="icon-plus"></i> <span>{l s='Add Room' mod='wkroomsearchblock'}</span></a>
|
||||
</span>
|
||||
<span>
|
||||
<button class="submit_occupancy_btn btn btn btn-primary pull-right">{l s='Done' mod='wkroomsearchblock'}</button>
|
||||
<button class="submit_occupancy_btn btn btn-primary">{l s='Done' mod='wkroomsearchblock'}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div>
|
||||
<div class="occupancy_block_actions">
|
||||
<span class="add_occupancy_block">
|
||||
<a class="add_new_occupancy_btn{if isset($occupancies) && $occupancies && isset($total_available_rooms) && $total_available_rooms <= count($occupancies)} disabled{/if}" data-title-available="{l s='Click to add more rooms.'}" data-title-unavailable="{l s='No more rooms available.'}" href="#">
|
||||
<i class="icon-plus"></i>
|
||||
@@ -183,7 +183,7 @@
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
<button type="submit" class="submit_occupancy_btn btn btn btn-primary pull-right">{l s='Done'}</button>
|
||||
<button type="submit" class="submit_occupancy_btn btn btn-primary">{l s='Done'}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="rm_desc">{$room_v['description']|truncate:190:"":true} <a href="{$room_v['product_link']|escape:'htmlall':'UTF-8'}">{l s='View More'}....</a></div>
|
||||
<div class="rm_desc">{$room_v['description']|truncate:190:"":true} <a class="view_more" href="{$room_v['product_link']|escape:'htmlall':'UTF-8'}">{l s='View More'}....</a></div>
|
||||
<div class="room_features_cont">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-5 col-lg-6">
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
<div class="col-xs-8">
|
||||
<p class="hotel-name"><span>{$hotel['hotel_name']}</span></p>
|
||||
<p class="hotel-branch-info-value">{$hotel['address']}, {$hotel['city']}, {if {$hotel['state_name']}}{$hotel['state_name']},{/if} {$hotel['country_name']}, {$hotel['postcode']}</p>
|
||||
{if $hotel['latitude'] != 0 || $hotel['longitude'] != 0 && $viewOnMap}
|
||||
{if ($hotel['latitude'] != 0 || $hotel['longitude'] != 0) && $viewOnMap}
|
||||
<p class="hotel-branch-info-value">
|
||||
<a class="btn htl-map-direction-btn" href="http://maps.google.com/maps?daddr=({$hotel['latitude']},{$hotel['longitude']})" target="_blank">
|
||||
<span class="">{l s='View on map'}</span>
|
||||
|
||||
@@ -324,4 +324,8 @@ p.capa_txt {
|
||||
color:#e85757;
|
||||
font-size:18px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rm_desc .view_more {
|
||||
display: inline-block;
|
||||
}
|
||||
@@ -23,8 +23,13 @@
|
||||
overflow: auto;
|
||||
box-shadow: 0 8px 25px -4px rgba(0,0,0,0.39);
|
||||
left: 0px;
|
||||
padding: 20px;
|
||||
padding: 15px 20px;
|
||||
min-width: 280px}
|
||||
.booking_occupancy_wrapper .btn {
|
||||
font-weight: 600;}
|
||||
.booking_occupancy_wrapper .btn-primary {
|
||||
background-color: #1292FF;
|
||||
color: #FFF;}
|
||||
.booking_occupancy_wrapper .occupancy-info-separator {
|
||||
margin-bottom: 15px;
|
||||
margin-top: 15px;
|
||||
@@ -53,8 +58,11 @@
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
color: #0000FF;
|
||||
line-height: 24px;}
|
||||
color: #0000FF;}
|
||||
.booking_occupancy_wrapper .occupancy_block_actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;}
|
||||
.booking_occupancy_wrapper .add_new_occupancy_btn:active, .booking_occupancy_wrapper .add_new_occupancy_btn:focus, .booking_occupancy_wrapper .add_new_occupancy_btn:hover {
|
||||
text-decoration: none;
|
||||
color: #0000FF;}
|
||||
|
||||
@@ -1083,6 +1083,11 @@
|
||||
#popup-view-extra-services .tab-content .room_demand_block:not(:last-of-type) {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.payment-summary tr, .guest-details tr {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Guest Tracking page styles - start */
|
||||
.transform-account .card-text p {
|
||||
|
||||
@@ -1741,6 +1741,10 @@ ul.service-product-nav > li:hover {
|
||||
.hotel_name{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.rtl .hotel_name{
|
||||
margin-left: 10px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
@media (max-width:768px) {
|
||||
#hotel_rating {
|
||||
|
||||
@@ -8,6 +8,53 @@
|
||||
text-align: right !important; }
|
||||
|
||||
/* globals - start */
|
||||
.pull-left {
|
||||
float: right !important;
|
||||
}
|
||||
.pull-right {
|
||||
float: left !important;
|
||||
}
|
||||
.text-right {
|
||||
text-align: left !important;
|
||||
}
|
||||
.text-left {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.icon-angle-double-left:before,
|
||||
.icon-double-angle-left:before {
|
||||
content: "" !important;
|
||||
}
|
||||
|
||||
.icon-angle-double-right:before,
|
||||
.icon-double-angle-right:before {
|
||||
content: "" !important;
|
||||
}
|
||||
|
||||
.icon-angle-left:before {
|
||||
content: "" !important;
|
||||
}
|
||||
|
||||
.icon-angle-right:before {
|
||||
content: "" !important;
|
||||
}
|
||||
.btn-edit-guest-info {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.header-rmsearch-wrapper .filter_header .header-bottom-hr {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.booking_guest_occupancy.input-occupancy {
|
||||
padding-right: 35px;
|
||||
background-position-x: calc(100% - 10px), 10px !important;
|
||||
}
|
||||
|
||||
.booking_guest_occupancy.input-occupancy .pull-left {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.owl-stage-outer {
|
||||
direction: rtl !important;
|
||||
}
|
||||
@@ -166,6 +213,11 @@ ul.footer_links li .button.button-small span i {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
div.uploader .filename, div.uploader .action {
|
||||
float : right !important;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
/* room search block - start */
|
||||
#search_hotel_block_form .header-rmsearch-input.input-location {
|
||||
padding-right: 35px;
|
||||
@@ -203,6 +255,30 @@ ul.footer_links li .button.button-small span i {
|
||||
#search_hotel_block_form .header-rmsearch-input.input-occupancy .pull-left {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
#search_hotel_block_form #id_hotel_button{
|
||||
background-position-x: calc(100% - 10px), 10px !important;
|
||||
}
|
||||
|
||||
#search_hotel_block_form #id_hotel_button_chosen .chosen-single, #search_hotel_block_form .chosen-container-single .chosen-search input[type="text"]{
|
||||
padding-right: 35px;
|
||||
background-position-x: calc(100% - 10px), 10px !important;
|
||||
}
|
||||
|
||||
#search_hotel_block_form .chosen-container-single .chosen-single div {
|
||||
right: unset !important;
|
||||
left: 5px !important;
|
||||
}
|
||||
|
||||
#search_hotel_block_form .chosen-container-single .chosen-search::after {
|
||||
right: unset !important;
|
||||
left: 10px !important;
|
||||
}
|
||||
|
||||
#search_hotel_block_form .chosen-container-single .chosen-single span {
|
||||
margin-right: unset;
|
||||
}
|
||||
|
||||
/* room search block - end */
|
||||
|
||||
/* sidebar - start */
|
||||
@@ -307,6 +383,71 @@ ul.footer_links li .button.button-small span i {
|
||||
}
|
||||
/* my account - end */
|
||||
|
||||
/* Room type - start */
|
||||
#image-block-cont {
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
.close_room_serach_wrapper {
|
||||
right: unset !important;
|
||||
left: 0px;
|
||||
}
|
||||
/* Room type - end */
|
||||
|
||||
/* order-opc - start */
|
||||
|
||||
#order-opc .avail_vouchers_block .avail_voucher_name>.voucher_name,
|
||||
#tc_txt, .product_info_label{
|
||||
float: right !important;
|
||||
}
|
||||
#order-opc .cart_total_detail_block .cart_total_values {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
p.payment_module a:after {
|
||||
right: unset !important;
|
||||
content: "\f053" !important;
|
||||
left: 12px !important;
|
||||
}
|
||||
|
||||
p.payment_module a {
|
||||
padding: 30px 100px 27px 25px;
|
||||
background-position-x: calc(100% - 10px) !important;
|
||||
}
|
||||
|
||||
.room-type-feature {
|
||||
float: right !important;
|
||||
margin-bottom: 5px;
|
||||
padding: 0px 0px 0px 10px !important;
|
||||
line-height: 24px !important;
|
||||
}
|
||||
|
||||
/* order-opc - end */
|
||||
|
||||
/* contact-us - start */
|
||||
|
||||
#contact_type {
|
||||
text-align: right !important;
|
||||
}
|
||||
/* contact-us - end */
|
||||
|
||||
/* order-detail - start */
|
||||
@media (min-width: 576px) {
|
||||
.booking-room-detail .num-refunded-rooms {
|
||||
float: left !important;
|
||||
}
|
||||
}
|
||||
.fancybox-wrap.fancybox-order-detail .fancybox-close {
|
||||
right: unset !important;
|
||||
left: 12px !important;
|
||||
}
|
||||
/* order-detail - start */
|
||||
|
||||
/* Booking refund requests - start */
|
||||
#order-return .form-group.row div {
|
||||
float: right !important;
|
||||
}
|
||||
/* Booking refund requests - end */
|
||||
|
||||
/* footer - start */
|
||||
.footer-section-heading hr {
|
||||
float: right !important;
|
||||
|
||||
594
themes/hotel-reservation-theme/css/rtl_grid.css
Normal file
594
themes/hotel-reservation-theme/css/rtl_grid.css
Normal file
@@ -0,0 +1,594 @@
|
||||
|
||||
.col-xs-1,
|
||||
.col-xs-2,
|
||||
.col-xs-3,
|
||||
.col-xs-4,
|
||||
.col-xs-5,
|
||||
.col-xs-6,
|
||||
.col-xs-7,
|
||||
.col-xs-8,
|
||||
.col-xs-9,
|
||||
.col-xs-10,
|
||||
.col-xs-11 {
|
||||
float: right
|
||||
}
|
||||
.col-xs-1 {
|
||||
width: 8.33333%
|
||||
}
|
||||
.col-xs-2 {
|
||||
width: 16.66667%
|
||||
}
|
||||
.col-xs-3 {
|
||||
width: 25%
|
||||
}
|
||||
.col-xs-4 {
|
||||
width: 33.33333%
|
||||
}
|
||||
.col-xs-5 {
|
||||
width: 41.66667%
|
||||
}
|
||||
.col-xs-6 {
|
||||
width: 50%
|
||||
}
|
||||
.col-xs-7 {
|
||||
width: 58.33333%
|
||||
}
|
||||
.col-xs-8 {
|
||||
width: 66.66667%
|
||||
}
|
||||
.col-xs-9 {
|
||||
width: 75%
|
||||
}
|
||||
.col-xs-10 {
|
||||
width: 83.33333%
|
||||
}
|
||||
.col-xs-11 {
|
||||
width: 91.66667%
|
||||
}
|
||||
.col-xs-12 {
|
||||
width: 100%
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
max-width: 728px
|
||||
}
|
||||
.col-sm-1,
|
||||
.col-sm-2,
|
||||
.col-sm-3,
|
||||
.col-sm-4,
|
||||
.col-sm-5,
|
||||
.col-sm-6,
|
||||
.col-sm-7,
|
||||
.col-sm-8,
|
||||
.col-sm-9,
|
||||
.col-sm-10,
|
||||
.col-sm-11 {
|
||||
float: right
|
||||
}
|
||||
.col-sm-1 {
|
||||
width: 8.33333%
|
||||
}
|
||||
.col-sm-2 {
|
||||
width: 16.66667%
|
||||
}
|
||||
.col-sm-3 {
|
||||
width: 25%
|
||||
}
|
||||
.col-sm-4 {
|
||||
width: 33.33333%
|
||||
}
|
||||
.col-sm-5 {
|
||||
width: 41.66667%
|
||||
}
|
||||
.col-sm-6 {
|
||||
width: 50%
|
||||
}
|
||||
.col-sm-7 {
|
||||
width: 58.33333%
|
||||
}
|
||||
.col-sm-8 {
|
||||
width: 66.66667%
|
||||
}
|
||||
.col-sm-9 {
|
||||
width: 75%
|
||||
}
|
||||
.col-sm- {
|
||||
width: 83.33333%
|
||||
}
|
||||
.col-sm- {
|
||||
width: 91.66667%
|
||||
}
|
||||
.col-sm-12 {
|
||||
width: 100%
|
||||
}
|
||||
.col-sm-push-1 {
|
||||
right: 8.33333%
|
||||
}
|
||||
.col-sm-push-2 {
|
||||
right: 16.66667%
|
||||
}
|
||||
.col-sm-push-3 {
|
||||
right: 25%
|
||||
}
|
||||
.col-sm-push-4 {
|
||||
right: 33.33333%
|
||||
}
|
||||
.col-sm-push-5 {
|
||||
right: 41.66667%
|
||||
}
|
||||
.col-sm-push-6 {
|
||||
right: 50%
|
||||
}
|
||||
.col-sm-push-7 {
|
||||
right: 58.33333%
|
||||
}
|
||||
.col-sm-push-8 {
|
||||
right: 66.66667%
|
||||
}
|
||||
.col-sm-push-9 {
|
||||
right: 75%
|
||||
}
|
||||
.col-sm-push-10 {
|
||||
right: 83.33333%
|
||||
}
|
||||
.col-sm-push-11 {
|
||||
right: 91.66667%
|
||||
}
|
||||
.col-sm-pull-0 {
|
||||
left: auto;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-1 {
|
||||
left: 8.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-2 {
|
||||
left: 16.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-3 {
|
||||
left: 25%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-4 {
|
||||
left: 33.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-5 {
|
||||
left: 41.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-6 {
|
||||
left: 50%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-7 {
|
||||
left: 58.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-8 {
|
||||
left: 66.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-9 {
|
||||
left: 75%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-10 {
|
||||
left: 83.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-pull-11 {
|
||||
left: 91.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-sm-offset-1 {
|
||||
margin-right: 8.33333%
|
||||
}
|
||||
.col-sm-offset-2 {
|
||||
margin-right: 16.66667%
|
||||
}
|
||||
.col-sm-offset-3 {
|
||||
margin-right: 25%
|
||||
}
|
||||
.col-sm-offset-4 {
|
||||
margin-right: 33.33333%
|
||||
}
|
||||
.col-sm-offset-5 {
|
||||
margin-right: 41.66667%
|
||||
}
|
||||
.col-sm-offset-6 {
|
||||
margin-right: 50%
|
||||
}
|
||||
.col-sm-offset-7 {
|
||||
margin-right: 58.33333%
|
||||
}
|
||||
.col-sm-offset-8 {
|
||||
margin-right: 66.66667%
|
||||
}
|
||||
.col-sm-offset-9 {
|
||||
margin-right: 75%
|
||||
}
|
||||
.col-sm-offset-10 {
|
||||
margin-right: 83.33333%
|
||||
}
|
||||
.col-sm-offset-11 {
|
||||
margin-right: 91.66667%
|
||||
}
|
||||
.col-sm-offset-1,
|
||||
.col-sm-offset-2,
|
||||
.col-sm-offset-3,
|
||||
.col-sm-offset-4,
|
||||
.col-sm-offset-5,
|
||||
.col-sm-offset-6,
|
||||
.col-sm-offset-7,
|
||||
.col-sm-offset-8,
|
||||
.col-sm-offset-9,
|
||||
.col-sm-offset-10,
|
||||
.col-sm-offset-11 {
|
||||
margin-left: 0
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.container {
|
||||
max-width: 940px
|
||||
}
|
||||
.col-md-1,
|
||||
.col-md-2,
|
||||
.col-md-3,
|
||||
.col-md-4,
|
||||
.col-md-5,
|
||||
.col-md-6,
|
||||
.col-md-7,
|
||||
.col-md-8,
|
||||
.col-md-9,
|
||||
.col-md-10,
|
||||
.col-md-11 {
|
||||
float: right
|
||||
}
|
||||
.col-md-1 {
|
||||
width: 8.33333%
|
||||
}
|
||||
.col-md-2 {
|
||||
width: 16.66667%
|
||||
}
|
||||
.col-md-3 {
|
||||
width: 25%
|
||||
}
|
||||
.col-md-4 {
|
||||
width: 33.33333%
|
||||
}
|
||||
.col-md-5 {
|
||||
width: 41.66667%
|
||||
}
|
||||
.col-md-6 {
|
||||
width: 50%
|
||||
}
|
||||
.col-md-7 {
|
||||
width: 58.33333%
|
||||
}
|
||||
.col-md-8 {
|
||||
width: 66.66667%
|
||||
}
|
||||
.col-md-9 {
|
||||
width: 75%
|
||||
}
|
||||
.col-md-10 {
|
||||
width: 83.33333%
|
||||
}
|
||||
.col-md-11 {
|
||||
width: 91.66667%
|
||||
}
|
||||
.col-md-12 {
|
||||
width: 100%
|
||||
}
|
||||
.col-md-push-1 {
|
||||
right: 8.33333%
|
||||
}
|
||||
.col-md-push-2 {
|
||||
right: 16.66667%
|
||||
}
|
||||
.col-md-push-3 {
|
||||
right: 25%
|
||||
}
|
||||
.col-md-push-4 {
|
||||
right: 33.33333%
|
||||
}
|
||||
.col-md-push-5 {
|
||||
right: 41.66667%
|
||||
}
|
||||
.col-md-push-6 {
|
||||
right: 50%
|
||||
}
|
||||
.col-md-push-7 {
|
||||
right: 58.33333%
|
||||
}
|
||||
.col-md-push-8 {
|
||||
right: 66.66667%
|
||||
}
|
||||
.col-md-push-9 {
|
||||
right: 75%
|
||||
}
|
||||
.col-md-push-10 {
|
||||
right: 83.33333%
|
||||
}
|
||||
.col-md-push-11 {
|
||||
right: 91.66667%
|
||||
}
|
||||
.col-md-pull-0 {
|
||||
left: auto;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-1 {
|
||||
left: 8.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-2 {
|
||||
left: 16.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-3 {
|
||||
left: 25%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-4 {
|
||||
left: 33.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-5 {
|
||||
left: 41.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-6 {
|
||||
left: 50%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-7 {
|
||||
left: 58.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-8 {
|
||||
left: 66.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-9 {
|
||||
left: 75%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-10 {
|
||||
left: 83.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-pull-11 {
|
||||
left: 91.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-md-offset-1 {
|
||||
margin-right: 8.33333%
|
||||
}
|
||||
.col-md-offset-2 {
|
||||
margin-right: 16.66667%
|
||||
}
|
||||
.col-md-offset-3 {
|
||||
margin-right: 25%
|
||||
}
|
||||
.col-md-offset-4 {
|
||||
margin-right: 33.33333%
|
||||
}
|
||||
.col-md-offset-5 {
|
||||
margin-right: 41.66667%
|
||||
}
|
||||
.col-md-offset-6 {
|
||||
margin-right: 50%
|
||||
}
|
||||
.col-md-offset-7 {
|
||||
margin-right: 58.33333%
|
||||
}
|
||||
.col-md-offset-8 {
|
||||
margin-right: 66.66667%
|
||||
}
|
||||
.col-md-offset-9 {
|
||||
margin-right: 75%
|
||||
}
|
||||
.col-md-offset-10 {
|
||||
margin-right: 83.33333%
|
||||
}
|
||||
.col-md-offset-11 {
|
||||
margin-right: 91.66667%
|
||||
}
|
||||
.col-md-offset-1,
|
||||
.col-md-offset-2,
|
||||
.col-md-offset-3,
|
||||
.col-md-offset-4,
|
||||
.col-md-offset-5,
|
||||
.col-md-offset-6,
|
||||
.col-md-offset-7,
|
||||
.col-md-offset-8,
|
||||
.col-md-offset-9,
|
||||
.col-md-offset-10,
|
||||
.col-md-offset-11 {
|
||||
margin-left: 0
|
||||
}
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
.container {
|
||||
max-width: 1170px
|
||||
}
|
||||
.col-lg-1,
|
||||
.col-lg-2,
|
||||
.col-lg-3,
|
||||
.col-lg-4,
|
||||
.col-lg-5,
|
||||
.col-lg-6,
|
||||
.col-lg-7,
|
||||
.col-lg-8,
|
||||
.col-lg-9,
|
||||
.col-lg-10,
|
||||
.col-lg-11 {
|
||||
float: right
|
||||
}
|
||||
.col-lg-1 {
|
||||
width: 8.33333%
|
||||
}
|
||||
.col-lg-2 {
|
||||
width: 16.66667%
|
||||
}
|
||||
.col-lg-3 {
|
||||
width: 25%
|
||||
}
|
||||
.col-lg-4 {
|
||||
width: 33.33333%
|
||||
}
|
||||
.col-lg-5 {
|
||||
width: 41.66667%
|
||||
}
|
||||
.col-lg-6 {
|
||||
width: 50%
|
||||
}
|
||||
.col-lg-7 {
|
||||
width: 58.33333%
|
||||
}
|
||||
.col-lg-8 {
|
||||
width: 66.66667%
|
||||
}
|
||||
.col-lg-9 {
|
||||
width: 75%
|
||||
}
|
||||
.col-lg-10 {
|
||||
width: 83.33333%
|
||||
}
|
||||
.col-lg-11 {
|
||||
width: 91.66667%
|
||||
}
|
||||
.col-lg-12 {
|
||||
width: 100%
|
||||
}
|
||||
.col-lg-push-1 {
|
||||
right: 8.33333%
|
||||
}
|
||||
.col-lg-push-2 {
|
||||
right: 16.66667%
|
||||
}
|
||||
.col-lg-push-3 {
|
||||
right: 25%
|
||||
}
|
||||
.col-lg-push-4 {
|
||||
right: 33.33333%
|
||||
}
|
||||
.col-lg-push-5 {
|
||||
right: 41.66667%
|
||||
}
|
||||
.col-lg-push-6 {
|
||||
right: 50%
|
||||
}
|
||||
.col-lg-push-7 {
|
||||
right: 58.33333%
|
||||
}
|
||||
.col-lg-push-8 {
|
||||
right: 66.66667%
|
||||
}
|
||||
.col-lg-push-9 {
|
||||
right: 75%
|
||||
}
|
||||
.col-lg-push-10 {
|
||||
right: 83.33333%
|
||||
}
|
||||
.col-lg-push-11 {
|
||||
right: 91.66667%
|
||||
}
|
||||
.col-lg-pull-0 {
|
||||
left: auto;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-1 {
|
||||
left: 8.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-2 {
|
||||
left: 16.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-3 {
|
||||
left: 25%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-4 {
|
||||
left: 33.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-5 {
|
||||
left: 41.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-6 {
|
||||
left: 50%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-7 {
|
||||
left: 58.33333%;
|
||||
right: auto;
|
||||
right: unset
|
||||
}
|
||||
.col-lg-pull-8 {
|
||||
left: 66.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-9 {
|
||||
left: 75%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-10 {
|
||||
left: 83.33333%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-pull-11 {
|
||||
left: 91.66667%;
|
||||
right: auto
|
||||
}
|
||||
.col-lg-offset-1 {
|
||||
margin-right: 8.33333%
|
||||
}
|
||||
.col-lg-offset-2 {
|
||||
margin-right: 16.66667%
|
||||
}
|
||||
.col-lg-offset-3 {
|
||||
margin-right: 25%
|
||||
}
|
||||
.col-lg-offset-4 {
|
||||
margin-right: 33.33333%
|
||||
}
|
||||
.col-lg-offset-5 {
|
||||
margin-right: 41.66667%
|
||||
}
|
||||
.col-lg-offset-6 {
|
||||
margin-right: 50%
|
||||
}
|
||||
.col-lg-offset-7 {
|
||||
margin-right: 58.33333%
|
||||
}
|
||||
.col-lg-offset-8 {
|
||||
margin-right: 66.66667%
|
||||
}
|
||||
.col-lg-offset-9 {
|
||||
margin-right: 75%
|
||||
}
|
||||
.col-lg-offset-10 {
|
||||
margin-right: 83.33333%
|
||||
}
|
||||
.col-lg-offset-11 {
|
||||
margin-right: 91.66667%
|
||||
}
|
||||
.col-lg-offset-1,
|
||||
.col-lg-offset-2,
|
||||
.col-lg-offset-3,
|
||||
.col-lg-offset-4,
|
||||
.col-lg-offset-5,
|
||||
.col-lg-offset-6,
|
||||
.col-lg-offset-7,
|
||||
.col-lg-offset-8,
|
||||
.col-lg-offset-9,
|
||||
.col-lg-offset-10,
|
||||
.col-lg-offset-11 {
|
||||
margin-left: 0
|
||||
}
|
||||
}
|
||||
@@ -64,8 +64,10 @@ $(document).ready(function() {
|
||||
|
||||
$("#header .shopping_cart a:first").hover(
|
||||
function() {
|
||||
if (ajaxCart.nb_total_products > 0 || parseInt($('.ajax_cart_quantity').html()) > 0)
|
||||
$("#header .cart_block").stop(true, true).slideDown(450);
|
||||
if (!is_touch_enabled) {
|
||||
if (ajaxCart.nb_total_products > 0 || parseInt($('.ajax_cart_quantity').html()) > 0)
|
||||
$("#header .cart_block").stop(true, true).slideDown(450);
|
||||
}
|
||||
},
|
||||
function() {
|
||||
setTimeout(function() {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<!-- left infos-->
|
||||
<div class="pb-left-column col-xs-12 col-sm-8 col-md-8">
|
||||
<div class="room_type_img_containter card">
|
||||
<div class="room_hotel_name_block">
|
||||
<div class="room_hotel_name_block {if isset($language_is_rtl) && $language_is_rtl}rtl{/if}">
|
||||
<div class="hotel_name_block">
|
||||
<h1><span class="hotel_name">{$product->name}
|
||||
{* Block for booking products *}
|
||||
|
||||
Reference in New Issue
Block a user