Merge branch 'ticket-13753-EvolBannerPromo' into develop
This commit is contained in:
commit
cf80e281c7
@ -23,6 +23,8 @@ class AdminAntPromobanner extends AdminTab
|
||||
foreach(Language::getLanguages(false) as $language) {
|
||||
Configuration::updateValue('ANT_PROMO_BANNER_2',Tools::getValue('enabled_fr', 0));
|
||||
Configuration::updateValue('ANT_PROMO_BANNER_3',Tools::getValue('enabled_es', 0));
|
||||
Configuration::updateValue('ANT_PROMO_BANNERURL_2',Tools::getValue('url_2', ''));
|
||||
Configuration::updateValue('ANT_PROMO_BANNERURL_3',Tools::getValue('url_3', ''));
|
||||
foreach(array_keys($this->imagelist) as $img) {
|
||||
if(isset($_FILES['img_'.$img.'_'.$language['id_lang']]) && $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] != '') {
|
||||
if(!copy($_FILES['img_'.$img.'_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/ant_promobanner/img/img_'.$img.'_'.$language['id_lang'].'.jpg')) {
|
||||
@ -43,7 +45,7 @@ class AdminAntPromobanner extends AdminTab
|
||||
foreach(array_keys($this->imagelist) as $img) {
|
||||
$images[] = 'img_'.$img;
|
||||
}
|
||||
$divLangImgName = 'img_bmobile';
|
||||
$divLangName = 'img_bmobile¤url';
|
||||
|
||||
$helper = new HelperFormBootstrap();
|
||||
$helper->_select2 = true;
|
||||
@ -87,6 +89,26 @@ class AdminAntPromobanner extends AdminTab
|
||||
$html.= $helper->generateInput($input);
|
||||
$html.= '<div class="clearfix"></div>';
|
||||
|
||||
$urldefaults = array(
|
||||
2 => Configuration::get('ANT_PROMO_BANNERURL_2'),
|
||||
3 => Configuration::get('ANT_PROMO_BANNERURL_3')
|
||||
);
|
||||
$input = array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Url :'),
|
||||
'lang' => true,
|
||||
'name' => 'url',
|
||||
'id' => 'url',
|
||||
'required' => true,
|
||||
'help' => "Renseignez l'url sans le http ou https, ex : //www.bebeboutik.com/8737618-boumy",
|
||||
'languages' => $languages,
|
||||
'id_langs' => $divLangName,
|
||||
'link_flag_img' => '../img/l/',
|
||||
'default' => $urldefaults
|
||||
);
|
||||
$html.= $helper->generateInput($input);
|
||||
$html.= '<div class="clearfix"></div>';
|
||||
|
||||
foreach($this->imagelist as $k => $v) {
|
||||
$input = array(
|
||||
'type' => 'uploadImage',
|
||||
@ -99,7 +121,7 @@ class AdminAntPromobanner extends AdminTab
|
||||
'languages' => $languages,
|
||||
'default_language' => 2,
|
||||
'input-class' => '',
|
||||
'id_langs' => $divLangImgName,
|
||||
'id_langs' => $divLangName,
|
||||
'link_flag_img' => '../img/l/',
|
||||
'url_imgs' => __PS_BASE_URI__.'modules/ant_promobanner/img/',
|
||||
'url_to_show' => _PS_ROOT_DIR_.'/modules/ant_promobanner/img/',
|
||||
|
@ -416,6 +416,7 @@ class PrivateSales extends Module {
|
||||
$smarty->assign(array(
|
||||
'path' => __PS_BASE_URI__.'modules/privatesales/',
|
||||
'is_banner_enable' => (int)Configuration::get('ANT_PROMO_BANNER_'.$cookie->id_lang),
|
||||
'is_banner_link' => (!empty(Configuration::get('ANT_PROMO_BANNERURL_'.$cookie->id_lang))?Configuration::get('ANT_PROMO_BANNERURL_'.$cookie->id_lang):false),
|
||||
'banner_url' => __PS_BASE_URI__.'modules/ant_promobanner/img/',
|
||||
'sales' => $sales,
|
||||
'HOOK_PRIVATESALES_LISTING' => Module::hookExec('privatesales_listing', array('sales' => $sales, 'futuresales' => $futuresales)),
|
||||
|
@ -355,6 +355,8 @@ class AdminStatsLogistic extends AdminTab {
|
||||
* 28 Karen
|
||||
* 56 Camille
|
||||
* 58 Camille
|
||||
* 61 Relay1
|
||||
* 66 Relay2
|
||||
*/
|
||||
foreach ($stats as $key => $stat) {
|
||||
if (!isset($stat['id_employee'])) {
|
||||
@ -385,11 +387,12 @@ class AdminStatsLogistic extends AdminTab {
|
||||
$poles[3]['recap']['nb_package'] += $stat['nb_package'];
|
||||
$poles[3]['employee'][] = $stat;
|
||||
break;
|
||||
// case '48':
|
||||
// $poles[4]['recap']['quantity'] += $stat['quantity'];
|
||||
// $poles[4]['recap']['nb_package'] += $stat['nb_package'];
|
||||
// $poles[4]['employee'][] = $stat;
|
||||
// break;
|
||||
case '61':
|
||||
case '66':
|
||||
$poles[4]['recap']['quantity'] += $stat['quantity'];
|
||||
$poles[4]['recap']['nb_package'] += $stat['nb_package'];
|
||||
$poles[4]['employee'][] = $stat;
|
||||
break;
|
||||
case '56':
|
||||
case '58':
|
||||
$poles[5]['recap']['quantity'] += $stat['quantity'];
|
||||
@ -554,12 +557,39 @@ class AdminStatsLogistic extends AdminTab {
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach ($reports as $k => $report) {
|
||||
echo '<tr">
|
||||
$mr_percent_pa = ($report['payment']['mondialrelay'] / $report['payment']['total']) * 100;
|
||||
$mr_percent_pe = ($report['partial']['mondialrelay'] / $report['partial']['total']) * 100;
|
||||
$mr_percent_cea = ($report['pending']['mondialrelay'] / $report['pending']['total']) * 100;
|
||||
echo '<tr>
|
||||
<td>'.$report['name'].'</td>
|
||||
<td>'.date('Y-m-d', strtotime($this->date_stock. ' - '.$k.' days')).'</td>
|
||||
<td>'.$report['payment']['laposte'].' LP / '.$report['payment']['mondialrelay'].' MR / '.$report['payment']['total'].' ('.round(($report['payment']['mondialrealy']/$report['payment']['total']*100),2).'% MR)</td>
|
||||
<td>'.$report['partial']['laposte'].' LP / '.$report['partial']['mondialrelay'].' MR / '.$report['partial']['total'].' ('.round(($report['partial']['mondialrealy']/$report['partial']['total']*100),2).'% MR)</td>
|
||||
<td>'.$report['pending']['laposte'].' LP / '.$report['pending']['mondialrelay'].' MR / '.$report['pending']['total'].' ('.round(($report['pending']['mondialrealy']/$report['pending']['total']*100),2).'% MR)</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="33%">'.$report['payment']['laposte'].' LP </td>
|
||||
<td width="33%">'.$report['payment']['mondialrelay'].' MR </td>
|
||||
<td width="33%"><b>'.$report['payment']['total'].'</b> ('.round($mr_percent_pa,1).'% MR)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="33%">'.$report['partial']['laposte'].' LP </td>
|
||||
<td width="33%">'.$report['partial']['mondialrelay'].' MR </td>
|
||||
<td width="33%"><b>'.$report['partial']['total'].'</b> ('.round($mr_percent_pe,1).'% MR)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="33%">'.$report['pending']['laposte'].' LP </td>
|
||||
<td width="33%">'.$report['pending']['mondialrelay'].' MR </td>
|
||||
<td width="33%"><b>'.$report['pending']['total'].'</b> ('.round($mr_percent_cea,1).'% MR)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '<tbody>
|
||||
|
@ -192,9 +192,9 @@
|
||||
onclick="window.location.href='{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}';"
|
||||
{/if}>
|
||||
{*<a href="{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}"><img class="background" alt="{$sale->title[$cookie->id_lang]}" src="{$path}img/{$sale->id}/liston_{$cookie->id_lang}.jpg" /></a>*}
|
||||
|
||||
{if $sale->id!=7639}
|
||||
{include file="./themes/site/delay.tpl" delivery_delay=$sale->delivery_delay}
|
||||
|
||||
{/if}
|
||||
<div class="short_desc">
|
||||
<h3>{$sale->title[$cookie->id_lang]}</h3>
|
||||
{if isset($extrafields[$sale->id])}
|
||||
@ -277,9 +277,9 @@
|
||||
{$sale->description[$cookie->id_lang]|escape:'htmlall':'UTF-8'}
|
||||
<div class="date">{l s='From' mod='privatesales'} {$sale->date_start|date_format:'%A %e %b %H:%M'} {l s='To' mod='privatesales'} {$sale->date_end|date_format:'%A %e %b %H:%M'}</div>
|
||||
</div>*}
|
||||
|
||||
{if $sale->id!=7639}
|
||||
{include file="./themes/site/delay.tpl" delivery_delay=$sale->delivery_delay}
|
||||
|
||||
{/if}
|
||||
<div class="short_desc">
|
||||
<h3>{$sale->title[$cookie->id_lang]}</h3>
|
||||
{if isset($extrafields[$sale->id])}
|
||||
|
@ -5,7 +5,7 @@
|
||||
{if !$cookie->isLogged() AND !$showtoguests}
|
||||
{literal}
|
||||
$('document').ready(function(){
|
||||
$('#block_sales_home a.img_link, a.enter').unbind('click').removeAttr('href').click(function(){
|
||||
$('#block_sales_home a.img_link, a.enter, .ant_promo_banner_img').unbind('click').removeAttr('href').click(function(){
|
||||
$('.modalbox_shadow').fadeIn(100);
|
||||
$('.modalbox_login').fadeIn(250);
|
||||
});
|
||||
@ -73,7 +73,7 @@
|
||||
<div id="block_sales_home">
|
||||
<div class="content clearfix">
|
||||
{if $is_banner_enable}
|
||||
<img class="ant_promo_banner_img" src="{$banner_url}img_bmobile_{$cookie->id_lang}.jpg"/>
|
||||
<img onclick="{if $is_banner_link && ($cookie->isLogged() OR $showtoguests)}window.location.href='{$is_banner_link|escape:'htmlall':'UTF-8'}';{/if}" class="ant_promo_banner_img" src="{$banner_url}img_bmobile_{$cookie->id_lang}.jpg" {if $is_banner_link} style="cursor:pointer;" {/if}/>
|
||||
{/if}
|
||||
|
||||
{if count($sales) > 0}
|
||||
@ -83,7 +83,9 @@
|
||||
{if count(array_intersect($customer_groups, $sale->groups))>0}
|
||||
<li onclick="{if $cookie->isLogged() OR $showtoguests}window.location.href='{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}';{/if}">
|
||||
|
||||
{if $sale->id!=7639}
|
||||
{include file="./themes/site_mobile/delay.tpl" delivery_delay=$sale->delivery_delay}
|
||||
{/if}
|
||||
<a href="{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}" class="img_link"><img class="background" alt="{$sale->title[$cookie->id_lang]}" src="{$path}img/{$sale->id}/liston_{$cookie->id_lang}.jpg" /></a>
|
||||
<div class="links">
|
||||
<div class="short_desc">
|
||||
|
Loading…
Reference in New Issue
Block a user