Merge branch 'ticket-14698-sensefuel' into develop
Conflicts: themes/site/css/style.css themes/site_mobile/css/style.css
This commit is contained in:
commit
0685f70903
@ -30,6 +30,8 @@ if (!defined('_PS_VERSION_'))
|
||||
|
||||
class BlockUserInfo extends Module
|
||||
{
|
||||
private $useTopUpper = true;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blockuserinfo';
|
||||
@ -46,7 +48,53 @@ class BlockUserInfo extends Module
|
||||
|
||||
public function install()
|
||||
{
|
||||
return (parent::install() AND $this->registerHook('top'));
|
||||
return (parent::install()
|
||||
&& $this->registerHook('top')
|
||||
&& $this->registerHook('displayTopUpper')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add content before header
|
||||
*
|
||||
* @param array $params
|
||||
* @return string
|
||||
*/
|
||||
public function hookDisplayTopUpper($params)
|
||||
{
|
||||
if (!$this->active) {
|
||||
return;
|
||||
}
|
||||
|
||||
global $smarty, $cookie, $cart;
|
||||
|
||||
if (!$cookie->logged) {
|
||||
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;
|
||||
}
|
||||
|
||||
$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,
|
||||
'loyalties' => ($loyalties)?$loyalties:0,
|
||||
'cart' => $cart,
|
||||
'cart_qties' => $cart->nbProducts(),
|
||||
'logged' => $cookie->isLogged(),
|
||||
'customerName' => ($cookie->logged ? $cookie->customer_firstname.' '.$cookie->customer_lastname : false),
|
||||
'firstName' => ($cookie->logged ? $cookie->customer_firstname : false),
|
||||
'lastName' => ($cookie->logged ? $cookie->customer_lastname : false),
|
||||
'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order'
|
||||
));
|
||||
|
||||
return $this->display(__FILE__, 'blockuserinfo.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -59,19 +107,22 @@ class BlockUserInfo extends Module
|
||||
{
|
||||
if (!$this->active)
|
||||
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);
|
||||
}
|
||||
|
||||
$smarty->assign(array(
|
||||
'onlyForm' => !$this->useTopUpper,
|
||||
'display_credits' => $display_credits,
|
||||
'loyalties' => ($loyalties)?$loyalties:0,
|
||||
'cart' => $cart,
|
||||
@ -82,6 +133,7 @@ class BlockUserInfo extends Module
|
||||
'lastName' => ($cookie->logged ? $cookie->customer_lastname : false),
|
||||
'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order'
|
||||
));
|
||||
|
||||
return $this->display(__FILE__, 'blockuserinfo.tpl');
|
||||
}
|
||||
}
|
||||
|
@ -394,6 +394,11 @@ class SenseFuelFluxExport
|
||||
'g:product_type');
|
||||
}
|
||||
}
|
||||
// Bebeboutik : force categories
|
||||
foreach ($currentProduct['conso_categories'] as $currentCategory) {
|
||||
$this->addContentLine($currentCategory, 'g:product_type');
|
||||
}
|
||||
|
||||
$this->addContentLine('Ventes privées', 'c:sale_type');
|
||||
$this->addContentLine($currentProduct['catname'], 'c:private_sale_name');
|
||||
}
|
||||
|
@ -38,11 +38,12 @@ class SenseFuel extends Module
|
||||
|
||||
public function hookTop($params)
|
||||
{
|
||||
/*
|
||||
if(_PS_MOBILE_){
|
||||
return false;
|
||||
}
|
||||
|
||||
global $site_version, $page_name;
|
||||
|
||||
if (null !== $site_version &&
|
||||
null !== $page_name &&
|
||||
in_array($site_version, self::$ACTIVE_VERSION_ARRAY, true) &&
|
||||
@ -61,12 +62,10 @@ class SenseFuel extends Module
|
||||
}
|
||||
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
|
||||
public function hookSubTop($params)
|
||||
{
|
||||
/*
|
||||
if(!_PS_MOBILE_){
|
||||
return false;
|
||||
}
|
||||
@ -89,12 +88,10 @@ class SenseFuel extends Module
|
||||
}
|
||||
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
|
||||
public function hookFooter($params)
|
||||
{
|
||||
/*
|
||||
global $site_version, $smarty;
|
||||
if (null !== $site_version &&
|
||||
( in_array($site_version, self::$ACTIVE_VERSION_ARRAY, true)
|
||||
@ -104,7 +101,6 @@ class SenseFuel extends Module
|
||||
}
|
||||
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
@ -10,10 +10,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<style>
|
||||
|
||||
#category #shop_category .shop_category_filter.horizontal .search {
|
||||
#category #shop_category .shop_category_filter.horizontal .search {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
{/if}
|
||||
|
@ -14,6 +14,8 @@ class FrontController extends FrontControllerCore {
|
||||
{
|
||||
self::$smarty->assign(array(
|
||||
'HOOK_TOP_MENU' => Module::hookExec('topMenu'),
|
||||
'HOOK_TOP_UPPER' => Module::hookExec('displayTopUpper'),
|
||||
'HOOK_SUBTOP' => Module::hookExec('subtop'),
|
||||
));
|
||||
parent::displayHeader();
|
||||
}
|
||||
|
@ -7686,4 +7686,49 @@ div.addresses ul.address.item {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#sensefuel {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
#sensefuel .search .search_form {
|
||||
padding-top: 20px;
|
||||
}
|
||||
#sensefuel .search .search_form .search_input {
|
||||
display: block;
|
||||
float: left;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
padding: 5px 0 5px 10px;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
/*font-size: 15px;*/
|
||||
line-height: 28px;
|
||||
width: 80%;
|
||||
}
|
||||
#sensefuel .search .search_form a.search_submit {
|
||||
display: block;
|
||||
float: left;
|
||||
background: #70bc2c;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
height: 32px;
|
||||
width: 15%;
|
||||
}
|
||||
#sensefuel .search .search_form a.search_submit:hover {
|
||||
-moz-transition: background 0.5s ease;
|
||||
-o-transition: background 0.5s ease;
|
||||
-webkit-transition: background 0.5s ease;
|
||||
transition: background 0.5s ease;
|
||||
background: #70bc2c;
|
||||
}
|
||||
#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;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
@ -450,10 +450,19 @@
|
||||
|
||||
<!-- 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>
|
||||
</div>
|
||||
<div class="top">
|
||||
<div class="content">
|
||||
<span class='help_contact'><a href="{$base_dir_ssl}modules/ant_support/help.php">{l s='Aide et contact'}</a></span>
|
||||
{$HOOK_TOP}
|
||||
</div>
|
||||
</div>
|
||||
|
BIN
themes/site/img/white_magnifier.png
Normal file
BIN
themes/site/img/white_magnifier.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 409 B |
@ -24,10 +24,11 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- Block user information module HEADER -->
|
||||
{if $page_name != 'authentication'}
|
||||
<div id="header_user">
|
||||
<!-- Block user information module HEADER -->
|
||||
{if $cookie->isLogged()}
|
||||
{if $onlyForm == false}
|
||||
<div id="header_user">
|
||||
<div id="header_nav">
|
||||
<div class="inner">{l s='Bonjour' mod='blockuserinfo'}
|
||||
{if $cookie->id_lang == 3}
|
||||
@ -81,7 +82,10 @@
|
||||
</div>
|
||||
{* {/if} *}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div id="header_user">
|
||||
<form id="login_form_top" method="post" action="{$link->getPageLink('authentication.php')}">
|
||||
<fieldset>
|
||||
<p class="title">{l s='Accès membre' mod='blockuserinfo'}</p>
|
||||
@ -98,7 +102,7 @@
|
||||
<a class="forgot" href="{$link->getPageLink('password.php')}">{l s='Mot de passe oublié ?' mod='blockuserinfo'}</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- /Block user information module HEADER -->
|
||||
{/if}
|
||||
|
@ -5458,3 +5458,70 @@ body#order-detail table#order-product tbody tr.item tr.title span.quantity{
|
||||
.container_submenu .content_footer a:visited {
|
||||
color: #ec15ac;
|
||||
}
|
||||
|
||||
#sensefuel {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
#sensefuel .search .search_form .search_input {
|
||||
display: block;
|
||||
float: left;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
/*font-size: 15px;*/
|
||||
line-height: 16px;
|
||||
width: 84%;
|
||||
}
|
||||
#sensefuel .search .search_form a.search_submit {
|
||||
display: block;
|
||||
float: left;
|
||||
background: #70bc2c;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
height: 30px;
|
||||
width: 15%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#sensefuel {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
#sensefuel .search .search_form .search_input {
|
||||
display: block;
|
||||
float: left;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
/*font-size: 15px;*/
|
||||
line-height: 16px;
|
||||
width: 84%;
|
||||
}
|
||||
#sensefuel .search .search_form a.search_submit {
|
||||
display: block;
|
||||
float: left;
|
||||
background: #70bc2c;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
height: 30px;
|
||||
width: 15%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#sensefuel .search .search_form a.search_submit:hover {
|
||||
-moz-transition: background 0.5s ease;
|
||||
-o-transition: background 0.5s ease;
|
||||
-webkit-transition: background 0.5s ease;
|
||||
transition: background 0.5s ease;
|
||||
background: #70bc2c;
|
||||
}
|
||||
#sensefuel .search .search_form a.search_submit span.picto {
|
||||
display: block;
|
||||
background: url(../img/white_magnifier.png) no-repeat scroll center center transparent;
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -468,4 +468,5 @@
|
||||
|
||||
<!-- Center -->
|
||||
<div id="center_column">
|
||||
{$HOOK_SUBTOP}
|
||||
{/if}
|
||||
|
BIN
themes/site_mobile/img/white_magnifier.png
Normal file
BIN
themes/site_mobile/img/white_magnifier.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 409 B |
Loading…
Reference in New Issue
Block a user