[+] BO : Add Multiple Ajax Upload Image on AdminProduct

This commit is contained in:
rMontagne
2011-09-12 15:46:36 +00:00
parent a6a2df97ef
commit a78e7ecdb0
7 changed files with 1644 additions and 284 deletions
-11
View File
@@ -678,17 +678,6 @@ if (Tools::isSubmit('getChildrenCategories') && Tools::getValue('id_category_par
die(Tools::jsonEncode($children_categories));
}
if (Tools::isSubmit('updateProductImageShopAsso'))
{
if ($id_image = (int)Tools::getValue('id_image') AND $id_shop = (int)Tools::getValue('id_shop'))
{
if ((int)Tools::getValue('active'))
Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'image_shop (`id_image`, `id_shop`) VALUES('.(int)$id_image.', '.(int)$id_shop.')');
else
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'image_shop WHERE `id_image`='.(int)$id_image.' AND `id_shop`='.(int)$id_shop);
}
}
if (Tools::isSubmit('getNotifications'))
{
$notification = new Notification;
+10 -1
View File
@@ -68,7 +68,6 @@ class AdminCatalog extends AdminTab
$id_category = $shop->getCategory();
}
}
self::$_category = new Category($id_category);
if (!Validate::isLoadedObject(self::$_category))
die('Category cannot be loaded');
@@ -113,6 +112,16 @@ class AdminCatalog extends AdminTab
}
$this->adminProducts->postProcess($this->token);
}
public function ajaxProcess()
{
if (Tools::getValue('addImage') !== false)
$this->adminProducts->ajaxProcess();
if (Tools::getValue('updateProductImageShopAsso'))
$this->adminProducts->ajaxProcess();
if (Tools::getValue('deleteImage'))
$this->adminProducts->ajaxProcess();
}
public function displayErrors()
{
+255 -259
View File
@@ -28,13 +28,13 @@ include_once(PS_ADMIN_DIR.'/tabs/AdminProfiles.php');
class AdminProducts extends AdminTab
{
protected $maxFileSize = 20000000;
protected $maxFileSize = 20000000;
private $_category;
public function __construct()
{
$this->table = 'product';
$this->className = 'Product';
$this->lang = true;
@@ -68,7 +68,6 @@ class AdminProducts extends AdminTab
parent::__construct();
}
private function _cleanMetaKeywords($keywords)
{
if (!empty($keywords) && $keywords != '')
@@ -416,28 +415,8 @@ class AdminProducts extends AdminTab
{
if ($this->tabAccess['edit'] === '1')
{
/* Delete product image */
if (isset($_GET['deleteImage']))
{
$image->delete();
if (!Image::getCover($image->id_product))
{
$first_img = Db::getInstance()->getRow('
SELECT `id_image` FROM `'._DB_PREFIX_.'image`
WHERE `id_product` = '.(int)($image->id_product));
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'image`
SET `cover` = 1
WHERE `id_image` = '.(int)($first_img['id_image']));
}
@unlink(_PS_TMP_IMG_DIR_.'/product_'.$image->id_product.'.jpg');
@unlink(_PS_TMP_IMG_DIR_.'/product_mini_'.$image->id_product.'.jpg');
Tools::redirectAdmin(self::$currentIndex.'&id_product='.$image->id_product.'&id_category='.(!empty($_REQUEST['id_category'])?$_REQUEST['id_category']:'1').'&add'.$this->table.'&tabs=1'.'&token='.($token ? $token : $this->token));
}
/* Update product image/legend */
elseif (isset($_GET['editImage']))
if (isset($_GET['editImage']))
{
if ($image->cover)
$_POST['cover'] = 1;
@@ -856,6 +835,61 @@ class AdminProducts extends AdminTab
parent::postProcess(true);
}
public function ajaxProcess()
{
if (Tools::getValue('addImage') !== false)
{
self::$currentIndex = 'index.php?tab=AdminCatalog';
$allowedExtensions = array("jpeg", "gif", "png", "jpg");
// max file size in bytes
$sizeLimit = $this->maxFileSize;
$uploader = new FileUploader($allowedExtensions, $sizeLimit);
$result = $uploader->handleUpload();
if (isset($result['success']))
{
$shops = false;
if (Shop::isMultiShopActivated())
$shops = Shop::getShops();
$obj = new Product((int)Tools::getValue('id_product'));
$countImages = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'image WHERE id_product = '.(int)$obj->id);
$images = Image::getImages($this->context->language->id, $obj->id);
$imagesTotal = Image::getImagesTotal($obj->id);
$html = $this->getLineTableImage($result['success'], $imagesTotal + 1, $this->token, $shops);
die(Tools::jsonEncode(array("success" => $html)));
}
else
die(Tools::jsonEncode($result));
}
if (Tools::getValue('updateProductImageShopAsso'))
{
if ($id_image = (int)Tools::getValue('id_image') AND $id_shop = (int)Tools::getValue('id_shop'))
if (Tools::getValue('active') == "true")
die(Db::getInstance()->Execute('INSERT INTO '._DB_PREFIX_.'image_shop (`id_image`, `id_shop`) VALUES('.(int)$id_image.', '.(int)$id_shop.')'));
else
die(Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'image_shop WHERE `id_image`='.(int)$id_image.' AND `id_shop`='.(int)$id_shop));
}
if (Tools::getValue('deleteImage'))
{
$image = new Image((int)Tools::getValue('id_image'));
$image->delete();
if (!Image::getCover($image->id_product))
{
$first_img = Db::getInstance()->getRow('
SELECT `id_image` FROM `'._DB_PREFIX_.'image`
WHERE `id_product` = '.(int)($image->id_product));
Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'image`
SET `cover` = 1
WHERE `id_image` = '.(int)($first_img['id_image']));
}
@unlink(_PS_TMP_IMG_DIR_.'/product_'.$image->id_product.'.jpg');
@unlink(_PS_TMP_IMG_DIR_.'/product_mini_'.$image->id_product.'.jpg');
die(true);
}
}
protected function _validateSpecificPrice($id_shop, $id_currency, $id_country, $id_group, $price, $from_quantity, $reduction, $reduction_type, $from, $to)
{
if (!Validate::isUnsignedId($id_shop) OR !Validate::isUnsignedId($id_currency) OR !Validate::isUnsignedId($id_country) OR !Validate::isUnsignedId($id_group))
@@ -923,41 +957,6 @@ class AdminProducts extends AdminTab
$this->copyImage($product->id, $image->id, $method);
}
}
/* Adding a new product image */
elseif (isset($_FILES['image_product']['name']) && $_FILES['image_product']['name'] != NULL )
{
if ($error = checkImageUploadError($_FILES['image_product']))
$this->_errors[] = $error;
if (!sizeof($this->_errors) AND isset($_FILES['image_product']['tmp_name']) AND $_FILES['image_product']['tmp_name'] != NULL)
{
if (!Validate::isLoadedObject($product))
$this->_errors[] = Tools::displayError('Cannot add image because product add failed.');
elseif (substr($_FILES['image_product']['name'], -4) == '.zip')
return $this->uploadImageZip($product);
else
{
$image = new Image();
$image->id_product = (int)($product->id);
$_POST['id_product'] = $image->id_product;
$image->position = Image::getHighestPosition($product->id) + 1;
if (($cover = Tools::getValue('cover')) == 1)
Image::deleteCover($product->id);
$image->cover = !$cover ? !sizeof($product->getImages(Configuration::get('PS_LANG_DEFAULT'))) : true;
$this->validateRules('Image', 'image');
$this->copyFromPost($image, 'image');
if (!sizeof($this->_errors))
{
if (!$image->add())
$this->_errors[] = Tools::displayError('Error while creating additional image');
else
$this->copyImage($product->id, $image->id, $method);
$id_image = $image->id;
}
}
}
}
if (isset($image) AND Validate::isLoadedObject($image) AND !file_exists(_PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format))
$image->delete();
if (sizeof($this->_errors))
@@ -966,86 +965,6 @@ class AdminProducts extends AdminTab
@unlink(_PS_TMP_IMG_DIR_.'/product_mini_'.$product->id.'.jpg');
return ((isset($id_image) AND is_int($id_image) AND $id_image) ? $id_image : true);
}
public function uploadImageZip($product)
{
// Move the ZIP file to the img/tmp directory
if (!$zipfile = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['image_product']['tmp_name'], $zipfile))
{
$this->_errors[] = Tools::displayError('An error occurred during the ZIP file upload.');
return false;
}
// Unzip the file to a subdirectory
$subdir = _PS_TMP_IMG_DIR_.uniqid().'/';
try
{
if (!Tools::ZipExtract($zipfile, $subdir))
throw new Exception(Tools::displayError('An error occurred while unzipping your file.'));
$types = array('.gif' => 'image/gif', '.jpeg' => 'image/jpeg', '.jpg' => 'image/jpg', '.png' => 'image/png');
$_POST['id_product'] = (int)$product->id;
$imagesTypes = ImageType::getImagesTypes('products');
$highestPosition = Image::getHighestPosition($product->id);
foreach (scandir($subdir) as $file)
{
if ($file[0] == '.')
continue;
// Create image object
$image = new Image();
$image->id_product = (int)$product->id;
$image->position = ++$highestPosition;
$image->cover = ($highestPosition == 1 ? true : false);
// Call automated copy function
$this->validateRules('Image', 'image');
$this->copyFromPost($image, 'image');
if (sizeof($this->_errors))
throw new Exception('');
if (!$image->add())
throw new Exception(Tools::displayError('Error while creating additional image'));
$ext = substr($file, -4);
$type = (isset($types[$ext]) ? $types[$ext] : '');
if (!isPicture(array('tmp_name' => $subdir.$file, 'type' => $type)))
{
$image->delete();
throw new Exception(Tools::displayError('Image format not recognized, allowed formats are: .gif, .jpg, .png'));
}
if (!$new_path = $image->getPathForCreation())
throw new Exception(Tools::displayError('An error occurred during new folder creation'));
if (!imageResize($subdir.$file, $new_path.'.'.$image->image_format))
{
$image->delete();
throw new Exception(Tools::displayError('An error occurred while resizing image.'));
}
foreach ($imagesTypes AS $k => $imageType)
if (!imageResize($subdir.$file, _PS_PROD_IMG_DIR_.$image->getImgPath().'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height']))
{
$image->delete();
throw new Exception(Tools::displayError('An error occurred while copying image.').' '.stripslashes($imageType['name']));
}
Module::hookExec('watermark', array('id_image' => $image->id, 'id_product' => $image->id_product));
}
}
catch (Exception $e)
{
if ($error = $e->getMessage());
$this->_errors[] = $error;
Tools::deleteDirectory($subdir);
return false;
}
Tools::deleteDirectory($subdir);
return true;
}
/**
* Copy a product image
*
@@ -1118,7 +1037,7 @@ class AdminProducts extends AdminTab
/* Check description short size without html */
$limit = (int)Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT');
if ($limit <= 0) $limit = 800;
if ($limit <= 0) $limit = 400;
foreach ($languages AS $language)
if ($value = Tools::getValue('description_short_'.$language['id_lang']))
if (Tools::strlen(strip_tags($value)) > $limit)
@@ -2967,11 +2886,20 @@ class AdminProducts extends AdminTab
function displayFormImages($obj, $token = NULL)
{
if(!Tools::getValue('id_product'))
return '';
global $attributeJs, $images;
$shops = false;
if (Shop::isMultiShopActivated())
$shops = Shop::getShops();
$countImages = (int)Db::getInstance()->getValue('SELECT COUNT(*) FROM '._DB_PREFIX_.'image WHERE id_product = '.(int)$obj->id);
$images = Image::getImages($this->context->language->id, $obj->id);
$imagesTotal = Image::getImagesTotal($obj->id);
echo '
<div class="tab-page" id="step2">
<h4 class="tab">2. '.$this->l('Images').' ('.$countImages.')</h4>
<h4 class="tab" >2. '.$this->l('Images').' (<span id="countImage">'.$countImages.'</span>)</h4>
<table cellpadding="5">
<tr>
<td><b>'.(Tools::getValue('id_image')?$this->l('Edit this product image'):$this->l('Add a new image to this product')).'</b></td>
@@ -2982,92 +2910,152 @@ class AdminProducts extends AdminTab
<tr>
<td class="col-left">'.$this->l('File:').'</td>
<td style="padding-bottom:5px;">
<input type="file" id="image_product" name="image_product" />
<p>
'.$this->l('Format:').' JPG, GIF, PNG. '.$this->l('Filesize:').' '.(Tools::getMaxUploadSize() / 1024).''.$this->l('Kb max.').'
<br />'.$this->l('You can also upload a ZIP file containing several images. Thumbnails will be resized automatically.').'
<div id="file-uploader">
<noscript>
<p>Please enable JavaScript to use file uploader.</p>
</noscript>
</div>
<div id="progressBarImage" class="progressBarImage"></div>
<div id="showCounter" style="display:none;"><span id="imageUpload">0</span><span id="imageTotal">0</span></div>
<ul id="listImage"></ul>
<link href="../css/fileuploader.css" rel="stylesheet" type="text/css">
<script type="text/javascript">var upbutton = "'.$this->l('Upload a file').'"; </script>
<script src="../js/fileuploader.js" type="text/javascript"></script>
<script src="../js/jquery/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
function deleteImg(id)
{
var conf = confirm(\''.addslashes($this->l('Are you sure?', __CLASS__, true, false)).'\');
if (conf)
$.post("ajax-tab.php",
{
deleteImage: 1,
id_image:id,
id_product : "'.(int)Tools::getValue('id_product').'",
id_category : "'.(int)$this->_category->id.'",
token : "'.Tools::getAdminTokenLite('AdminCatalog').'",
tab : "AdminCatalog",
updateproduct : 1},
function (data) {
if (data)
{
position = parseInt($("#" + id + " .positionImage").html());
cover = 0;
if ($("#" + id).find(".covered").attr("src") == "../img/admin/enabled.gif")
cover = 1;
$("#" + id).remove();
if (cover)
$("#imageTable tr").eq(1).find(".covered").attr("src", "../img/admin/enabled.gif");
$("#imageTable tr").eq(1).find(".up").html("[ <img src=\"../img/admin/up_d.gif\" alt=\"\" border=\"0\"> ]");
$("#countImage").html(parseInt($("#countImage").html()) - 1);
$("#imageTable .positionImage").each( function(index){
if (parseInt($(this).html()) > position)
$(this).html(parseInt($(this).html()) - 1);
$("#imageTable tr:last .down").html("[ <img src=\"../img/admin/down_d.gif\" alt=\"\" border=\"0\"> ]");
});
}
});
}
function delQueue(id)
{
$("#img" + id).fadeOut("slow");
$("#img" + id).remove();
}
$(document).ready(function () {
var filecheck = 1;
var uploader = new qq.FileUploader({
element: document.getElementById("file-uploader"),
action: \'ajax-tab.php\',
debug: false,
onComplete: function(id, fileName, responseJSON){
var purcent = ((filecheck * 100) / nbfile);
$("#progressBarImage").progressbar({value: purcent });
if (purcent != 100)
{
$("#imageUpload").html(parseInt(filecheck));
$("#imageTotal").html(" / " + parseInt(nbfile) + " '.$this->l('Images').'");
$("#progressBarImage").show();
$("#showCounter").show();
}
else
{
$("#progressBarImage").progressbar({value: 0 });
$("#progressBarImage").hide();
$("#showCounter").hide();
nbfile = 0;
filecheck = 0;
}
if (responseJSON.success)
{
$("#imageTable tr:last").after(responseJSON.success);
$("#countImage").html(parseInt($("#countImage").html()) + 1);
$("#img" + id).remove();
}
else
{
$("#img" + id).addClass("red");
$("#img" + id + " .errorImg").html(responseJSON.error);
$("#img" + id + " .errorImg").show();
}
if (purcent >= 100)
$("#imageTable tr:last .down").html("[ <img src=\"../img/admin/down_d.gif\" alt=\"\" border=\"0\"> ]");
filecheck++;
},
onSubmit: function(id, filename){
$("#imageTable").show();
$("#listImage").append("<li id=\'img"+id+"\'><div class=\"float\" >" + filename + "</div></div><a style=\"margin-left:10px;\" href=\"javascript:delQueue(" + id +");\"><img src=\"../img/admin/disabled.gif\" alt=\"\" border=\"0\"></a><p class=\"errorImg\"></p></li>");
},
params: {
id_product : "'.(int)Tools::getValue('id_product').'",
id_category : "'.(int)$this->_category->id.'",
token : "'.Tools::getAdminTokenLite('AdminCatalog').'",
tab : "AdminCatalog",
updateproduct : 1,
addImage : 1,
},
});
});
</script>
<p class="float" style="clear: both;">
'.$this->l('Format:').' JPG, GIF, PNG. '.$this->l('Filesize:').' '.($this->maxImageSize / 1000).''.$this->l('Kb max.').'
</p>
</td>
</tr>
<tr>
<td class="col-left">'.$this->l('Caption:').'</td>
<td style="padding-bottom:5px;" class="translatable">';
foreach ($this->_languages as $language)
{
if (!Tools::getValue('legend_'.$language['id_lang']))
$legend = $this->getFieldValue($obj, 'name', $language['id_lang']);
else
$legend = Tools::getValue('legend_'.$language['id_lang']);
echo '
<div class="lang_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float:left; width:371px;">
<input size="55" type="text" id="legend_'.$language['id_lang'].'" name="legend_'.$language['id_lang'].'" value="'.stripslashes(htmlentities($legend, ENT_COMPAT, 'UTF-8')).'" maxlength="128" />
<sup> *</sup>
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}<br />'.$this->l('Forbidden characters will be automatically erased.').'<span class="hint-pointer">&nbsp;</span></span>
</div>';
}
echo '
<p class="clear">'.$this->l('Short description of the image').'</p>
</td>
</tr>
<tr>
<td class="col-left">'.$this->l('Cover:').'</td>
<td style="padding-bottom:5px;">
<input type="checkbox" size="40" name="cover" id="cover_on" class="checkbox"'.((isset($_POST['cover']) AND (int)($_POST['cover'])) ? ' checked="checked"' : '').' value="1" /><label class="t" for="cover_on"> '.$this->l('Use as product cover?').'</label>
<p>'.$this->l('If you want to select this image as a product cover').'</p>
</td>
</tr>
'; /* DEPRECATED FEATURE
<tr>
<td class="col-left">'.$this->l('Thumbnails resize method:').'</td>
<td style="padding-bottom:5px;">
<select name="resizer">
<option value="auto"'.(Tools::getValue('resizer', 'auto') == 'auto' ? ' selected="selected"' : '').'>'.$this->l('Automatic').'</option>
<option value="man"'.(Tools::getValue('resizer', 'auto') == 'man' ? ' selected="selected"' : '').'>'.$this->l('Manual').'</option>
</select>
<p>'.$this->l('Method you want to use to generate resized thumbnails').'</p>
</td>
</tr>*/
echo '
<tr>
<td colspan="2" style="text-align:center;">';
echo '<input type="hidden" name="resizer" value="auto" />';
$images = Image::getImages($this->context->language->id, $obj->id);
$imagesTotal = Image::getImagesTotal($obj->id);
if (isset($obj->id) AND sizeof($images))
{
echo '<input type="submit" value="'.$this->l(' Save image ').'" name="submitAdd'.$this->table.'AndStay" class="button" />';
echo '<input type="hidden" value="on" name="productCreated" /><br /><br />';
}
echo (Tools::getValue('id_image') ? '<input type="hidden" name="id_image" value="'.(int)(Tools::getValue('id_image')).'" />' : '').'
</td>
</tr>
<tr><td colspan="2" style="padding-bottom:10px;"><hr style="width:100%;" /></td></tr>';
if (!sizeof($images) OR !isset($obj->id))
echo '<tr>
<td colspan="2" style="text-align:center;">
<input type="hidden" value="off" name="productCreated" />
'.(Tools::isSubmit('id_category') ? '<input type="submit" value="'.$this->l('Save').'" name="submitAdd'.$this->table.'" class="button" />' : '').'
&nbsp;<input type="submit" value="'.$this->l('Save and stay').'" name="submitAdd'.$this->table.'AndStay" class="button" /></td>
</tr>';
else
{
echo '
<tr>
<input type="hidden" name="resizer" value="auto" />
'.(Tools::getValue('id_image') ? '<input type="hidden" name="id_image" value="'.(int)(Tools::getValue('id_image')).'" />' : '').'
</td>
</tr>
<tr><td colspan="2" style="padding-bottom:10px;"><hr style="width:100%;" /></td></tr>
<tr>
<td colspan="2">
<table cellspacing="0" cellpadding="0" class="table">
<table cellspacing="0" cellpadding="0" class="table" id="imageTable" style="display:'.($countImages == 0 ? 'none' : '').';">
<tr>
<th style="width: 100px;">'.$this->l('Image').'</th>
<th>&nbsp;</th>
<th>'.$this->l('Position').'</th>';
if (Shop::isMultiShopActivated())
if ($shops)
{
$shops = Shop::getShops();
echo '<script type="text/javascript">
$(window).ready(function() {
$(document).ready(function() {
$(\'.image_shop\').change(function() {
$.post("'.dirname(self::$currentIndex).'/ajax.php",
{updateProductImageShopAsso: 1, id_image:$(this).attr("name"), id_shop: $(this).val(), active:$(this).attr("checked")});
$.post("ajax-tab.php",
{
updateProductImageShopAsso: 1,
id_image:$(this).attr("name"),
id_shop: $(this).val(),
active:$(this).attr("checked"),
id_product : "'.(int)Tools::getValue('id_product').'",
id_category : "'.(int)$this->_category->id.'",
token : "'.Tools::getAdminTokenLite('AdminCatalog').'",
tab : "AdminCatalog",
updateproduct : 1,
});
});
});
</script>';
@@ -3079,50 +3067,10 @@ class AdminProducts extends AdminTab
<th>'.$this->l('Action').'</th>
</tr>';
echo $this->_positionJS();
foreach ($images AS $k => $image)
{
if (Shop::isMultiShopActivated())
$imgObj = new Image((int)$image['id_image']);
$image_obj = new Image($image['id_image']);
$img_path = $image_obj->getExistingImgPath();
echo $this->_positionJS().'
<tr>
<td style="padding: 4px;"><a href="'._THEME_PROD_DIR_.$img_path.'.jpg" target="_blank">
<img src="'._THEME_PROD_DIR_.$img_path.'-small.jpg'.((int)(Tools::getValue('image_updated')) === (int)($image['id_image']) ? '?date='.time() : '').'"
alt="'.htmlentities(stripslashes($image['legend']), ENT_COMPAT, 'UTF-8').'" title="'.htmlentities(stripslashes($image['legend']), ENT_COMPAT, 'UTF-8').'" /></a></td>
<td class="center">'.(int)($image['position']).'</td>
<td class="position-cell">';
if ($image['position'] == 1)
{
echo '<span>[ <img src="../img/admin/up_d.gif" alt="" border="0"> ]</span>';
if ($image['position'] == $imagesTotal)
echo '<span>[ <img src="../img/admin/down_d.gif" alt="" border="0"> ]</span>';
else
echo '<span>[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=0&token='.($token ? $token : $this->token).'"><img src="../img/admin/down.gif" alt="" border="0"></a> ]</span>';
}
elseif ($image['position'] == $imagesTotal)
echo '
<span>[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=1&token='.($token ? $token : $this->token).'"><img src="../img/admin/up.gif" alt="" border="0"></a> ]</span>
<span>[ <img src="../img/admin/down_d.gif" alt="" border="0"> ]</span>';
else
echo '
<span>[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=1&token='.($token ? $token : $this->token).'"><img src="../img/admin/up.gif" alt="" border="0"></a> ]</span>
<span>[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=0&token='.($token ? $token : $this->token).'"><img src="../img/admin/down.gif" alt="" border="0"></a> ]</span>';
echo '</td>';
if (Shop::isMultiShopActivated())
foreach ($shops AS $shop)
echo '<td class="center"><input type="checkbox" class="image_shop" name="'.(int)$image['id_image'].'" value="'.(int)$shop['id_shop'].'" '.($imgObj->isAssociatedToShop($shop['id_shop']) ? 'checked="1"' : '').' /></td>';
echo '
<td class="center"><a href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&coverImage&token='.($token ? $token : $this->token).'"><img src="../img/admin/'.($image['cover'] ? 'enabled.gif' : 'forbbiden.gif').'" alt="" /></a></td>
<td class="center">
<a href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&editImage&tabs=1&token='.($token ? $token : $this->token).'"><img src="../img/admin/edit.gif" alt="'.$this->l('Modify this image').'" title="'.$this->l('Modify this image').'" /></a>
<a href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&deleteImage&tabs=1&token='.($token ? $token : $this->token).'" onclick="return confirm(\''.$this->l('Are you sure?', __CLASS__, true, false).'\');"><img src="../img/admin/delete.gif" alt="'.$this->l('Delete this image').'" title="'.$this->l('Delete this image').'" /></a>
</td>
</tr>';
}
}
echo $this->getLineTableImage($image, $imagesTotal, $token, $shops);
echo '
</table>
@@ -3154,7 +3102,56 @@ class AdminProducts extends AdminTab
echo '
</script>';
}
public function getLineTableImage($image, $imagesTotal, $token, $shops)
{
if (Shop::isMultiShopActivated())
$imgObj = new Image((int)$image['id_image']);
$image_obj = new Image($image['id_image']);
$img_path = $image_obj->getExistingImgPath();
$html = '
<tr id="'.$image['id_image'].'">
<td style="padding: 4px;"><a href="'._THEME_PROD_DIR_.$img_path.'.jpg" target="_blank">
<img src="'._THEME_PROD_DIR_.$img_path.'-small.jpg'.((int)(Tools::getValue('image_updated')) === (int)($image['id_image']) ? '?date='.time() : '').'"
alt="'.htmlentities(stripslashes($image['legend']), ENT_COMPAT, 'UTF-8').'" title="'.htmlentities(stripslashes($image['legend']), ENT_COMPAT, 'UTF-8').'" /></a>
</td>
<td class="center positionImage">'.(int)($image['position']).'</td>
<td class="position-cell">';
if ($image['position'] == 1)
{
$html .= '
<span class="up">[ <img src="../img/admin/up_d.gif" alt="" border="0"> ]</span>';
if ($image['position'] == $imagesTotal)
$html .= '
<span class="down">[ <img src="../img/admin/down_d.gif" alt="" border="0"> ]</span>';
else
$html .= '
<span class="down">[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=0&token='.($token ? $token : $this->token).'"><img src="../img/admin/down.gif" alt="" border="0"></a> ]</span>';
}
elseif ($image['position'] == $imagesTotal)
$html .= '
<span class="up">[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=1&token='.($token ? $token : $this->token).'"><img src="../img/admin/up.gif" alt="" border="0"></a> ]</span>
<span class="down">[ <img src="../img/admin/down_d.gif" alt="" border="0"> ]</span>';
else
$html .= '
<span class="up">[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=1&token='.($token ? $token : $this->token).'"><img src="../img/admin/up.gif" alt="" border="0"></a> ]</span>
<span class="down">[ <a onclick="return hideLink();" href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&imgPosition='.$image['position'].'&imgDirection=0&token='.($token ? $token : $this->token).'"><img src="../img/admin/down.gif" alt="" border="0"></a> ]</span>';
$html .= '
</td>';
if (Shop::isMultiShopActivated())
foreach ($shops AS $shop)
$html .= '
<td class="center"><input type="checkbox" class="image_shop" name="'.(int)$image['id_image'].'" value="'.(int)$shop['id_shop'].'" '.($imgObj->isAssociatedToShop($shop['id_shop']) ? 'checked="1"' : '').' /></td>';
$html .= '
<td class="center"><a href="'.self::$currentIndex.'&id_image='.$image['id_image'].'&coverImage&token='.($token ? $token : $this->token).'"><img class="covered" src="../img/admin/'.($image['cover'] ? 'enabled.gif' : 'forbbiden.gif').'" alt="" /></a></td>
<td class="center">
<a href="#" onclick="deleteImg('.(int)$image['id_image'].');"><img src="../img/admin/delete.gif" alt="'.$this->l('Delete this image').'" title="'.$this->l('Delete this image').'" /></a>
</td>
</tr>';
return $html;
}
public function initCombinationImagesJS()
{
if (!($obj = $this->loadObject(true)))
@@ -3881,6 +3878,5 @@ class AdminProducts extends AdminTab
$this->displayErrors();
}
}
+196
View File
@@ -0,0 +1,196 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 7331 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* Handle file uploads via XMLHttpRequest
*/
class qqUploadedFileXhr
{
/**
* Save the file to the specified path
* @return boolean TRUE on success
*/
function upload($path)
{
$input = fopen("php://input", "r");
$temp = tmpfile();
$realSize = stream_copy_to_stream($input, $temp);
fclose($input);
if ($realSize != $this->getSize())
return false;
$target = fopen($path, "w");
fseek($temp, 0, SEEK_SET);
stream_copy_to_stream($temp, $target);
fclose($target);
return true;
}
function save()
{
$product = new Product($_GET['id_product']);
if (!Validate::isLoadedObject($product))
return array('error' => Tools::displayError('Cannot add image because product add failed.'));
else
{
$image = new Image();
$image->id_product = (int)($product->id);
$image->position = Image::getHighestPosition($product->id) + 1;
if (!Image::getCover($image->id_product))
$image->cover = 1;
else
$image->cover = 0;
if (!$image->add())
return array('error' => Tools::displayError('Error while creating additional image'));
else
{
return $this->copyImage($product->id, $image->id);
}
}
}
public function copyImage($id_product, $id_image, $method = 'auto')
{
$image = new Image($id_image);
$p = new Product($id_product);
if (!$new_path = $image->getPathForCreation())
return array('error' => Tools::displayError('An error occurred during new folder creation'));
if (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !$this->upload($tmpName))
return array('error' => Tools::displayError('An error occurred during the image upload'));
elseif (!imageResize($tmpName, $new_path.'.'.$image->image_format))
return array('error' => Tools::displayError('An error occurred while copying image.'));
elseif($method == 'auto')
{
$imagesTypes = ImageType::getImagesTypes('products');
foreach ($imagesTypes AS $k => $imageType)
if (!imageResize($tmpName, $new_path.'-'.stripslashes($imageType['name']).'.'.$image->image_format, $imageType['width'], $imageType['height'], $image->image_format))
return array('error' => Tools::displayError('An error occurred while copying image:').' '.stripslashes($imageType['name']));
}
unlink($tmpName);
Module::hookExec('watermark', array('id_image' => $id_image, 'id_product' => $id_product));
$lang = Context::getContext()->employee->id_lang;
foreach (Language::getLanguages(false) as $l)
$image->legend[$l['id_lang']] = $id_image." ".$p->name[$l['id_lang']]." ".$p->reference;
if (!$image->update())
return array('error' => Tools::displayError('Error while updating status'));
$img = array('id_image' => $image->id, 'legend' => $image->legend[$lang], 'position' => $image->position, 'cover' => $image->cover);
return array("success" => $img);
}
function getName()
{
return $_GET['qqfile'];
}
function getSize()
{
if (isset($_SERVER["CONTENT_LENGTH"]))
return (int)$_SERVER["CONTENT_LENGTH"];
else
throw new Exception('Getting content length is not supported.');
}
}
class FileUploaderCore
{
private $allowedExtensions = array();
private $sizeLimit = 10485760;
private $file;
function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760)
{
$allowedExtensions = array_map("strtolower", $allowedExtensions);
$this->allowedExtensions = $allowedExtensions;
$this->sizeLimit = $sizeLimit;
$this->checkServerSettings();
if (isset($_GET['qqfile']))
$this->file = new qqUploadedFileXhr();
else
$this->file = false;
}
private function checkServerSettings()
{
$postSize = $this->toBytes(ini_get('post_max_size'));
$uploadSize = $this->toBytes(ini_get('upload_max_filesize'));
if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit)
{
$size = max(1, $this->sizeLimit / 1024 / 1024) . 'M';
die("{'error':".Tools::displayError('increase post_max_size and upload_max_filesize to $size')."}");
}
}
private function toBytes($str)
{
$val = trim($str);
$last = strtolower($str[strlen($str)-1]);
switch($last) {
case 'g': $val *= 1024;
case 'm': $val *= 1024;
case 'k': $val *= 1024;
}
return $val;
}
/**
* Returns array('success'=>true) or array('error'=>'error message')
*/
function handleUpload()
{
if (!$this->file){
return array('error' => Tools::displayError('No files were uploaded.'));
}
$size = $this->file->getSize();
if ($size == 0) {
return array('error' => Tools::displayError('File is empty'));
}
if ($size > $this->sizeLimit) {
return array('error' => Tools::displayError('File is too large'));
}
$pathinfo = pathinfo($this->file->getName());
$filename = $pathinfo['filename'];
$these = implode(', ', $this->allowedExtensions);
if (!isset($pathinfo['extension']))
return array('error' => Tools::displayError('File has an invalid extension, it should be one of '). $these . '.');
$ext = $pathinfo['extension'];
if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions))
return array('error' => Tools::displayError('File has an invalid extension, it should be one of '). $these . '.');
return $this->file->save();
}
}
+43
View File
@@ -1647,4 +1647,47 @@ p.preference_description{
input.disable_me[disabled=disabled]{
background-color: red;
}
div.progressBarImage
{
float: left;
height: 15px;
margin-left: 3px;
width: 233px;
}
#showCounter
{
font-weight: bold;
float: left;
margin-left: 25px;
margin-top: 1px;
}
#listImage
{
list-style: none outside none;
margin-bottom: 10px;
margin-top: 10px;
}
#listImage li
{
clear: both;
float: left;
font-weight: bold;
margin-top: 10px;
}
#listImage li p.errorImg
{
background: none repeat scroll 0 0 #FAE2E3;
border: 1px solid #EC9B9B;
clear: both;
margin-bottom: 18px;
padding: 6px;
display: none;
}
#progressBarImage div.ui-progressbar-value
{
height: 100%;
}
+1133
View File
File diff suppressed because it is too large Load Diff
+7 -13
View File
@@ -19,8 +19,6 @@ $_ERRORS['82d6830fc99545242c1333aee42d5a17'] = 'Une erreur est survenue pendant
$_ERRORS['b464b4391b0ed5cc6d35dee9a62c3244'] = 'Une erreur est survenue pendant l\'installation du module :';
$_ERRORS['6b9b69ab9178ef91715387ca776ce2b5'] = 'Une erreur est survenue pendant la désinstallation du module :';
$_ERRORS['2ff0db4e2462e54ee9e4d345d9e3f4d7'] = 'Une erreure est survenue, ce module n\'existe pas :';
$_ERRORS['c8d29e2bc52b6c92a1560990874aa565'] = 'Une erreur s\'est produite lors de l\'ajout du comté';
$_ERRORS['920ecfc0507c000f2ae996465a9a3b16'] = 'Une erreur s\'est produite lors de l\'ajout des codes postaux';
$_ERRORS['d8f4f69d48a199f1c406d3e821b7828a'] = 'une erreur est survenue avant d\'envoyer le message';
$_ERRORS['200cb26c2479e770241b1c62ccfb8e08'] = 'une erreur est survenue lors de la suppression du produit personnalisé';
$_ERRORS['8eccd648c123a09bcf8520fea052861d'] = 'une erreur est survenue lors de la suppression du produit';
@@ -59,7 +57,6 @@ $_ERRORS['dea9b328f904f025e4031bf8dfb7b392'] = 'une erreur s\'est produite penda
$_ERRORS['2d97cc6ccfbff56dd7fa8a135970e964'] = 'Une erreur est survenue lors de la suppression d\'une réduction de groupe';
$_ERRORS['d5b9eddfad35e1cd6c97eff40c8301e6'] = 'Une erreur est survenue pendant la suppression de l\'image';
$_ERRORS['54bff0a0282d2be7fe5ee14aa4628291'] = 'Une erreur est survenue lors de la suppression d\'un prix spécifique';
$_ERRORS['fdebc7ba5328f22535df315e9f52b2f5'] = 'Une erreur est survenue pendant la récupération d\'un comté';
$_ERRORS['28c39342f22a394f233ec0cba0ecfa02'] = 'Une erreur est survenue pendant la récupération d\'un état';
$_ERRORS['bdc3ce1a2e9e6d8ab5bd0dd31c1a03fe'] = 'Une erreur est survenue lors de l\'import d\'une devise';
$_ERRORS['42a8c33bd3e937c419378c5a965e65ac'] = 'Une erreur est survenue lors de l\'import d\'une taxe';
@@ -95,6 +92,7 @@ $_ERRORS['5636dd80d3968f9b1ce4400bd71c5a7a'] = 'une erreur est apparue lors de l
$_ERRORS['26e6e2aef679da0451f05fb535ac40d7'] = 'une erreur s\'est produite pendant l\'envoi du fichier';
$_ERRORS['c791e58067fc99ef9fdb95bace661815'] = 'une erreur s\'est produite et votre nouveau mot de passe n\'a pas pu vous être envoyé : merci de signaler ce problème en utilisant le formulaire de contact';
$_ERRORS['420530ab27ece9fef8cc0b6835e65d31'] = 'Une erreur s\'est produite, votre message n\'a pas été envoyé s\'il vous plaît contactez votre administrateur système';
$_ERRORS['9475177df74030214d1e6cf3ee642a9a'] = 'Une erreur s\'est produite.';
$_ERRORS['8572b5d5a2dd8a7558363713a2e353da'] = 'Un article de votre panier n\'est plus disponible pour cette quantité, vous ne pouvez continuer votre commande';
$_ERRORS['099788460b01d1cfe9997d4c577f7f56'] = 'Un article de votre panier n\'est plus disponible, vous ne pouvez continuer votre commande';
$_ERRORS['b9c1228a8e8c3412befae5d854508114'] = 'Une commande a déjà été passée avec ce panier';
@@ -109,7 +107,6 @@ $_ERRORS['8243462d21cc70da864e92c31c29486a'] = 'Requête SQL pour les sous-domai
$_ERRORS['d1a9295d276a65933e0a7334a12e6f41'] = 'Mauvaise extension de fichier';
$_ERRORS['2d4aab5065e4f7b78be97f9a6de62a1d'] = 'La categorie CMS ne peut être déplacée ici';
$_ERRORS['f55449d53d91aff67bad843f9ab47aee'] = 'Système de cache manquant ';
$_ERRORS['c8e61b851c4a858374ad46b1171b16ec'] = 'fichier de configuration inaccessible';
$_ERRORS['a855995ec17e0c80d5985a885f3d4d84'] = 'Impossible d\'ajouter un serveur Memcache';
$_ERRORS['3d35aa7e75c2f7467f45b4fa1c8bf8a9'] = 'impossible d\'ajouter d\'image car l\'ajout du produit a échoué';
$_ERRORS['18ed633d86ed8181bded16b1876a3b5a'] = 'impossible d\'ajouter ce produit car votre bon de réduction n\'est pas valable sur les produits soldés';
@@ -177,6 +174,7 @@ $_ERRORS['869507b317c3e475fc0ca9f3551e3760'] = 'Une erreur s\'est produite lors
$_ERRORS['9ec9207929cd361ca5e264548f411e16'] = 'Erreur lors de la mise à jour de la base de données de PayPal';
$_ERRORS['c200140aea36e1efbf655fabf3f3b59e'] = 'erreur lors de la création de l\'image supplémentaire';
$_ERRORS['1a80f28eca93f30e2e333b6432890c10'] = 'une erreur est survenue pendant l\'extraction du module (le fichier peut être corrompu)';
$_ERRORS['efccf3b0fd1b65f88bd6dfa2821060c8'] = 'uen erreur est survenue pendant la mise à jour du statut';
$_ERRORS['1391c1ff3846b38862bbfc43938b8270'] = 'une erreur s\'est produite pendant le chargement de l\'image ; vous devez changer votre configuration serveur';
$_ERRORS['76f643ec10f812dbaccd1250fc1a4d15'] = 'Erreur : panier vide';
$_ERRORS['1769b5ab48b8e2ce733fb38663ec853a'] = 'Erreur : Serveur ou port SMTP invalides';
@@ -203,8 +201,11 @@ $_ERRORS['d194b022bc5a1a01657823aaccd45e9b'] = 'Erreur fatale: l\'iso code n\'es
$_ERRORS['9b3261577a34cd7c48ad83d80295ff09'] = 'Erreur fatale : pas de transporteur par défaut';
$_ERRORS['411ec6016c7845e0c49fb51160a12677'] = 'Erreur fatale : le répertoire contenant les modules n\'est pas présent';
$_ERRORS['6f268ac84ce6195ecf4e3dfe437e2aee'] = 'Erreur fatale: Aucun client';
$_ERRORS['847b0a793110ff20927e76269328e582'] = 'Extension invalide, je fichier doit avoir l\'extension suivante';
$_ERRORS['42e7b89a369899d8c0c4f0631bd1c921'] = 'Fichier install.sql est manquant ';
$_ERRORS['058dcec46037cb9f9c8b7d2b76799834'] = 'Fichier install.sql n\'est pas lisible ';
$_ERRORS['3ca396a7b899e8d1a593e5d7896d0d1e'] = 'Le fichier est vide';
$_ERRORS['ec89c7fa06f1df12a2b43c7159e21119'] = 'Le fichier est trop lourd';
$_ERRORS['4eeb89c9c7ae218f3d9cb4faaf8f1e38'] = 'Taille de nom de fichier trop long';
$_ERRORS['1b921ec32b4bac52d8801f4e196f79c6'] = 'Le drapeau et l\'image de \"Aucune image\" sont requis';
$_ERRORS['71754079aaeefc5c6e745ddd59f8a35f'] = 'Commande gratuite';
@@ -225,7 +226,6 @@ $_ERRORS['8b978fa2ad857b185bc61dc5acb10927'] = 'Object réduction incorrect';
$_ERRORS['da393a0fcc28b1678ba1f8f59ea94b50'] = 'Object commande incorrect';
$_ERRORS['c99348e30ef9822b53fce9b9f0c198c9'] = 'Valeur incorrecte pour une qualité d\'image JPEG.';
$_ERRORS['75e3bbc53d0a62d319235ffebf9e219c'] = 'Valeur incorrecte pour une qualité d\'image PNG.';
$_ERRORS['259f417808483b6dc18a10510fd8d3cc'] = 'Propriétés du comté invalides';
$_ERRORS['c1c8a564c10a0efe07bb4e4b20d88cc9'] = 'Identifiant non valide';
$_ERRORS['bfd99559857dfcfc40cb0d0e6c8aee1b'] = 'Nom invalide';
$_ERRORS['f9c7939a8397ee022fefee2bdb3407af'] = 'URL invalide';
@@ -302,6 +302,7 @@ $_ERRORS['c2492c52caab207d21da2c0decd8a405'] = 'aucun élément enregistré';
$_ERRORS['f787618e514c038851726224d7e4421e'] = 'aucun fichier selectionné';
$_ERRORS['1b599bf89c1bf4f8640ef31f3acb9f40'] = 'aucun fichier spécifié';
$_ERRORS['298883b17e36ee3a18d73e835c0b44fc'] = 'Aucun fichier n\'a été envoyé';
$_ERRORS['20c6125376d8de28149d655c7cc25e32'] = 'Aucun fichiers n\'a été envoyés';
$_ERRORS['cb20447a4bf5ff9bec717ec68a357a93'] = 'Aucun moteur de rendu choisi';
$_ERRORS['ccacacd12f75e1ab3f9ce3e234ed5777'] = 'Aucun moteur de tableau sélectionné';
$_ERRORS['774eec2772b5f57b2e13d11e1b093a4f'] = 'Aucune image trouvée pour la combinaison avec id_product = %s et la position de l\'image = %s.';
@@ -315,7 +316,6 @@ $_ERRORS['e3ac5a39682f9b3a09f6063f714ffc48'] = 'Aucune méthode de paiement est
$_ERRORS['8912e1863fe81af9cabd76f5de9e7495'] = 'Aucun produit ou quantité sélectionné.';
$_ERRORS['b7d99b30df0aade1e4d459fab8c7078f'] = 'Aucun profil';
$_ERRORS['7f3f9fec825792f2b728db9d55078e80'] = 'Aucune quantité sélectionnée pour le produit.';
$_ERRORS['6f3455d187a23443796efdcbe044096b'] = 'Aucune taxe';
$_ERRORS['a9839ad48cf107667f73bad1d651f2ca'] = 'Aucun gabarit trouvé';
$_ERRORS['eddeabd79f8ca673d888fa2ffe9cf69a'] = 'Aucun gabarit trouvé pour le module';
$_ERRORS['25723bba0086a38394001a8ca41e9126'] = 'valeur du champ exceptions incorrect';
@@ -382,6 +382,7 @@ $_ERRORS['d2bbf245e9591814fe994df3cae95964'] = 'Le fichier est vide';
$_ERRORS['40f9f62de5a8ccf912bc1cd19d515dd2'] = 'Le fichier est trop volumineux.';
$_ERRORS['d139abab2541129dfae24c733635104c'] = 'Le fichier a été partiellement transféré';
$_ERRORS['723c870c1b443e052e290bd96f46e977'] = 'Le champ suivant n\'est pas valide selon la méthode de validation';
$_ERRORS['b19a2bf8353427355aaa724a837f0217'] = 'Les modules suivants n\'ont pas été installés correctements:';
$_ERRORS['59e3d45dc17f2e9fc4caac2f887bd075'] = 'La fonction';
$_ERRORS['8227e4867a9388488b04ea32665bcc18'] = 'Le répertoire du module doit avoir les droits d\'écriture';
$_ERRORS['418e2586ee498c46f6375e9a0008517c'] = 'le détail du retour produit est invalide';
@@ -398,7 +399,6 @@ $_ERRORS['92cfc43b8b3cf7a964f2ef24fd22f8df'] = 'Il n\'y pas de modules dans votr
$_ERRORS['3c9a4f1e91ee7bb51c29bdc9362077fe'] = 'il n\'y a aucun compte enregistré avec cette adresse e-mail';
$_ERRORS['2e857abc0ea5d7f97522254ca00c18bb'] = 'il n\'y a pas assez de produits en stock';
$_ERRORS['59382adebc7f0d65c42fe773d443e4c7'] = 'ce code ISO est déjà lié à une autre langue';
$_ERRORS['61eaad60c84d4d2a5b3afcc3751c5635'] = 'Le code postal est déjà utilisée.';
$_ERRORS['4649093d4d10aa95a212636f146c47fd'] = 'ce compte n\'existe pas';
$_ERRORS['a56b6c43645970e79a8098df1dfc9746'] = 'cette adresse ne peut pas être effacée';
$_ERRORS['08b2765dc6c449c903f8b30ac7e55f91'] = 'cette adresse n\'est pas valide';
@@ -418,9 +418,7 @@ $_ERRORS['e0a602c130d12d57cd4ca2a8b9240917'] = 'Ce fichier doit être éditable
$_ERRORS['c9615dc36879116ef8c5f1ab08543191'] = 'Ce fichier n\'existe plus.';
$_ERRORS['b72591580ab2e9ecb08d1a26ac23641b'] = 'Cette clé est utilisée trop de fois (une seule autorisée)';
$_ERRORS['b60be6e4c0df15343a7cdafccb174159'] = 'Ce module ne peut être greffé sur ce hook.';
$_ERRORS['a44f9463879b845e1ad2c45e75aebd18'] = 'Ce module est déjà installé :';
$_ERRORS['aa508f3bd17074b8941571083de1350e'] = 'ce module est déjà greffé sur ce hook';
$_ERRORS['ae38c419414887fa47b7f5a811e5f42d'] = 'Ce module est déjà désinstallé :';
$_ERRORS['e8be55bf3a30501aef09d2e74de97976'] = 'ce nom existe déjà';
$_ERRORS['b74c118d823d908d653cfbf1c877ae55'] = 'ce nom est déjà utilisé par une autre liste';
$_ERRORS['d312d5c57aff77e76cab1b5981bc5606'] = 'Ce nom n\'est pas autorisé';
@@ -475,7 +473,6 @@ $_ERRORS['ec5f6f7f65190788d12ef16ab6135009'] = 'vous ne pouvez pas tous les supp
$_ERRORS['e5403f88992848e3b3f3f92bf015e8e2'] = 'Vous ne pouvez pas effacer le groupe par défaut';
$_ERRORS['1cd979028e05c3ccd607b99a6714ad6f'] = 'Vous ne pouvez pas supprimer ou désactiver un groupe de boutique qui contient une boutique qui l\'utilise';
$_ERRORS['dfd9f28270256b343e6252198474b1f2'] = 'Vous ne pouvez pas supprimer ou désactiver le dernier groupe de boutique';
$_ERRORS['b97bd4782c45637c71441329bfd34655'] = 'Vous ne pouvez pas supprimer ou désactiver la dernière boutique';
$_ERRORS['052800f7397d4c12924faa83534c62f0'] = 'Vous ne pouvez pas désactiver ou supprimer le dernier compte administrateur';
$_ERRORS['f5d44b60e38b28d19549bb7a107654ca'] = 'Vous ne pouvez pas supprimer votre propre compte.';
$_ERRORS['cc7fe0548f3832b01e1d4ce466b99b4c'] = 'Vous ne pouvez pas définir cette langue comme langue par défaut parce qu\'elle est désactivée';
@@ -498,9 +495,7 @@ $_ERRORS['251db6b140bc5b3adcbe0c5efadb3c7d'] = 'vous devez ajouter au moins un a
$_ERRORS['0d15d3afa8c174934ff0e43ce3b99bd3'] = 'Vous devez être identifié pour gérer vos alertes';
$_ERRORS['16a23698e7cf5188ce1c07df74298076'] = 'Vous devez être identifié pour gérer vos liste voeux';
$_ERRORS['d14e88e2344c5dba06dad332a7f74726'] = 'Vous devez choisir un transporteur';
$_ERRORS['58ac247e63d629fd85e0376c1c42d783'] = 'vous devez choisir un thème';
$_ERRORS['577c8acd6847e0a8fc64911123f2ec1f'] = 'Vous devez au minimum spécifier un serveur et un port SMTP. Si vous n\'êtes pas sûrs, utilisez la fonction mail() de PHP à la place.';
$_ERRORS['b095746c9800d06a39f33c83188431bc'] = 'Vous devez avoir une url principale par boutique';
$_ERRORS['ae0e822b6fad0de61c231ef188997e92'] = 'Un produit est nécessaire pour supprimer une alerte';
$_ERRORS['b0ffc4925401f6f4edb038f5ca954937'] = 'Vous devez vous identifier';
$_ERRORS['39916f579f264041641c122e68e545d5'] = 'Vous devez enregistrer au moins un numéro de téléphone';
@@ -523,7 +518,6 @@ $_ERRORS['70f4b635847038d056e33959821a7a66'] = 'caractères max';
$_ERRORS['e0d4da0607fb1793b6e1d348c36d52cb'] = 'config.xml est manquant dans le dossier de votre thème';
$_ERRORS['1d112c010ef14e32e478b36aca8d3414'] = 'config.xml dans votre dossier de thème n\'est pas un fichier xml valide';
$_ERRORS['6364b8f0fcf00c1fedb76a7a7b7ad03e'] = 'Le fichier config.xml du thème n\'a pas été créé pour cette version de Prestashop';
$_ERRORS['80e9a269b3e9b377f35cb6b642edceae'] = 'Description: Longueur >';
$_ERRORS['b0accee4a4704ec46d245b722309a8be'] = 'n\'existe pas en base de données';
$_ERRORS['06e3d36fa30cea095545139854ad1fb9'] = 'champ';
$_ERRORS['1cd6f2b0848e672cb987e15e0598a144'] = 'pour la langue';