From a2f90949b92b88ba56be458d07011edcbd4e51c4 Mon Sep 17 00:00:00 2001 From: Nolwenn Date: Thu, 6 Jul 2017 18:13:38 +0200 Subject: [PATCH] advsitereviews fix sql --- .../advsitereviews/classes/AdvSiteReview.php | 15 +++--------- www/themes/chocolatdemariage/css/global.css | 14 ++++++----- www/themes/chocolatdemariage/index.tpl | 5 +++- .../modules/advsitereviews/advsitereviews.tpl | 23 +++++++++++++++++++ .../modules/advslider/advslider.tpl | 1 + 5 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 www/themes/chocolatdemariage/modules/advsitereviews/advsitereviews.tpl diff --git a/www/modules/advsitereviews/classes/AdvSiteReview.php b/www/modules/advsitereviews/classes/AdvSiteReview.php index b48dbc2b..90d99349 100644 --- a/www/modules/advsitereviews/classes/AdvSiteReview.php +++ b/www/modules/advsitereviews/classes/AdvSiteReview.php @@ -54,22 +54,13 @@ class AdvSiteReview extends ObjectModel { { $context = Context::getContext(); - $query = ' - SELECT * - FROM `'._DB_PREFIX_.'advsitereviews` adv - JOIN `'._DB_PREFIX_.'advsitereviews_lang` advl ON adv.`id_comment` = advl.`id_comment` AND id_lang = '. (int)$context->language->id; - + $query = 'SELECT * FROM `'._DB_PREFIX_.'advsitereviews` adv JOIN `'._DB_PREFIX_.'advsitereviews_lang` advl ON adv.`id_comment` = advl.`id_comment` AND id_lang = '. (int)$context->language->id; if (Shop::isFeatureActive()) { - $query .= 'JOIN `'._DB_PREFIX_.'advsitereviews_shop` advs ON adv.`id_comment` = advs.`id_comment` AND id_shop = '. (int)$context->shop->id; + $query .= ' JOIN `'._DB_PREFIX_.'advsitereviews_shop` advs ON adv.`id_comment` = advs.`id_comment` AND id_shop = '.(int)$context->shop->id; } - - $query .= ' - WHERE adv.`active` = 1 - ORDER BY `position` ASC - '; + $query .= ' WHERE adv.`active` = 1 ORDER BY `position` ASC'; $reviews = Db::getInstance()->executeS($query); - return $reviews; } diff --git a/www/themes/chocolatdemariage/css/global.css b/www/themes/chocolatdemariage/css/global.css index 9629a7bc..c9cd85a6 100644 --- a/www/themes/chocolatdemariage/css/global.css +++ b/www/themes/chocolatdemariage/css/global.css @@ -1015,21 +1015,22 @@ body.content_only { margin: 0 } margin-bottom: 45px; text-transform: uppercase; } - .flex-direction-nav { + #slider .flex-direction-nav { + display: none!important; left: 0; position: absolute; right: 0; top: 50%; z-index: 3; } - .flex-direction-nav li { + .homeslider .flex-direction-nav li { position: absolute; top: 0px; bottom: 0; } - .flex-direction-nav li.flex-nav-next { right: 55px } - .flex-direction-nav li.flex-nav-prev { left: 45px } - .flex-direction-nav li a { + .homeslider .flex-direction-nav li.flex-nav-next { right: 55px } + .homeslider .flex-direction-nav li.flex-nav-prev { left: 45px } + .homeslider .flex-direction-nav li a { bottom:0; color: rgba(35, 31, 32, 0.3); font-size: 40px; @@ -1064,8 +1065,9 @@ body.content_only { margin: 0 } left: 0; right: 0; bottom: 0; - background-color: rgba(0,0,0,0.2); + background-color: rgba(53, 24, 15, 0.65); opacity: 0; + display: block; } .subcategories-home .inner:hover:before { opacity: 1; diff --git a/www/themes/chocolatdemariage/index.tpl b/www/themes/chocolatdemariage/index.tpl index b1d9efa7..2bba362b 100644 --- a/www/themes/chocolatdemariage/index.tpl +++ b/www/themes/chocolatdemariage/index.tpl @@ -1,4 +1,3 @@ -
@@ -22,5 +21,9 @@
+{hook h="displaySiteReviews"} +{hook h="displaySocial"} +{hook h="displayInstagram"} +{hook h="displaySlider2"} {hook h="displayBestChocolate"} {hook h="displayNews"} \ No newline at end of file diff --git a/www/themes/chocolatdemariage/modules/advsitereviews/advsitereviews.tpl b/www/themes/chocolatdemariage/modules/advsitereviews/advsitereviews.tpl new file mode 100644 index 00000000..a6d1c773 --- /dev/null +++ b/www/themes/chocolatdemariage/modules/advsitereviews/advsitereviews.tpl @@ -0,0 +1,23 @@ +{if isset($reviews)} +
+
+ +
+ + +
+{/if} diff --git a/www/themes/chocolatdemariage/modules/advslider/advslider.tpl b/www/themes/chocolatdemariage/modules/advslider/advslider.tpl index fd50b303..bed45e7c 100644 --- a/www/themes/chocolatdemariage/modules/advslider/advslider.tpl +++ b/www/themes/chocolatdemariage/modules/advslider/advslider.tpl @@ -40,6 +40,7 @@ $('#slider').flexslider({ animation: "slide", pagination: true, + controlNav: false, }); });