[-] BO : FIxBug Correct image language in product
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
<tr id="image_id">
|
||||
<td style="padding: 4px;">
|
||||
<a href="{$smarty.const._THEME_PROD_DIR_}image_path.jpg" class="fancybox">
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}en-default-small_default.jpg" alt="image_id" title="image_id" />
|
||||
<img src="{$smarty.const._THEME_PROD_DIR_}{$iso_lang}-default-small_default.jpg" alt="image_id" title="image_id" />
|
||||
</a>
|
||||
</td>
|
||||
<td id="td_image_id" class="pointer dragHandle center positionImage">
|
||||
@@ -313,12 +313,13 @@
|
||||
{
|
||||
line = $("#lineType").html();
|
||||
line = line.replace(/image_id/g, id);
|
||||
line = line.replace(/en-default/g, path);
|
||||
line = line.replace(/image_path/g, path);
|
||||
line = line.replace(/[a-z]{2}-default/g, path);
|
||||
line = line.replace(/image_path/g, path);
|
||||
line = line.replace(/image_position/g, position);
|
||||
line = line.replace(/blank/g, cover);
|
||||
line = line.replace(/<tbody>/gi, "");
|
||||
line = line.replace(/<\/tbody>/gi, "");
|
||||
|
||||
if (shops != false)
|
||||
{
|
||||
$.each(shops, function(key, value){
|
||||
@@ -326,8 +327,10 @@
|
||||
line = line.replace('id="' + key + '' + id + '"','id="' + key + '' + id + '" checked=checked');
|
||||
});
|
||||
}
|
||||
|
||||
$("#imageList").append(line);
|
||||
}
|
||||
|
||||
$('.fancybox').fancybox();
|
||||
});
|
||||
{/literal}
|
||||
|
||||
@@ -3659,12 +3659,15 @@ class AdminProductsControllerCore extends AdminController
|
||||
$current_shop_id = (int)$this->context->shop->id;
|
||||
else
|
||||
$current_shop_id = 0;
|
||||
|
||||
$languages = Language::getLanguages(true);
|
||||
|
||||
$data->assign(array(
|
||||
'countImages' => $count_images,
|
||||
'id_product' => (int)Tools::getValue('id_product'),
|
||||
'id_category_default' => (int)$this->_category->id,
|
||||
'images' => $images,
|
||||
'iso_lang' => $languages[0]['iso_code'],
|
||||
'token' => $this->token,
|
||||
'table' => $this->table,
|
||||
'max_image_size' => $this->max_image_size / 1024 / 1024,
|
||||
|
||||
Reference in New Issue
Block a user