fix conflict braderie
This commit is contained in:
commit
9a576cd82d
@ -1692,12 +1692,6 @@ class AdminProducts extends AdminTab
|
|||||||
if ($this->delete)
|
if ($this->delete)
|
||||||
echo '<p><input type="submit" class="button" name="submitDel'.$this->table.'" value="'.$this->l('Delete selection').'" onclick="return confirm(\''.$this->l('Delete selected items?', __CLASS__, TRUE, FALSE).'\');" /></p>';
|
echo '<p><input type="submit" class="button" name="submitDel'.$this->table.'" value="'.$this->l('Delete selection').'" onclick="return confirm(\''.$this->l('Delete selected items?', __CLASS__, TRUE, FALSE).'\');" /></p>';
|
||||||
|
|
||||||
if((int)$this->_category->id_parent == 1){
|
|
||||||
echo '<hr>';
|
|
||||||
echo '<h2>Ordonner les produits</h2>';
|
|
||||||
echo '<p><input type="submit" class="button" name="reorder'.$this->table.'" value="'.$this->l('Order products').'" /></p>';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '<hr>';
|
echo '<hr>';
|
||||||
$languages = Language::getLanguages(FALSE);
|
$languages = Language::getLanguages(FALSE);
|
||||||
|
|
||||||
@ -1817,6 +1811,13 @@ class AdminProducts extends AdminTab
|
|||||||
</form>';
|
</form>';
|
||||||
if (isset($this->_includeTab) AND sizeof($this->_includeTab))
|
if (isset($this->_includeTab) AND sizeof($this->_includeTab))
|
||||||
echo '<br /><br />';
|
echo '<br /><br />';
|
||||||
|
|
||||||
|
if((int)$this->_category->id_parent == 1){
|
||||||
|
echo '<hr>';
|
||||||
|
echo '<h2>Ordonner les produits</h2>';
|
||||||
|
echo '<p><input type="submit" class="button" name="reorder'.$this->table.'" value="'.$this->l('Order products').'" /></p>';
|
||||||
|
echo '<br /><br />';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,8 +157,8 @@ if (!defined('_PS_CACHE_ENABLED_'))
|
|||||||
|
|
||||||
/* Consumable */
|
/* Consumable */
|
||||||
if (!defined('_SHOP_CATEGORYROOT'))
|
if (!defined('_SHOP_CATEGORYROOT'))
|
||||||
define('_SHOP_CATEGORYROOT', 8711761);
|
define('_SHOP_CATEGORYROOT', 8720307);
|
||||||
if (!defined('_SHOP_CATEGORYENABLED'))
|
if (!defined('_SHOP_CATEGORYENABLED'))
|
||||||
define('_SHOP_CATEGORYENABLED', 1);
|
define('_SHOP_CATEGORYENABLED', 1);
|
||||||
if (!defined('_SHOP_PRIVATESALES_CONSUMABLE'))
|
if (!defined('_SHOP_PRIVATESALES_CONSUMABLE'))
|
||||||
define('_SHOP_PRIVATESALES_CONSUMABLE', 3963);
|
define('_SHOP_PRIVATESALES_CONSUMABLE', 5158);
|
||||||
|
@ -120,7 +120,8 @@ class AdminBraderie extends AdminTab
|
|||||||
$("#hidden_attribute_id").val(0);
|
$("#hidden_attribute_id").val(0);
|
||||||
}
|
}
|
||||||
$("#hidden_product_id").val($product_id);
|
$("#hidden_product_id").val($product_id);
|
||||||
$("#error").empty()
|
$("#error").empty();
|
||||||
|
$("#input_storage").focus();
|
||||||
},
|
},
|
||||||
error: function(xhr) {
|
error: function(xhr) {
|
||||||
$("#ean_from_product").empty();
|
$("#ean_from_product").empty();
|
||||||
@ -145,6 +146,52 @@ class AdminBraderie extends AdminTab
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#input_storage").change(function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
if ($product_id == undefined || $product_id == 0) {
|
||||||
|
$("#error").empty().append("'.$this->l('Aucun produit n\'a été trouvé. Vérifier le code EAN').'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var emplacement = $("#input_storage").val();
|
||||||
|
|
||||||
|
if (emplacement.length == 0 || emplacement>205) {
|
||||||
|
$("#error").empty().append("'.$this->l('L\'emplacement n\'est pas renseigné ou est mal renseigné').'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($("#input_quantity").val().length == 0) {
|
||||||
|
$("#error").empty().append("'.$this->l('La quantité n\'est pas renseignée').'");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#hidden_product_id").val($product_id);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: \'POST\',
|
||||||
|
url: \''._MODULE_DIR_.'braderie/ajax.php?action=addToSellout'.'\',
|
||||||
|
dataType: \'json\',
|
||||||
|
data: {
|
||||||
|
parent_category: $("#sale").val(),
|
||||||
|
category: $("#category").val(),
|
||||||
|
storage: $("#input_storage").val(),
|
||||||
|
product: $("#hidden_product_id").val(),
|
||||||
|
quantity: $("#input_quantity").val(),
|
||||||
|
attribute: $("#hidden_attribute_id").val()
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
$("#error").empty().append(response);
|
||||||
|
$("#input_ean, #input_storage").val("");
|
||||||
|
$("#ean_from_product").empty();
|
||||||
|
$("#input_ean").focus();
|
||||||
|
},
|
||||||
|
error: function(xhr) {
|
||||||
|
$("#error").empty().append(JSON.parse(xhr.responseText));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
$("#add_button").click(function(event) {
|
$("#add_button").click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if ($product_id == undefined || $product_id == 0) {
|
if ($product_id == undefined || $product_id == 0) {
|
||||||
|
@ -20,7 +20,7 @@ class AdminLabelGenerate extends AdminTab {
|
|||||||
$barcode = new GenerateBarcode();
|
$barcode = new GenerateBarcode();
|
||||||
$barcode->createRackFolder();
|
$barcode->createRackFolder();
|
||||||
$rackCodes = array();
|
$rackCodes = array();
|
||||||
for ($i=1;$i<21;$i++) {
|
for ($i=0;$i<21;$i++) {
|
||||||
for ($j=1;$j<6;$j++) {
|
for ($j=1;$j<6;$j++) {
|
||||||
$name = $i.$j;
|
$name = $i.$j;
|
||||||
$barcode->generateRack($name);
|
$barcode->generateRack($name);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
include_once(_PS_ROOT_DIR_.'/modules/privatesales/Sale.php');
|
include_once(_PS_ROOT_DIR_.'/modules/privatesales/Sale.php');
|
||||||
|
|
||||||
class AdminPrivateSalesSales extends AdminTab {
|
class AdminPrivateSalesSales extends AdminTab {
|
||||||
|
|
||||||
private $imagelist;
|
private $imagelist;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
@ -232,7 +231,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
|
||||||
echo '<label>'.$this->l('Public sale:').'</label>
|
echo '<label>'.$this->l('Public sale:').'</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
@ -242,7 +241,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
echo '<label>'.$this->l('Braderie :').'</label>
|
echo '<label>'.$this->l('Braderie :').'</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<div id="public" style="float: left;">
|
<div id="public" style="float: left;">
|
||||||
@ -273,10 +272,10 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
|
|
||||||
echo '<label>'.$this->l('Nouveau :').'</label>
|
echo '<label>'.$this->l('Nouveau :').'</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<div id="new" style="float: left;">
|
<div id="new" style="float: left;">
|
||||||
<input name="new" type="radio" value="0"'.($this->cursale!==NULL? ($this->cursale->new==0? ' checked="checked"': ''):' checked="checked"').' /> '.$this->l('Non').' <input name="new" type="radio" value="1"'.($this->cursale!==NULL && $this->cursale->new==1?' checked="checked"': '').' /> '.$this->l('Oui').'
|
<input name="new" type="radio" value="0"'.($this->cursale!==NULL? ($this->cursale->new==0? ' checked="checked"': ''):' checked="checked"').' /> '.$this->l('Non').' <input name="new" type="radio" value="1"'.($this->cursale!==NULL && $this->cursale->new==1?' checked="checked"': '').' /> '.$this->l('Oui').'
|
||||||
<sup> *</sup>
|
<sup> *</sup>
|
||||||
</div>
|
</div>
|
||||||
@ -286,7 +285,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
|
|
||||||
echo '<label>'.$this->l('Mise en avant newsletter :').'</label>
|
echo '<label>'.$this->l('Mise en avant newsletter :').'</label>
|
||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<div id="forward_news" style="float: left;">
|
<div id="forward_news" style="float: left;">
|
||||||
<input name="forward_news" type="radio" value="0"'.($this->cursale!==NULL? ($this->cursale->forward_news==0? ' checked="checked"': ''):' checked="checked"').' /> '.$this->l('Non').' <input name="forward_news" type="radio" value="1"'.($this->cursale!==NULL && $this->cursale->forward_news==1?' checked="checked"': '').' /> '.$this->l('Oui').'
|
<input name="forward_news" type="radio" value="0"'.($this->cursale!==NULL? ($this->cursale->forward_news==0? ' checked="checked"': ''):' checked="checked"').' /> '.$this->l('Non').' <input name="forward_news" type="radio" value="1"'.($this->cursale!==NULL && $this->cursale->forward_news==1?' checked="checked"': '').' /> '.$this->l('Oui').'
|
||||||
<sup> *</sup>
|
<sup> *</sup>
|
||||||
</div>
|
</div>
|
||||||
@ -428,19 +427,19 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
|
|
||||||
// echo '<label>'.$this->l('Sale type:').'</label>
|
// echo '<label>'.$this->l('Sale type:').'</label>
|
||||||
// <div class="margin-form">
|
// <div class="margin-form">
|
||||||
// <div id="carriers" style="float: left;">
|
// <div id="carriers" style="float: left;">
|
||||||
// '.$this->l('SALETYPE1').' <input '. (isset($this->cursale->sale_type) && in_array(1,$this->cursale->sale_type) ? ' checked': '') .' type="checkbox" name="sale_type[]" value="1">
|
// '.$this->l('SALETYPE1').' <input '. (isset($this->cursale->sale_type) && in_array(1,$this->cursale->sale_type) ? ' checked': '') .' type="checkbox" name="sale_type[]" value="1">
|
||||||
// '.$this->l('SALETYPE2').' <input '. (isset($this->cursale->sale_type) && in_array(2,$this->cursale->sale_type) ? ' checked': '') .' type="checkbox" name="sale_type[]" value="2">
|
// '.$this->l('SALETYPE2').' <input '. (isset($this->cursale->sale_type) && in_array(2,$this->cursale->sale_type) ? ' checked': '') .' type="checkbox" name="sale_type[]" value="2">
|
||||||
// '.$this->l('SALETYPE3').' <input '. (isset($this->cursale->sale_type) && in_array(3,$this->cursale->sale_type) ? ' checked': '') .' type="checkbox" name="sale_type[]" value="3">
|
// '.$this->l('SALETYPE3').' <input '. (isset($this->cursale->sale_type) && in_array(3,$this->cursale->sale_type) ? ' checked': '') .' type="checkbox" name="sale_type[]" value="3">
|
||||||
// </div>
|
// </div>
|
||||||
// </div>';
|
// </div>';
|
||||||
|
|
||||||
echo '<label>'.$this->l('Description:').'</label>
|
echo '<label>'.$this->l('Description:').'</label>
|
||||||
<div class="margin-form">';
|
<div class="margin-form">';
|
||||||
foreach($this->_languages as $language) {
|
foreach($this->_languages as $language) {
|
||||||
echo '<div id="description_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
|
echo '<div id="description_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
|
||||||
<textarea style="width: 500px; height: 150px;" name="description_'.$language['id_lang'].'">';
|
<textarea style="width: 500px; height: 150px;" name="description_'.$language['id_lang'].'">';
|
||||||
if($this->cursale !== NULL) {
|
if($this->cursale !== NULL) {
|
||||||
echo htmlentities($this->cursale->description[$language['id_lang']]);
|
echo htmlentities($this->cursale->description[$language['id_lang']]);
|
||||||
// echo htmlentities(utf8_decode($this->cursale->description[$language['id_lang']]));
|
// echo htmlentities(utf8_decode($this->cursale->description[$language['id_lang']]));
|
||||||
}
|
}
|
||||||
@ -480,7 +479,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
echo '<div class="clear"></div>
|
echo '<div class="clear"></div>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
Module::hookExec('privatesales_edit', array('sale' => $this->cursale));
|
Module::hookExec('privatesales_edit', array('sale' => $this->cursale));
|
||||||
|
|
||||||
echo '<br class="clear" />
|
echo '<br class="clear" />
|
||||||
@ -498,14 +497,14 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
global $cookie, $currentIndex;
|
global $cookie, $currentIndex;
|
||||||
$this->cursale = NULL;
|
$this->cursale = NULL;
|
||||||
if($id = Tools::getValue('id')) {
|
if($id = Tools::getValue('id')) {
|
||||||
$this->cursale = new Sale($id);
|
$this->cursale = new Sale($id);
|
||||||
if($this->cursale->id === NULL) {
|
if($this->cursale->id === NULL) {
|
||||||
Tools::redirectAdmin($currentIndex.'&token='.Tools::getAdminTokenLite('AdminPrivateSalesSales'));
|
Tools::redirectAdmin($currentIndex.'&token='.Tools::getAdminTokenLite('AdminPrivateSalesSales'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// // ANTADIS INSERT TYPE
|
// // ANTADIS INSERT TYPE
|
||||||
// $ventes = Sale::getSales(NULL, NULL, NULL, NULL , FALSE, FALSE, 'position ASC');
|
// $ventes = Sale::getSales(NULL, NULL, NULL, NULL , FALSE, FALSE, 'position ASC');
|
||||||
// foreach ($ventes as $key => $vente) {
|
// foreach ($ventes as $key => $vente) {
|
||||||
// global $cookie;
|
// global $cookie;
|
||||||
// if($cookie->id_employee == 1){
|
// if($cookie->id_employee == 1){
|
||||||
@ -515,7 +514,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
// ), 'INSERT');
|
// ), 'INSERT');
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$this->displayForm();
|
$this->displayForm();
|
||||||
|
|
||||||
$export = Module::isInstalled('exports');
|
$export = Module::isInstalled('exports');
|
||||||
@ -527,7 +526,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
') as $row) {
|
') as $row) {
|
||||||
$employees[(int) $row['id_employee']] = $row['firstname'].' '.$row['lastname'];
|
$employees[(int) $row['id_employee']] = $row['firstname'].' '.$row['lastname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//ANTADIS
|
//ANTADIS
|
||||||
echo '<fieldset style="margin-top:15px">';
|
echo '<fieldset style="margin-top:15px">';
|
||||||
echo '<legend>Tri des ventes</legend>';
|
echo '<legend>Tri des ventes</legend>';
|
||||||
@ -535,7 +534,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
echo '<input type="submit" value="Ventes terminées" name="finished" class="tri button">';
|
echo '<input type="submit" value="Ventes terminées" name="finished" class="tri button">';
|
||||||
echo '<input type="submit" value="Toutes les ventes" name="all" class="tri button">';
|
echo '<input type="submit" value="Toutes les ventes" name="all" class="tri button">';
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
jQuery( document ).ready(function( $ ) {
|
jQuery( document ).ready(function( $ ) {
|
||||||
@ -547,10 +546,10 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
button.removeClass('active');
|
button.removeClass('active');
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
$('.list_vente').empty();
|
$('.list_vente').empty();
|
||||||
|
|
||||||
var loader = "<p class='text-align:center'><img src='../img/loader.gif' /></p>";
|
var loader = "<p class='text-align:center'><img src='../img/loader.gif' /></p>";
|
||||||
$('.list_vente').html(loader);
|
$('.list_vente').html(loader);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "ajax_vp.php",
|
url: "ajax_vp.php",
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@ -564,10 +563,10 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(".updatePosition").live( "click", function(e) {
|
$(".updatePosition").live( "click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var position = $(this).attr('data-position');
|
var position = $(this).attr('data-position');
|
||||||
var way = $(this).attr('data-way');
|
var way = $(this).attr('data-way');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "ajax_vp.php",
|
url: "ajax_vp.php",
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
@ -582,7 +581,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
$('.list_vente').empty();
|
$('.list_vente').empty();
|
||||||
$('.list_vente').html(html);
|
$('.list_vente').html(html);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -676,8 +675,8 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
$ids[] = $sale->id;
|
$ids[] = $sale->id;
|
||||||
}
|
}
|
||||||
$extrafields = PrivateSales_ExtraFields::getFieldsForSale($ids);
|
$extrafields = PrivateSales_ExtraFields::getFieldsForSale($ids);
|
||||||
|
|
||||||
foreach($sales as $key => $sale) {
|
foreach($sales as $key => $sale) {
|
||||||
echo '<tr id="item_'.$sale->id. '" class="sale_'.($key%2).'">
|
echo '<tr id="item_'.$sale->id. '" class="sale_'.($key%2).'">
|
||||||
<td>'.$sale->id.'</td>
|
<td>'.$sale->id.'</td>
|
||||||
<td><strong>'.$sale->title[intval($cookie->id_lang)].'</strong><br/><span style="color:#666; font-style:italic">'.$extrafields[$sale->id][1].'</span></td>
|
<td><strong>'.$sale->title[intval($cookie->id_lang)].'</strong><br/><span style="color:#666; font-style:italic">'.$extrafields[$sale->id][1].'</span></td>
|
||||||
@ -695,7 +694,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
else if($sale->new == 3){
|
else if($sale->new == 3){
|
||||||
echo "<td>".$this->l('Non défini')."</td>";
|
echo "<td>".$this->l('Non défini')."</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<td>'.((int) $sale->id_employee != 0? $employees[(int) $sale->id_employee]: '--').'</td>
|
echo '<td>'.((int) $sale->id_employee != 0? $employees[(int) $sale->id_employee]: '--').'</td>
|
||||||
<td '.(in_array('fr', $sale->versions) ? 'class="green"' : 'class="red"').'>FR</td>
|
<td '.(in_array('fr', $sale->versions) ? 'class="green"' : 'class="red"').'>FR</td>
|
||||||
<td '.(in_array('es', $sale->versions) ? 'class="green"' : 'class="red"').'>ES</td>
|
<td '.(in_array('es', $sale->versions) ? 'class="green"' : 'class="red"').'>ES</td>
|
||||||
@ -709,12 +708,12 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
if($key + 1 != count($sales)){
|
if($key + 1 != count($sales)){
|
||||||
echo '<a href="" class="updatePosition" data-way="1" data-position='. $sale->position .'><img title="Bas" alt="Bas" src="../img/admin/down.gif"></a>';
|
echo '<a href="" class="updatePosition" data-way="1" data-position='. $sale->position .'><img title="Bas" alt="Bas" src="../img/admin/down.gif"></a>';
|
||||||
}
|
}
|
||||||
$category_link = Link::getCategoryLink($sale->id_category);
|
$category_link = Link::getCategoryLink($sale->id_category);
|
||||||
echo '</td>
|
echo '</td>
|
||||||
<td>
|
<td>
|
||||||
'.($export? '<a onclick="window.open(this.href); return false;" href="'.__PS_BASE_URI__.'modules/exports/exports/privatesales.php?id_sale='.$sale->id.'&adtoken='.Tools::encrypt('PrivateSalesDirectExtract'.$sale->id).'"><img style="cursor: pointer;" title="Exporter cette vente" alt="" src="../img/admin/export.gif"></a>': '').'
|
'.($export? '<a onclick="window.open(this.href); return false;" href="'.__PS_BASE_URI__.'modules/exports/exports/privatesales.php?id_sale='.$sale->id.'&adtoken='.Tools::encrypt('PrivateSalesDirectExtract'.$sale->id).'"><img style="cursor: pointer;" title="Exporter cette vente" alt="" src="../img/admin/export.gif"></a>': '').'
|
||||||
<img style="cursor: pointer;" onclick="itemEdition('.$sale->id.')" title="Éditer cette vente" alt="" src="../img/admin/edit.gif">
|
<img style="cursor: pointer;" onclick="itemEdition('.$sale->id.')" title="Éditer cette vente" alt="" src="../img/admin/edit.gif">
|
||||||
<img style="cursor: pointer;" onclick="itemDeletion('.$sale->id.')" title="Supprimer cette vente" alt="" src="../img/admin/delete.gif">
|
<img style="cursor: pointer;" onclick="itemDeletion('.$sale->id.')" title="Supprimer cette vente" alt="" src="../img/admin/delete.gif">
|
||||||
<a href="'.$category_link.'" target="_blank">
|
<a href="'.$category_link.'" target="_blank">
|
||||||
<img style="cursor: pointer;" title="Voir cette vente" alt="" src="../img/admin/details.gif">
|
<img style="cursor: pointer;" title="Voir cette vente" alt="" src="../img/admin/details.gif">
|
||||||
</a>
|
</a>
|
||||||
@ -754,7 +753,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
if (Sale::getSaleFromCategory(Tools::getValue('id_category'))) {
|
if (Sale::getSaleFromCategory(Tools::getValue('id_category'))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_position = 'SELECT MAX(position) FROM '. _DB_PREFIX_.'privatesale';
|
$sql_position = 'SELECT MAX(position) FROM '. _DB_PREFIX_.'privatesale';
|
||||||
$position = Db::getInstance()->getValue($sql_position);
|
$position = Db::getInstance()->getValue($sql_position);
|
||||||
|
|
||||||
@ -777,7 +776,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
foreach(Tools::getValue('sale_type', array()) as $sale_type) {
|
foreach(Tools::getValue('sale_type', array()) as $sale_type) {
|
||||||
$sale->sale_type[] = (int) $sale_type;
|
$sale->sale_type[] = (int) $sale_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(Language::getLanguages(FALSE) as $language) {
|
foreach(Language::getLanguages(FALSE) as $language) {
|
||||||
if($description = Tools::getValue('description_'.$language['id_lang'])) {
|
if($description = Tools::getValue('description_'.$language['id_lang'])) {
|
||||||
$sale->description[$language['id_lang']] = $description;
|
$sale->description[$language['id_lang']] = $description;
|
||||||
@ -809,7 +808,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
|
|
||||||
$sale->save();
|
$sale->save();
|
||||||
$sale->buildCategoryCache();
|
$sale->buildCategoryCache();
|
||||||
|
|
||||||
if( empty($sale->carriers)) {
|
if( empty($sale->carriers)) {
|
||||||
mail('valentin@bebeboutik.com', 'Vente sans transporteur',
|
mail('valentin@bebeboutik.com', 'Vente sans transporteur',
|
||||||
'La vente '. $sale->id.' est sans transporteur',
|
'La vente '. $sale->id.' est sans transporteur',
|
||||||
@ -879,7 +878,7 @@ class AdminPrivateSalesSales extends AdminTab {
|
|||||||
echo '<div class="error alert">'.Tools::displayError($this->l('Impossible d\'éditer une vente sans transporteur.')).'</div>';
|
echo '<div class="error alert">'.Tools::displayError($this->l('Impossible d\'éditer une vente sans transporteur.')).'</div>';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sale->save();
|
$sale->save();
|
||||||
$sale->buildCategoryCache();
|
$sale->buildCategoryCache();
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ class Sale {
|
|||||||
return $orders;
|
return $orders;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMultiForStats($orders = array(), $nb_sale, $strict = false)
|
public function getMultiForStats($orders = array(), $nb_sale, $strict = false)
|
||||||
{
|
{
|
||||||
$products = $this->getProducts();
|
$products = $this->getProducts();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user