element->images)) {
$image = reset($this->element->images);
}
$height = (int)$this->config->get('product_image_y');
$width = (int)$this->config->get('product_image_x');
if (empty($height)) $height = (int)$this->config->get('thumbnail_y');
if (empty($width)) $width = (int)$this->config->get('thumbnail_x');
$divWidth = $width;
$divHeight = $height;
$this->image->checkSize($divWidth, $divHeight, $image);
if (!$this->config->get('thumbnail')) {
if (!empty ($this->element->images)) {
echo '

';
}
} else {
$style = '';
if (!empty ($this->element->images) && count($this->element->images) > 1) {
if (!empty($height)) {
$style = ' style="height:' . ($height + 20) . 'px;"';
}
}
$variant_name = '';
if (isset($this->variant_name)) {
$variant_name = $this->variant_name;
}
?>
>
image->override) {
echo $this->image->display(@$image->file_path, true, @$image->file_name, 'id="hikashop_main_image' . $variant_name . '" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"', 'id="hikashop_main_image_link"', $width, $height);
} else {
if (empty($this->popup))
$this->popup = hikashop_get('helper.popup');
$image_options = array('default' => true, 'forcesize' => $this->config->get('image_force_size', true), 'scale' => $this->config->get('image_scale_mode', 'inside'));
$img = $this->image->getThumbnail(@$image->file_path, array('width' => $width, 'height' => $height), $image_options);
if ($img->success) {
$attr = '';
if (!empty ($this->element->images) && count($this->element->images) > 1) {
$attr = 'onclick="return window.localPage.openImage(\'hikashop_main_image' . $variant_name . '\');"';
}
$html = '

';
if (!empty($this->element->badges))
$html .= $this->classbadge->placeBadges($this->image, $this->element->badges, '0', '0', false);
echo $this->popup->image($html, $img->origin_url, null, $attr);
}
}
?>
element->images) && count($this->element->images) > 1) {
$firstThunb = true; ?>