<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.6
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_product_image_main" >
<div id="hikashop_main_image_div" class="hikashop_main_image_div">
<?php
if(!empty ($this->element->images)){
$image = reset($this->element->images);
}
$height = $this->config->get('product_image_y',$this->config->get('thumbnail_y'));
$width = $this->config->get('product_image_x',$this->config->get('thumbnail_x'));
if (!$this->config->get('thumbnail')) {
if(!empty ($this->element->images)){
echo '<img src="' . $this->image->uploadFolder_url . $image->file_path . '" alt="' . $image->file_name . '" id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
}
} else {
$style = '';
if (!empty ($this->element->images) && count($this->element->images) > 1) {
if (!empty ($height)) {
$style = ' style="height:' . ($height +5) . 'px;"';
}
}
?>
<?php
if( !defined( '_ZOOMIN_LOADED' )) {
$document =& JFactory::getDocument();
$document->addScript( JURI::root () . 'modules/mod_artzoomin/js/zoom_vm.js' );
$document->addStyleSheet( JURI::root () . 'modules/mod_artzoomin/css/style.css' );
define ( '_ZOOMIN_LOADED', '1' );
}
$link = '<a href="' . JURI::root() . 'media/com_hikashop/upload/' . $image->file_path . '" class="cloud-zoom" rel="tintOpacity:0.7, smoothMove:3, adjustX: 0, adjustY:0, zoomWidth: 210, zoomHeight: 210, lensOpacity:0.5, titleOpacity: 0.5, softFocus:0, showTitle:0" style="direction: ltr;">
<img src="' . JURI::root() . 'media/com_hikashop/upload/thumbnail_100x100/' . $image->file_path . '" alt="" title=""/>
</a>';
?>
<div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div" <?php echo $style;?> >
<?php echo $link; ?>
</div>
<?php
}
?>
</div>
<div id="hikashop_small_image_div" class="hikashop_small_image_div">
<?php
if (!empty ($this->element->images) && count($this->element->images) > 1) {
foreach ($this->element->images as $image) {
echo $this->image->display($image->file_path, 'hikashop_main_image', $image->file_name, 'class="hikashop_child_image"','', $width, $height);
}
}
?>
</div>
</div>