Сделал дополнительные поля для ввода дополнительной информации под картинкой, для того чтоб при клике по по миниатюре в карточке товара менялась не только картинка но и дополнительное содержимое. Проблема только в том что это поле не записывает в базу HTML (после сохранения оставляет голый текст), сколько пытался побороть не удалось...

А вот тут о том как я все это провернул
Joomshopping Version 4.18.4Открываем: administrator/components/com_jshopping/views/product_edit/tmpl/images.php
добавляем после:<div style="height:3px;"></div>
<div style="padding-bottom:5px;padding-right:5px;">
<a class="modal" href="<?php echo getPatchProductImage($image->image_name, 'full', 1)?>" rel="{handler: 'image'}">
<img style="cursor:pointer" src="<?php echo getPatchProductImage($image->image_name, 'thumb', 1)?>" alt="" />
</a>
</div>
вот это:<textarea placeholder="HTML код на картинке" style="width:96%;" name="old_image_text[<?php print $image->image_id?>]" class="wide" rows="5"><?php echo $image->image_text ?></textarea>
Открываем:administrator/components/com_jshopping/models/products.php
добавляем после:if (isset($post['old_image_descr'])){
$this->renameProductImageOld($post['old_image_descr'], $post['old_image_ordering']);
}
вот это:if (isset($post['old_image_text'])){
$this->renameProductImageTextOld($post['old_image_text']);
}
добавляем после:function renameProductImageOld($image_descr, $image_ordering){
$db = JFactory::getDBO();
foreach($image_descr as $id=>$v){
$query = "update `#__jshopping_products_images` set `name`='".$db->escape($image_descr[$id])."', `ordering`='".$db->escape($image_ordering[$id])."' where `image_id`='".$db->escape($id)."'";
$db->setQuery($query);
$db->query();
}
}
вот это:function addToProductImageText($product_id, $image_text) {
$image = JSFactory::getTable('image', 'jshop');
$image->set("image_id", 0);
$image->set("product_id", $product_id);
$image->set("image_text", $image_text);
$image->store();
}
function renameProductImageTextOld($image_text){
$db = JFactory::getDBO();
$query = "update `#__jshopping_products_images` set `image_text`='".$db->escape($image_text[$id])."' where `image_id`='".$db->escape($id)."'";
$db->setQuery($query);
$db->query();
}
}
Открываем:components/com_jshopping/templates/default/product/product_default.php
Меняем:<a class="lightbox" id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($k!=0){?>style="display:none"<?php }?> title="<?php print htmlspecialchars($image->_title)?>">
<img id = "main_image_<?php print $image->image_id?>" src = "<?php print $this->image_product_path?>/<?php print $image->image_name;?>" alt="<?php print htmlspecialchars($image->_title)?>" title="<?php print htmlspecialchars($image->_title)?>" />
<div class="text_zoom">
<img src="<?php print $this->path_to_image?>search.png" alt="zoom" />
<?php print _JSHOP_ZOOM_IMAGE?>
</div>
</a>
На:<a class="lightbox" id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($k!=0){?>style="display:none"<?php }?> title="<?php print htmlspecialchars($image->_title)?>">
<img id = "main_image_<?php print $image->image_id?>" src = "<?php print $this->image_product_path?>/<?php print $image->image_name;?>" alt="<?php print htmlspecialchars($image->_title)?>" title="<?php print htmlspecialchars($image->_title)?>" />
<?php print $image->image_text;?>
<div class="text_zoom">
<img src="<?php print $this->path_to_image?>search.png" alt="zoom" />
<?php print _JSHOP_ZOOM_IMAGE?>
</div>
</a>
Далее в БД создаем в таблице ***_jshopping_products_images создаем поле image_text
Ну вот и все, может кому пригодится.
Если кому не сложно, помогите довести все это дело до ума, а именно подключить поддержку HTML! Буду благодарен!