Merge branch 'ticket-14698-sensefuel' into develop

This commit is contained in:
Michael RICOIS 2017-11-22 17:46:21 +01:00
commit 68e2affa4e
5 changed files with 57 additions and 47 deletions

View File

@ -31,6 +31,7 @@ if (!defined('_PS_VERSION_'))
class BlockUserInfo extends Module
{
private $useTopUpper = true;
private $disableCredits = true;
public function __construct()
{
@ -72,15 +73,18 @@ class BlockUserInfo extends Module
return;
}
$display_credits = true;
$sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer;
if(Db::getInstance()->getValue($sql)){
$display_credits = false;
$display_credits = false;
if ($this->disableCredits === false) {
$display_credits = true;
$sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer;
if(Db::getInstance()->getValue($sql)){
$display_credits = false;
}
$sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer;
$loyalties = Db::getInstance()->getValue($sql);
}
$sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer;
$loyalties = Db::getInstance()->getValue($sql);
$smarty->assign(array(
'onlyForm' => !$this->useTopUpper,
'display_credits' => $display_credits,
@ -109,16 +113,20 @@ class BlockUserInfo extends Module
return;
global $smarty, $cookie, $cart;
$display_credits = true;
if ($cookie->logged) {
$sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer;
if(Db::getInstance()->getValue($sql)){
$display_credits = false;
}
$sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer;
$loyalties = Db::getInstance()->getValue($sql);
$display_credits = false;
if ($this->disableCredits === false) {
$display_credits = true;
if ($cookie->logged) {
$display_credits = true;
$sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer;
if(Db::getInstance()->getValue($sql)){
$display_credits = false;
}
$sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer;
$loyalties = Db::getInstance()->getValue($sql);
}
}
$smarty->assign(array(

View File

@ -3,7 +3,7 @@
<form action="{$base_dir_ssl}search.php" id="search" role="search">
<div class="search">
<div class="search_form">
<input id="global_search" class="search_input" type="text" placeholder="{l s='Rechercher une marque, un produit' mod='sensefuel'}">
<input id="global_search" class="search_input" type="text" placeholder="{l s='Rechercher un produit...' mod='sensefuel'}">
<a title="{l s='Rechercher' mod='sensefuel'}" class="search_submit" href="#"><span class="picto"></span></a>
</div>
</div>

View File

@ -1714,7 +1714,7 @@ body#page-404 .footer_links {
}
#header > .content > .top .block {
display: none;
margin: 0 0 0 20px;
/*margin: 0 0 0 20px;*/
float: right;
position: relative;
}
@ -1759,7 +1759,7 @@ body#page-404 .footer_links {
box-shadow: 0px 4px 4px #bfbcb4;
}
#header > .content > .top {
/*clear: both;*/
clear: both;
background: #fff;
}
#header > .content > .top .block ul li {
@ -1779,7 +1779,7 @@ body#page-404 .footer_links {
#header > .content > .top > .content {
width: 980px;
margin: 0px auto;
padding-top: 6px;
/*padding-top: 6px;*/
height: 84px;
position: relative;
}
@ -2082,17 +2082,20 @@ li.active .container_submenu .content_submenu {
height: 39px;
border-top: 0px;
position: absolute;
top: 131px;
top: 140px;
z-index: -1;
width: 100%;
left: 0px;
background: url("../img/subheader.png") repeat top;
}
.breadcrumb {
top: 141px;
position: absolute;
z-index: 4;
width: 980px;
height: 27px;
color: #1e1633;
padding-top: 11px;
}
.breadcrumb a, .breadcrumb span {
margin-right: 5px;
@ -2254,7 +2257,7 @@ body #columns {
background-repeat: repeat-x;
background-position: left 131px;
min-height: 715px;
padding-top: 140px;
padding-top: 170px;
}
body #columns#authentication, body #columns#index.singleCol, body #columns#validation {
background: url("../img/hp2.jpg") no-repeat 0px 99px #ffffff;
@ -5538,7 +5541,7 @@ body.logged #header_user {
margin-right: 10px;
/*margin-left: 165px;*/
/*margin-top: 35px;*/
min-width: 270px;
/*min-width: 270px;*/
}
.help_contact {
background: url('../img/aide-contact.png') no-repeat left center;
@ -5630,6 +5633,7 @@ body.nav_active #header_nav .inner a.submenu_top_btn { z-index: 2;}
#header_nav ul li.account_hover:hover a.submenu_top_btn{ border-color: #ccc }
#header_nav .inner ul.submenu_top {
background: #fff;
border-top: 0;
border: 1px solid #ccc;
display: none;
position: absolute;
@ -5666,7 +5670,7 @@ body.nav_active #header_nav .inner a.submenu_top_btn { z-index: 2;}
cursor: pointer;
height: 32px;
line-height: 32px;
margin-top: 11px;
margin-top: 24px;
padding-top: 6px;
padding-bottom: 5px;
padding-left: 45px;
@ -7568,13 +7572,13 @@ div.addresses ul.address.item {
#sensefuel {
display: inline-block;
vertical-align: top;
width: 50%;
width: 480px;
float: left;
padding-left: 20px;
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}
#sensefuel .search .search_form {
padding-top: 20px;
padding-top: 32px;
}
#sensefuel .search .search_form .search_input {
display: block;
@ -7585,8 +7589,9 @@ div.addresses ul.address.item {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
/*font-size: 15px;*/
line-height: 28px;
width: 80%;
line-height: 32px;
height: 18px;
width: 400px;
}
#sensefuel .search .search_form a.search_submit {
display: block;
@ -7594,8 +7599,8 @@ div.addresses ul.address.item {
background: #70bc2c;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
height: 32px;
width: 15%;
height: 30px;
width: 40px;
}
#sensefuel .search .search_form a.search_submit:hover {
-moz-transition: background 0.5s ease;
@ -7607,7 +7612,7 @@ div.addresses ul.address.item {
#sensefuel .search .search_form a.search_submit span.picto {
display: block;
background: url(../img/white_magnifier.png) no-repeat scroll center center transparent;
height: 32px;
height: 30px;
width: 100%;
}

View File

@ -435,10 +435,9 @@
<body {if $page_name}id="{$page_name|escape:'htmlall':'UTF-8'}"{/if} class="{$bodyClass}{if $cookie->isLogged()} logged{/if}{if isset($smarty.get.content_only)} content_only{/if}{if isset($smarty.post.email_create) || isset($smarty.get.create_account)} create{/if} lang{$cookie->id_lang}">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PT7ZGQF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PT7ZGQF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{if !$content_only}
{if isset($restricted_country_mode) && $restricted_country_mode}
@ -450,22 +449,20 @@
<!-- Header -->
<div id="header">
<div class="content">
<div class="top-upper">
<div class="content-upper">
<span class='help_contact'><a href="{$base_dir_ssl}modules/ant_support/help.php">{l s='Aide et contact'}</a></span>
{$HOOK_TOP_UPPER}
<div class="content-upper">
<span class='help_contact'><a href="{$base_dir_ssl}modules/ant_support/help.php">{l s='Aide et contact'}</a></span>
{$HOOK_TOP_UPPER}
</div>
</div>
</div>
<div class="top">
<div class="content">
{$HOOK_TOP}
</div>
</div>
</div>
{$HOOK_TOP_MENU}
</div>

View File

@ -78,9 +78,9 @@
</ul>
</li>
</ul>
{/if}
{* {/if} *}
</div>
{* {/if} *}
{/if}
</div>
</div>
<!-- /Block user information module HEADER -->