Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop
This commit is contained in:
commit
e212d848e6
@ -30,7 +30,9 @@ if (!defined('_PS_VERSION_'))
|
||||
|
||||
class BlockUserInfo extends Module
|
||||
{
|
||||
public function __construct()
|
||||
private $useTopUpper = true;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'blockuserinfo';
|
||||
$this->tab = 'front_office_features';
|
||||
@ -46,9 +48,55 @@ 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');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns module content for header
|
||||
*
|
||||
@ -59,19 +107,22 @@ class BlockUserInfo extends Module
|
||||
{
|
||||
if (!$this->active)
|
||||
return;
|
||||
|
||||
global $smarty, $cookie, $cart;
|
||||
|
||||
$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;
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
$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 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#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>
|
||||
<div class="content">
|
||||
{$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,64 +24,68 @@
|
||||
* 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()}
|
||||
<div id="header_nav">
|
||||
<div class="inner">{l s='Bonjour' mod='blockuserinfo'}
|
||||
{if $cookie->id_lang == 3}
|
||||
<span>{$cookie->customer_firstname}!</span>
|
||||
{else}
|
||||
<span>{$cookie->customer_firstname} !</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="inner">
|
||||
<ul>
|
||||
<li class="account_hover">
|
||||
<a class="submenu_top_btn" href="{$link->getPageLink('my-account.php', true)}" title="{l s='Your Account' mod='blockuserinfo'}">{l s='Your Account' mod='blockuserinfo'}</a>
|
||||
<ul class="submenu_top">
|
||||
<li><a href="{$link->getPageLink('history.php', true)}" title="{l s='Orders' mod='blockuserinfo'}">{l s='History and details of my orders' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('identity.php', true)}" title="{l s='Information' mod='blockuserinfo'}">{l s='My personal information' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='Loyalty program' mod='blockuserinfo'}">{l s='Loyalty program' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('discount.php', true)}" title="{l s='Credit slips' mod='blockuserinfo'}">{l s='My credit slips' mod='blockuserinfo'}</a></li>
|
||||
<li><a title="Referral program" href="{$base_dir_ssl}modules/invite/invite-program.php">{l s='Programme de parrainage' mod='blockuserinfo'}</a></li>
|
||||
<li class="logout">
|
||||
<a href="{$link->getPageLink('index.php')}?mylogout" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{if $display_credits}
|
||||
<div class="inner">
|
||||
{* {if $cookie->id_lang == 3}
|
||||
<a class="credit" href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">
|
||||
<span class="desc">{l s='Your credit:' mod='blockuserinfo'} <span class="green">{$customer_credit}</span></span>
|
||||
</a>
|
||||
{else} *}
|
||||
<ul>
|
||||
<li class="account_hover">
|
||||
<a class="submenu_top_btn credit" href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">{l s='Your credit' mod='blockuserinfo'}</a>
|
||||
<ul class="submenu_top">
|
||||
<li>
|
||||
<a href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">
|
||||
<span class="desc">{l s='Your credit:' mod='blockuserinfo'} <span class="green">{$customer_credit}</span></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='Loyalty program' mod='blockuserinfo'}">
|
||||
<span class="desc">{l s='Loyalty:' mod='blockuserinfo'} <span class="green">{convertPrice price=$loyalties}</span></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{* {/if} *}
|
||||
{if $onlyForm == false}
|
||||
<div id="header_user">
|
||||
<div id="header_nav">
|
||||
<div class="inner">{l s='Bonjour' mod='blockuserinfo'}
|
||||
{if $cookie->id_lang == 3}
|
||||
<span>{$cookie->customer_firstname}!</span>
|
||||
{else}
|
||||
<span>{$cookie->customer_firstname} !</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="inner">
|
||||
<ul>
|
||||
<li class="account_hover">
|
||||
<a class="submenu_top_btn" href="{$link->getPageLink('my-account.php', true)}" title="{l s='Your Account' mod='blockuserinfo'}">{l s='Your Account' mod='blockuserinfo'}</a>
|
||||
<ul class="submenu_top">
|
||||
<li><a href="{$link->getPageLink('history.php', true)}" title="{l s='Orders' mod='blockuserinfo'}">{l s='History and details of my orders' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('identity.php', true)}" title="{l s='Information' mod='blockuserinfo'}">{l s='My personal information' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='Loyalty program' mod='blockuserinfo'}">{l s='Loyalty program' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('discount.php', true)}" title="{l s='Credit slips' mod='blockuserinfo'}">{l s='My credit slips' mod='blockuserinfo'}</a></li>
|
||||
<li><a title="Referral program" href="{$base_dir_ssl}modules/invite/invite-program.php">{l s='Programme de parrainage' mod='blockuserinfo'}</a></li>
|
||||
<li class="logout">
|
||||
<a href="{$link->getPageLink('index.php')}?mylogout" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{if $display_credits}
|
||||
<div class="inner">
|
||||
{* {if $cookie->id_lang == 3}
|
||||
<a class="credit" href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">
|
||||
<span class="desc">{l s='Your credit:' mod='blockuserinfo'} <span class="green">{$customer_credit}</span></span>
|
||||
</a>
|
||||
{else} *}
|
||||
<ul>
|
||||
<li class="account_hover">
|
||||
<a class="submenu_top_btn credit" href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">{l s='Your credit' mod='blockuserinfo'}</a>
|
||||
<ul class="submenu_top">
|
||||
<li>
|
||||
<a href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">
|
||||
<span class="desc">{l s='Your credit:' mod='blockuserinfo'} <span class="green">{$customer_credit}</span></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='Loyalty program' mod='blockuserinfo'}">
|
||||
<span class="desc">{l s='Loyalty:' mod='blockuserinfo'} <span class="green">{convertPrice price=$loyalties}</span></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
</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