diff --git a/admin-dev/tabs/AdminProducts.php b/admin-dev/tabs/AdminProducts.php
index 5e6e073c6..bb211fbe6 100644
--- a/admin-dev/tabs/AdminProducts.php
+++ b/admin-dev/tabs/AdminProducts.php
@@ -2804,6 +2804,110 @@ class AdminProducts extends AdminTab
echo '
';
+ $images = Image::getImages($this->context->language->id, $obj->id);
+ if($images)
+ {
+ echo '
+
+ |
+
+
+ '.$this->l('You want an image associated with the product in your description ?').'
+ '.$this->l('Click here').'.
+
+
+
+ |
+
';
+ echo '
+ ';
+ }
echo '
| '.$this->l('Tags:').' |
diff --git a/cache/class_index.php b/cache/class_index.php
index 0dc716854..e9df64057 100644
--- a/cache/class_index.php
+++ b/cache/class_index.php
@@ -92,6 +92,8 @@
'FeatureValue' => 'override/classes/FeatureValue.php',
'FileLoggerCore' => 'classes/FileLogger.php',
'FileLogger' => 'override/classes/FileLogger.php',
+ 'FileUploaderCore' => 'classes/FileUploader.php',
+ 'FileUploader' => '',
'FrontControllerCore' => 'classes/FrontController.php',
'FrontController' => 'override/classes/FrontController.php',
'GroupCore' => 'classes/Group.php',
diff --git a/controllers/ProductController.php b/controllers/ProductController.php
index 3e925e087..9c3c96a46 100644
--- a/controllers/ProductController.php
+++ b/controllers/ProductController.php
@@ -346,6 +346,8 @@ class ProductControllerCore extends FrontController
// Pack management
$this->context->smarty->assign('packItems', $this->product->cache_is_pack ? Pack::getItemTable($this->product->id, $this->context->language->id, true) : array());
$this->context->smarty->assign('packs', Pack::getPacksTable($this->product->id, $this->context->language->id, true, 1));
+
+ $this->product->description = $this->transformDescriptionWithImg($this->product->description);
}
}
@@ -372,6 +374,19 @@ class ProductControllerCore extends FrontController
parent::displayContent();
$this->context->smarty->display(_PS_THEME_DIR_.'product.tpl');
}
+
+ public function transformDescriptionWithImg($desc)
+ {
+ $reg = '/{img-([0-9]+)-(left|right)-([a-z]+)}/';
+ while (preg_match($reg, $desc, $matches))
+ {
+ $linkImg = $this->context->link->getImageLink($this->product->link_rewrite, $this->product->id.'-'.$matches[1], $matches[3]);
+ $class = $matches[2] == 'left' ? 'class="imageFloatLeft"' : 'class="imageFloatRight"';
+ $htmlImg = '
';
+ $desc = str_replace($matches[0], $htmlImg, $desc);
+ }
+ return $desc;
+ }
public function pictureUpload(Product $product, Cart $cart)
{
diff --git a/css/admin.css b/css/admin.css
index d0ed3bedf..8d5b738ea 100644
--- a/css/admin.css
+++ b/css/admin.css
@@ -1700,4 +1700,12 @@ div.progressBarImage
#progressBarImage div.ui-progressbar-value
{
height: 100%;
+}
+
+#createImageDescription ul li{
+ list-style-type: none;
+ display: block;
+ width: 50px;
+ text-align: center;
+ float: left;
}
\ No newline at end of file
diff --git a/themes/prestashop/css/product.css b/themes/prestashop/css/product.css
index 57633cd57..79f1d5242 100755
--- a/themes/prestashop/css/product.css
+++ b/themes/prestashop/css/product.css
@@ -157,3 +157,19 @@
{
margin-top: 5px
}
+
+#more_info_block .imageFloatLeft
+{
+ float:left;
+ display:block;
+ clear: both;
+ margin:10px 10px 0 0
+}
+
+#more_info_block .imageFloatRight
+{
+ float:right;
+ display:block;
+ clear: both;
+ margin:10px 0 0 10px
+}
diff --git a/translations/fr/admin.php b/translations/fr/admin.php
index 5d43ad28a..083a06100 100644
--- a/translations/fr/admin.php
+++ b/translations/fr/admin.php
@@ -2210,6 +2210,7 @@ $_LANGADM['AdminProducts3e565755572fa5df48eb811c62619098'] = 'Message quand en s
$_LANGADM['AdminProducts3e053943605d9e4bf7dd7588ea19e9d2'] = 'Caractères interdits :';
$_LANGADM['AdminProducts627b9f5acc2dcec1e8e341dd09df9768'] = 'Message lorsque hors-stock mais commandable :';
$_LANGADM['AdminProducts915f8462b0f5459dcca1d52b0a2297d5'] = 'Date de disponibilité :';
+$_LANGADM['AdminProducts4b5ecb6f4e1496fb2c2b28fa0f41872a'] = 'La date de disponibilité du produit lorsqu\'il n\'est plus en stock';
$_LANGADM['AdminProducts24a1199bf4dcbef398db7660409a61d9'] = 'Si rupture de stock :';
$_LANGADM['AdminProductsf072da215c080d985d44361e96a3cf60'] = 'Refuser les commandes';
$_LANGADM['AdminProducts119a7c88cf8f1c685c57981abff26f43'] = 'Accepter les commandes';
@@ -2240,6 +2241,15 @@ $_LANGADM['AdminProducts92ab5edf4194cb5a84d6808cb8d8b696'] = 'Le lien vers la fi
$_LANGADM['AdminProducts234078adec0a64008b6ae77653776cfa'] = 'Résumé :';
$_LANGADM['AdminProducts38d301f7ef549a79620e99fd8b51fa34'] = 'apparaît dans les listings produits et au haut des fiches produits';
$_LANGADM['AdminProducts9be976b8052c984a95997e4a4f8eef96'] = 'apparaît sur les pages produits';
+$_LANGADM['AdminProductsab9a907ec2b0b624d4506713ab5507df'] = 'Vous souhaitez mettre une image associé à ce produit dans votre description ?';
+$_LANGADM['AdminProducts936ccdb97115e9f35a11d35e3d5b5cad'] = 'Cliquez ici';
+$_LANGADM['AdminProducts8300b58d12ed9de055d7a727c72ef55a'] = 'Sélectionner votre image :';
+$_LANGADM['AdminProductscba45f08ce11e3ed5624f853e3cb6f08'] = 'Où la placer ?';
+$_LANGADM['AdminProducts811882fecd5c7618d7099ebbd39ea254'] = 'Gauche';
+$_LANGADM['AdminProducts7c4f29407893c334a6cb7a87bf045c0d'] = 'Droite';
+$_LANGADM['AdminProducts03e895d6310cdab805586fce4123ed08'] = 'Sélectionner le type d\'image :';
+$_LANGADM['AdminProductsd5b6a6e5d16e7061897360b9ef925b28'] = 'Code à insérer dans la description :';
+$_LANGADM['AdminProducts29e6c2eef6a0b578f4c0395c1b8f5b88'] = 'Ce code est à copier/coller dans la description.';
$_LANGADM['AdminProducts32b502f33a535f75dcbf63f6753c631e'] = 'Tags :';
$_LANGADM['AdminProducts8fca858b27c5837dcb22c398aca5e0fc'] = 'Tags séparés par des virgules (ex : dvd, lecteur dvd, hifi)';
$_LANGADM['AdminProductsbe26ade2055790d0e8d19eed69309574'] = 'Accessoires :';
@@ -2278,7 +2288,6 @@ $_LANGADM['AdminProductsad802655c2e83ad378868d5f448677c7'] = 'Impact sur le prix
$_LANGADM['AdminProducts487fd4fe388baed0928898b641050983'] = 'Eco-participation :';
$_LANGADM['AdminProductsf445f4a540768234833908cab83f9214'] = 'écrase l\'information d\'éco-participation du produit';
$_LANGADM['AdminProducts24bf9597daf212b5cfab26ca381e7008'] = 'Mouvement de stock :';
-$_LANGADM['AdminProducts4b5ecb6f4e1496fb2c2b28fa0f41872a'] = 'La date de disponibilité du produit lorsqu\'il n\'est plus en stock';
$_LANGADM['AdminProducts461900b74731e07320ca79366df3e809'] = 'Image :';
$_LANGADM['AdminProducts29d7b46b863639e29ae8452d2320530a'] = 'Faire de cette déclinaison celle par défaut pour ce produit';
$_LANGADM['AdminProductsadbabbab7becdf5ef8736a64466df260'] = 'Ajouter cette déclinaison';