Hi
Using 1.55
I have changed MY_TEMPLATE/templates/tpl_modules_main_product_image.php so that instead of the js popup it opens in a modal, and works fine.
I would like to do the same with the additional images as well, and possibly in the same modal, so to have "next"/"previous" buttons.
The code for main image is
PHP Code:
<div id="productMainImage" class="centeredContent back">
<div type="button" class="btn btn-lg fz-product-image" data-toggle="modal" data-target="#fz-modal">
<?php
echo zen_image($products_image_medium, $products_name, LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
?>
</div>
</div>
<!-- start modal window -->
<div class="modal fade" id="fz-modal" tabindex="-1" role="dialog" aria-labelledby="fz-modal-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="fz-modal-label">
<?php echo $products_name; ?>
</h4>
</div>
<div class="modal-body">
<?php
echo zen_image($products_image_large, $products_name, LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- END modal window -->
I played with includes/modules/MY_TEMPLATE/additional_images.php and managed to trigger the modal, but the image loaded would be the small main one, and not the additional one/s, and obviously not "next"/"previous" buttons; as you can guess I basically copied the main image code, and put it in the additional one, commenting out the script part ($script_link)
I just can't interpret all the php, I kinda can imagine some of it what it does, but putting it together to do what I need is just over me.
Thank you.
Bookmarks