Merge branch 'ticket-13661-mobileReturn' into develop
This commit is contained in:
commit
05c988412b
@ -148,6 +148,14 @@ form label{
|
||||
.panel-title h2 small {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.heading-title {
|
||||
margin: 5px 0 20px;
|
||||
display: block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
color: #504d8b;
|
||||
}
|
||||
.navbar-right {margin-right:-5px;}
|
||||
.panel-toolbox>li>a {
|
||||
cursor: pointer;
|
||||
|
@ -223,20 +223,20 @@ class AdminInvoices extends AdminTab
|
||||
<td align="center"><p style="padding:0px;color: #565485;font-size:12px;">'. $date->format('Y-m-d') .'</p></td>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=lp&token='.$this->token.'">
|
||||
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=lp&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to').'">
|
||||
<span class="text-yellow anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||
</a>
|
||||
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=mr&token='.$this->token.'">
|
||||
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printM1=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=mr&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to').'">
|
||||
<span class="text-red-light anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center"><input id="multi_'. $sale['id_sale'].'" type="checkbox" name="multi2[]" value="'.$sale['id_sale'].'" '.(in_array((int)$sale['id_sale'], $id_sales)?'checked':'').'/></td>
|
||||
<td align="center"><input id="multi_plus_'. $sale['id_sale'].'" type="checkbox" name="multiPlus[]" value="'.$sale['id_sale'].'"/></td>
|
||||
<td align="center">
|
||||
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=lp&token='.$this->token.'">
|
||||
<a title="Facture - La Poste" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=lp&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to').'">
|
||||
<span class="text-yellow anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||
</a>
|
||||
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=mr&token='.$this->token.'">
|
||||
<a title="Facture - Mondial Relay" onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&gift=1&carrier=mr&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to').'">
|
||||
<span class="text-red-light anticon anticon-file-pdf" style="cursor:pointer;"></span>
|
||||
</a>
|
||||
</td>
|
||||
@ -416,6 +416,10 @@ class AdminInvoices extends AdminTab
|
||||
return false;
|
||||
});
|
||||
|
||||
if($(".alert-custom").length){
|
||||
setTimeout(function(){$(".alert-custom").slideUp();}, 4000);
|
||||
}
|
||||
|
||||
</script>';
|
||||
|
||||
return parent::displayForm();
|
||||
@ -527,6 +531,21 @@ class AdminInvoices extends AdminTab
|
||||
|
||||
public function display()
|
||||
{
|
||||
if(Tools::getIsset('noSaleFound') && Tools::getValue('date_from') && Tools::getValue('date_to')) {
|
||||
HelperFormBootstrap::displayErrors($this->l('No invoice found for this sale'));
|
||||
|
||||
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
||||
if (!Validate::isDate(Tools::getValue('date_from')))
|
||||
$this->_errors[] = $this->l('Invalid from date');
|
||||
if (!Validate::isDate(Tools::getValue('date_to')))
|
||||
$this->_errors[] = $this->l('Invalid end date');
|
||||
|
||||
$statuts = array(17, Configuration::get('PS_OS_PAYMENT'));
|
||||
$sales = Sale::getSalesByDateBis($statuts, Tools::getValue('date_from'), Tools::getValue('date_to'));
|
||||
if($sales) {
|
||||
$this->print_sales = $sales;
|
||||
}
|
||||
}
|
||||
$this->displayForm();
|
||||
$this->displayOptionsList();
|
||||
}
|
||||
@ -625,7 +644,7 @@ class AdminInvoices extends AdminTab
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_errors[] = $this->l('No invoice found for this sale');
|
||||
Tools::redirectAdmin('index.php?tab=AdminInvoices&noSaleFound=1&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to'));
|
||||
}
|
||||
// print M1
|
||||
elseif (Tools::getValue('printM1') == 1)
|
||||
@ -643,7 +662,7 @@ class AdminInvoices extends AdminTab
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_errors[] = $this->l('No invoice found for this sale');
|
||||
Tools::redirectAdmin('index.php?tab=AdminInvoices&noSaleFound=1&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to'));
|
||||
}
|
||||
// print M2
|
||||
elseif (Tools::getValue('printM2') == 1)
|
||||
@ -670,7 +689,7 @@ class AdminInvoices extends AdminTab
|
||||
if(sizeof($orders)) {
|
||||
Tools::redirectAdmin('pdf.php?privatesalesM2Bis&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
|
||||
}
|
||||
$this->_errors[] = $this->l('No invoice found for these sales');
|
||||
Tools::redirectAdmin('index.php?tab=AdminInvoices&noSaleFound=1&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to'));
|
||||
}
|
||||
}
|
||||
// print multi (M2+)
|
||||
@ -693,7 +712,7 @@ class AdminInvoices extends AdminTab
|
||||
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&carrier='.$carrier.'&token='.$this->token);
|
||||
}
|
||||
}
|
||||
$this->_errors[] = $this->l('No invoice found for these sales');
|
||||
Tools::redirectAdmin('index.php?tab=AdminInvoices&noSaleFound=1&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to'));
|
||||
}
|
||||
}
|
||||
// print multi with same brand
|
||||
@ -714,7 +733,7 @@ class AdminInvoices extends AdminTab
|
||||
Tools::redirectAdmin('pdf.php?privatesalesM2Plus&id_sale='.implode(',', $id_sales) .'&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&carrier='.$carrier.'&token='.$this->token);
|
||||
}
|
||||
}
|
||||
$this->_errors[] = $this->l('No invoice found for these sales');
|
||||
Tools::redirectAdmin('index.php?tab=AdminInvoices&noSaleFound=1&token='.$this->token.'&date_from='.Tools::getValue('date_from').'&date_to='.Tools::getValue('date_to'));
|
||||
}
|
||||
}
|
||||
// print M3
|
||||
|
@ -517,7 +517,7 @@ class AdminAntConfigurations extends AdminTab
|
||||
$nb_credits = $this->getNbOrderToUpdate();
|
||||
$helperForm->_forms[] = array(
|
||||
'action' => $base_link,
|
||||
'title' => $this->l('Section Antadis'),
|
||||
'title' => '<img src="../img/admin/logo_antadis.jpg" width="30px"/> '.$this->l('Section Antadis'),
|
||||
'class' => 'form-horizontal',
|
||||
'class_div' => 'col-md-12',
|
||||
'sections' => array(
|
||||
|
@ -1836,7 +1836,7 @@ class AdminBulkUpdate extends AdminTab {
|
||||
$output .= '<p class="conf">'.$this->l('Export complete.').' <a onclick="window.open(this.href); return false;" href="http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/bulkupdate/'.$fname.'">'.$this->l('Click here to download the file').'</a></p>';
|
||||
}
|
||||
} elseif(Tools::isSubmit('submitExportProducts')) {
|
||||
HelperFormBootstrap::displayWarning($this->l('En cours de developpement...'));
|
||||
HelperFormBootstrap::displaySuccess('<p>'.$this->l('Export complete.').' <a onclick="window.open(this.href); return false;" href="http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/bulkupdate/base/base_produits.csv.zip">'.$this->l('Click here to download the file').'</a></p>');
|
||||
} elseif(Tools::isSubmit('submitExportPositions')) {
|
||||
set_time_limit(300);
|
||||
if($id_category = (int) Tools::getValue('category')) {
|
||||
@ -1953,8 +1953,8 @@ class AdminBulkUpdate extends AdminTab {
|
||||
// Categories
|
||||
$output .= '<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2>Mise à jour groupée</h2>
|
||||
<div class="panel">
|
||||
<h2 class="heading-title"><span class="anticon anticon-cog"></span> '.$this->l('Mises à jour groupées').'</h2>
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#categories" aria-controls="categories" role="tab" data-toggle="tab"><span class="text-rose anticon anticon-tree"></span> '.$this->l('Categories').'</a>
|
||||
@ -2305,8 +2305,8 @@ class AdminBulkUpdate extends AdminTab {
|
||||
// Sale Export
|
||||
$output .= '
|
||||
<div class="col-md-12">
|
||||
<h2>Exports</h2>
|
||||
<div class="panel">
|
||||
<h2 class="heading-title"><span class="anticon anticon-upload2"></span> '.$this->l('Exports').'</h2>
|
||||
<ul class="nav nav-tabs nav-justified">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#exportSales" aria-controls="exportSales" role="tab" data-toggle="tab"><span class="text-rose anticon anticon-upload"></span> '.$this->l('Export Ventes').'</a>
|
||||
@ -2448,23 +2448,26 @@ class AdminBulkUpdate extends AdminTab {
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
// Export Products
|
||||
// Export Products
|
||||
$isFileProductsExist = false;
|
||||
if(is_file(dirname(__FILE__).'/base/base_produits.csv.zip')) {
|
||||
$isFileProductsExist = true;
|
||||
}
|
||||
$output .= '
|
||||
<div role="tabpanel" class="tab-pane" id="exportProducts">
|
||||
<div class="panel-content">
|
||||
<h3 class="">'.$this->l('Export Base Produit').'</h3>
|
||||
<br>
|
||||
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" enctype="multipart/form-data">
|
||||
<div class="col-md-5 col-md-offset-4">
|
||||
<p class="text-center">'.$this->l('En cours de developpement...').'</p>
|
||||
<p class="text-center">'.$this->l('Export de la base produit totale générée toutes les semaines.').'</p>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="ln_solid"></div>
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="btn btn-primary" name="submitExportProducts">'.$this->l('Exporter').'</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="col-md-5 col-md-offset-4">
|
||||
<p class="text-center">'.$this->l('Export de la base produit totale généré toutes les semaines.').'</p>'
|
||||
.($isFileProductsExist?
|
||||
'<p class="text-center">
|
||||
<a onclick="window.open(this.href); return false;" href="http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/bulkupdate/base/base_produits.csv.zip">'.$this->l('Click here to download the file').'</a>
|
||||
</p>'
|
||||
:'<p class="text-center">'.$this->l('Pas de fichier trouvé !').'</p>'
|
||||
).'
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -6,5 +6,8 @@ $_SERVER['HTTP_HOST'] = 'www.bebeboutik.com';
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
|
||||
foreach(glob(dirname(__FILE__).'/*.csv') as $filename) {
|
||||
if($filename == 'base_produit.csv'){
|
||||
continue;
|
||||
}
|
||||
unlink($filename);
|
||||
}
|
@ -99,8 +99,30 @@ class ProductController extends ProductControllerCore {
|
||||
$this->product->description_comment = str_replace('http://www.bebeboutik.','//www.bebeboutik.',$this->product->description_comment);
|
||||
}
|
||||
|
||||
|
||||
$back_category = false;
|
||||
$link_back = false;
|
||||
if (isset($_SERVER['HTTP_REFERER'])) {
|
||||
$referer = explode('?', $_SERVER['HTTP_REFERER']);
|
||||
if(is_array($referer) && count($referer)>1) {
|
||||
$link_back = $referer[0];
|
||||
} else {
|
||||
$url = explode('/', $_SERVER['HTTP_REFERER']);
|
||||
if (count($url) > 3 && count($url) < 5) {
|
||||
$url = explode('-', end($url));
|
||||
$back_category = (int)$url[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
if($back_category==0){
|
||||
$link = new Link();
|
||||
$link_back = $link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang]);
|
||||
}
|
||||
|
||||
self::$smarty->assign(array(
|
||||
'bestSaleCart' => $bestSaleCart,
|
||||
'back_category' => $back_category,
|
||||
'link_back' => $link_back,
|
||||
'product' => $this->product,
|
||||
'is_random' => $is_random,
|
||||
'coverImage' => Product::getCover($this->product->id),
|
||||
|
@ -100,14 +100,11 @@ var oneQuantityAvailableSentence = '{l s='Warning: 1 item in stock!' js=1}';
|
||||
|
||||
<div class="product_title">
|
||||
<h1 class="title sale_title">
|
||||
<span class="gradient">
|
||||
<a href="javascript:history.back()" class="button_small back" title="{l s='Back'}">{l s='Back'}</a>
|
||||
</span>
|
||||
{* {if isset($smarty.server.HTTP_REFERER) && preg_replace('#^https?://[^/]+/#', '/', $smarty.server.HTTP_REFERER) != $request_uri}
|
||||
{if isset($smarty.server.HTTP_REFERER) && preg_replace('#^https?://[^/]+/#', '/', $smarty.server.HTTP_REFERER) != $request_uri}
|
||||
<span class="gradient">
|
||||
<a href="{$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}" class="button_small back" title="{l s='Back'}">{l s='Back'}</a>
|
||||
<a href="{if $back_category>0}javascript:history.back(){else}{$link_back|escape:'htmlall':'UTF-8'}{/if}" class="button_small back" title="{l s='Back'}">{l s='Back'}</a>
|
||||
</span>
|
||||
{/if} *}
|
||||
{/if}
|
||||
<span>{$product->name|truncate:30:'...':true:false}</span>
|
||||
</h1>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user