Merge branch 'Qloapps:develop' into gli-1513
This commit is contained in:
@@ -298,15 +298,6 @@ $chosen-sprite-path: '../img/chosen-sprite.png'
|
||||
.search-field input
|
||||
color: #111 !important
|
||||
|
||||
.chosen-container-multi.chosen-options-horizontal .chosen-choices
|
||||
max-height: 55px !important
|
||||
white-space: nowrap
|
||||
overflow-x: auto
|
||||
|
||||
.chosen-container-multi.chosen-options-horizontal .chosen-choices li
|
||||
float: none
|
||||
display: inline-block
|
||||
|
||||
.chosen-disabled
|
||||
cursor: default
|
||||
opacity: 0.5 !important
|
||||
@@ -353,7 +344,4 @@ $chosen-sprite-path: '../img/chosen-sprite.png'
|
||||
.chosen-search input
|
||||
background: url($chosen-sprite-path) no-repeat -28px -20px, $chosen-background
|
||||
direction: rtl
|
||||
padding: 4px 5px 4px 20px
|
||||
|
||||
#list_filters_panel .chosen-container
|
||||
width: 100% !important
|
||||
padding: 4px 5px 4px 20px
|
||||
@@ -215,4 +215,16 @@
|
||||
padding: 8px 12px
|
||||
text-transform: none
|
||||
label
|
||||
font-weight: 400
|
||||
font-weight: 400
|
||||
|
||||
#list_filters_panel .chosen-container
|
||||
width: 100% !important
|
||||
|
||||
#list_filters_panel .chosen-container-multi .chosen-choices
|
||||
max-height: 55px !important
|
||||
white-space: nowrap
|
||||
overflow-x: auto
|
||||
|
||||
#list_filters_panel .chosen-container-multi .chosen-choices li
|
||||
float: none
|
||||
display: inline-block
|
||||
@@ -250,7 +250,7 @@
|
||||
</div>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.multiple) && $params.multiple}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen chosen-options-horizontal" multiple name="{$list_id}Filter_{$params.filter_key}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen" multiple name="{$list_id}Filter_{$params.filter_key}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if isset($params.value) && $params.value}{if in_array($option_value, $params.value)} selected="selected"{/if}{/if}>{$option_display}</option>
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
</div>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.multiple) && $params.multiple}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen chosen-options-horizontal" multiple name="{$list_id}Filter_{$params.filter_key}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen" multiple name="{$list_id}Filter_{$params.filter_key}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if isset($params.value) && $params.value}{if in_array($option_value, $params.value)} selected="selected"{/if}{/if}>{$option_display}</option>
|
||||
|
||||
@@ -128,4 +128,20 @@ class PageCore extends ObjectModel
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
public static function getPageTypeAlias($pageName)
|
||||
{
|
||||
$pageTypeAlias = array(
|
||||
'index' => 'home',
|
||||
'category' => 'hotel',
|
||||
'product' => 'room-type',
|
||||
'orderopc' => 'checkout'
|
||||
);
|
||||
|
||||
if (isset($pageTypeAlias[$pageName])) {
|
||||
return $pageTypeAlias[$pageName];
|
||||
} else {
|
||||
return $pageName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -767,7 +767,6 @@ $(document).ready(function()
|
||||
$(item).chosen({
|
||||
disable_search_threshold: 5,
|
||||
search_contains: true,
|
||||
inherit_select_classes: true,
|
||||
});
|
||||
});
|
||||
// Apply chosen() when modal is loaded
|
||||
|
||||
@@ -579,6 +579,7 @@ class HotelHelper
|
||||
'price' => '250',
|
||||
'auto_add_to_cart' => 1,
|
||||
'show_at_front' => 0,
|
||||
'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_DAY,
|
||||
'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM,
|
||||
),
|
||||
array(
|
||||
@@ -588,6 +589,7 @@ class HotelHelper
|
||||
'price' => '250',
|
||||
'auto_add_to_cart' => 1,
|
||||
'show_at_front' => 0,
|
||||
'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_BOOKING,
|
||||
'price_addition_type' => Product::PRICE_ADDITION_TYPE_INDEPENDENT,
|
||||
),
|
||||
array(
|
||||
@@ -597,6 +599,7 @@ class HotelHelper
|
||||
'price' => '50',
|
||||
'auto_add_to_cart' => 0,
|
||||
'show_at_front' => 1,
|
||||
'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_BOOKING,
|
||||
'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM,
|
||||
),
|
||||
array(
|
||||
@@ -606,6 +609,8 @@ class HotelHelper
|
||||
'price' => '200',
|
||||
'auto_add_to_cart' => 0,
|
||||
'show_at_front' => 1,
|
||||
'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_BOOKING,
|
||||
'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM,
|
||||
),
|
||||
array(
|
||||
'name' => 'Breakfast',
|
||||
@@ -614,6 +619,8 @@ class HotelHelper
|
||||
'price' => '350',
|
||||
'auto_add_to_cart' => 0,
|
||||
'show_at_front' => 1,
|
||||
'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_DAY,
|
||||
'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM,
|
||||
),
|
||||
array(
|
||||
'name' => 'Dinner',
|
||||
@@ -622,6 +629,8 @@ class HotelHelper
|
||||
'price' => '450',
|
||||
'auto_add_to_cart' => 0,
|
||||
'show_at_front' => 1,
|
||||
'price_calculation_method' => Product::PRICE_CALCULATION_METHOD_PER_DAY,
|
||||
'price_addition_type' => Product::PRICE_ADDITION_TYPE_WITH_ROOM,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -650,9 +659,8 @@ class HotelHelper
|
||||
$objProduct->auto_add_to_cart = $serviceProduct['auto_add_to_cart'];
|
||||
$objProduct->show_at_front = $serviceProduct['show_at_front'];
|
||||
$objProduct->available_for_order = 1;
|
||||
if ($serviceProduct['auto_add_to_cart']) {
|
||||
$objProduct->price_addition_type = $serviceProduct['price_addition_type'];
|
||||
}
|
||||
$objProduct->price_addition_type = $serviceProduct['price_addition_type'];
|
||||
$objProduct->price_calculation_method = $serviceProduct['price_calculation_method'];
|
||||
$objProduct->is_virtual = 1;
|
||||
$objProduct->indexed = 1;
|
||||
$objProduct->save();
|
||||
|
||||
@@ -89,6 +89,7 @@ class StatsLive extends Module
|
||||
ORDER BY u.firstname, u.lastname';
|
||||
}
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
$this->updatePageTypeAlias($results);
|
||||
|
||||
return array($results, Db::getInstance()->NumRows());
|
||||
}
|
||||
@@ -130,10 +131,20 @@ class StatsLive extends Module
|
||||
}
|
||||
|
||||
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
$this->updatePageTypeAlias($results);
|
||||
|
||||
return array($results, Db::getInstance()->NumRows());
|
||||
}
|
||||
|
||||
public function updatePageTypeAlias(&$result)
|
||||
{
|
||||
if (count($result)) {
|
||||
foreach ($result as &$customer) {
|
||||
$customer['page'] = Page::getPageTypeAlias($customer['page']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function hookAdminStatsModules($params)
|
||||
{
|
||||
list($customers, $total_customers) = $this->getCustomersOnline();
|
||||
|
||||
Reference in New Issue
Block a user