Cảm ơn cụ Quốc Đoàn đã hướng dẫn, đã làm và đã thành công :D
Bắt đầu
Mở file: /modules/shops/theme.php
Trong "function detail_product" tìm đoạn
if (!empty($data_content)) {
thêm vào ngay sau đó:
if (!empty($data_content['otherimage'])) { $otherimage = explode('|', $data_content['otherimage']); foreach ($otherimage as $otherimage_i) { if (!empty($otherimage_i) and file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/' . $otherimage_i)) { $thumb = NV_BASE_SITEURL . NV_FILES_DIR . '/' . $module_upload . '/' . $otherimage_i; $otherimage_i = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $otherimage_i; $xtpl->assign('IMG_SRC_OTHER', $otherimage_i); $xtpl->assign('IMG_THUMB', $thumb); if (!empty($otherimage_i) and file_exists(NV_ROOTDIR . $otherimage_i)) { $xtpl->assign('IMG_SRC_OTHER_INFO', nv_is_image(NV_ROOTDIR . $otherimage_i)); } $xtpl->parse('main.othersimg.loop'); } } $xtpl->parse('main.othersimg'); }
Tìm đến file /themes/(thư mục giao diện bạn sử dụng)/modules/shops/detail.tpl
Thêm đoạn code này vào chỗ bạn muốn hiển thị hình ảnh
<!-- BEGIN: othersimg --> <!-- BEGIN: loop --> <a href="#" data-image="{IMG_SRC_OTHER}" data-zoom-image="{IMG_SRC_OTHER}" style="width:110px;height:110px;overflow: hidden; "><img src="{IMG_THUMB}" alt="" style="width:100%;"></a> <!-- END: loop --> <!-- END: othersimg -->
All done và thưởng thức :D