$image) { $image_large = st_product_image_tag($image, 'gallery', array('alt' => '')); $image_thumb = st_product_image_path($image, 'gallery'); $image_big = st_product_image_path($image, 'big'); if($themeVersion < 2 && $themeVersion < 7) { $photos[$index]['photo'] = content_tag('a', $image_large, array( 'href' => $image_big, 'style' => 'width:' . $tw . 'px;height:' . $th . 'px', 'rel' => 'lightbox[product_image_gallery]', 'title' => $image->getDescription(), 'id' => isset($images_in_options[$image->getId()]) ? $product->getId().":".$image->getId() : '', )); $photos[$index]['desc'] = $image->getDescription(); }elseif($themeVersion >= 7) { if ($image->getId() != $product->getDefaultAssetImage()->getId()) { $photos[$index]['photo'] = content_tag('a', $image_large, array( 'href' => $image_big, 'alt' => $image->getDescription() ? $image->getDescription() : $product->getName(), 'id' => isset($images_in_options[$image->getId()]) ? $product->getId().":".$image->getId() : '', )); $photos[$index]['thumb_url'] = $image_thumb; $photos[$index]['big_url'] = $image_big; $photos[$index]['id'] = isset($images_in_options[$image->getId()]) ? $image->getId() : ''; $photos[$index]['desc'] = $image->getDescription(); $photos[$index]['product_name'] = $product->getName(); } }else{ $photos[$index]['photo'] = content_tag('a', $image_large, array( 'href' => $image_big, 'style' => 'width:' . $tw . 'px;height:' . $th . 'px', 'rel' => "{gallery: 'zoom_gallery', smallimage: '".st_product_image_path($image, 'large')."', largeimage: '".$image_big."'}", 'title' => $image->getDescription(), 'id' => isset($images_in_options[$image->getId()]) ? $product->getId().":".$image->getId() : '', )); $photos[$index]['desc'] = $image->getDescription(); } } if($themeVersion < 2 && $themeVersion < 7) { if(count($photos)==1) { $photos = array(); } }elseif($themeVersion >= 7) { if(count($photos)==0) { $photos = array(); } } $smarty->assign('photos_count', count($photos)); $smarty->assign('photos', $photos); $smarty->display('product_image_gallery.html'); ?> getOptHasOptions() > 1): ?>