diff --git a/admin/themes/default/sass/partials/_chosen.sass b/admin/themes/default/sass/partials/_chosen.sass index 00b3d01f0..b56215a15 100644 --- a/admin/themes/default/sass/partials/_chosen.sass +++ b/admin/themes/default/sass/partials/_chosen.sass @@ -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 \ No newline at end of file + padding: 4px 5px 4px 20px \ No newline at end of file diff --git a/admin/themes/default/sass/partials/_commons.sass b/admin/themes/default/sass/partials/_commons.sass index 588ef7d53..b44f11272 100644 --- a/admin/themes/default/sass/partials/_commons.sass +++ b/admin/themes/default/sass/partials/_commons.sass @@ -215,4 +215,16 @@ padding: 8px 12px text-transform: none label - font-weight: 400 \ No newline at end of file + 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 \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl b/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl index 05ffd57c6..255b57976 100644 --- a/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/list/list_header.tpl @@ -250,7 +250,7 @@ {elseif $params.type == 'select'} {if isset($params.multiple) && $params.multiple} - {if isset($params.list) && is_array($params.list)} {foreach $params.list AS $option_value => $option_display} diff --git a/admin/themes/default/template/controllers/products/helpers/list/list_header.tpl b/admin/themes/default/template/controllers/products/helpers/list/list_header.tpl index 0255b15c6..6801fde31 100644 --- a/admin/themes/default/template/controllers/products/helpers/list/list_header.tpl +++ b/admin/themes/default/template/controllers/products/helpers/list/list_header.tpl @@ -238,7 +238,7 @@ {elseif $params.type == 'select'} {if isset($params.multiple) && $params.multiple} - {if isset($params.list) && is_array($params.list)} {foreach $params.list AS $option_value => $option_display} diff --git a/classes/Page.php b/classes/Page.php index f63641032..6f456d810 100644 --- a/classes/Page.php +++ b/classes/Page.php @@ -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; + } + } } diff --git a/js/admin.js b/js/admin.js index 60a8eba58..daae71858 100644 --- a/js/admin.js +++ b/js/admin.js @@ -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 diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index 2ddd664a8..faecfcfa7 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -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(); diff --git a/modules/statslive/statslive.php b/modules/statslive/statslive.php index bb9088d55..afce68a5b 100644 --- a/modules/statslive/statslive.php +++ b/modules/statslive/statslive.php @@ -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();