Guest fozz Posted September 20, 2007 Share Posted September 20, 2007 I would like to modify my "View Product" page to show all of the images as thumbnails. Currently it shows the main image large and any extra images are shown as small thumbnails that are viewable via the lightbox, but I want all the images in the thumbnails section so I can remove the large image. I assume this change can be made in viewProd.inc.php but I don't understand PHP well enough to figure it out. If anyone has suggestions for me, please help. -Josh Quote Link to comment Share on other sites More sharing options...
Guest fozz Posted September 22, 2007 Share Posted September 22, 2007 I think I have to change something in the following code, but I'm not sure what. Can someone point me in the right direction? $imgs = $db->select("SELECT img FROM ".$glob['dbprefix']."CubeCart_img_idx WHERE productId = ".$db->mySQLsafe($prodArray[0]['productId'])); for ($i=0; $i<count($imgs); $i++){ $thumbRootPath = imgPath($imgs[$i]['img'],$thumb=1,$path="root"); $thumbRelPath = imgPath($imgs[$i]['img'],$thumb=1,$path="rel"); if (file_exists($thumbRootPath)) { $view_prod->assign("VALUE_THUMB_SRC",$thumbRelPath); $sizeThumb = getimagesize($thumbRootPath); $view_prod->assign("VALUE_THUMB_WIDTH",$sizeThumb[0]); } else { $view_prod->assign("VALUE_THUMB_SRC",imgPath($imgs[$i]['img'], 0, 'rel')); $view_prod->assign("VALUE_THUMB_WIDTH",$config['gdthumbSize']); } $view_prod->assign("VALUE_IMG_SRC", imgPath($imgs[$i]['img'], 0, 'rel')); $view_prod->assign("ALT_THUMB",$lang['viewProd']['thumb_alt']); $view_prod->parse("view_prod.prod_true.image_gallery.img_repeat"); } $view_prod->assign("IMAGE_GALLERY",$lang['viewProd']['image_gallery']); $view_prod->parse("view_prod.prod_true.image_gallery"); } Quote Link to comment Share on other sites More sharing options...
Guest philoye Posted October 6, 2007 Share Posted October 6, 2007 I'm with you on this one... Did you ever get it worked out? Quote Link to comment Share on other sites More sharing options...
Guest fozz Posted October 6, 2007 Share Posted October 6, 2007 I'm with you on this one... Did you ever get it worked out? No not exactly, I simply added a width property to the big image to make it match the size of the thumbnails. I also added it to the light box group so that when it is clicked on, it will pull up the lightbox and be in the same "group" with the thumbnails. Not very elegant, but it works fine and you don't have to change any of the "core" code, only your skin code (viewProd.tpl). <a href="{IMG_SRC}" rel="lightbox[imageset]"><img src="{IMG_SRC}" alt="{TXT_PRODTITLE}" border="0" title="{TXT_PRODTITLE}" width="100px" /></a> So you see I added: rel="lightbox[imageset] to make it appear with the lightbox group and I added: width="100px" to match the size of my thumbnails. Your thumbnails maybe different. Hope this helps! Quote Link to comment Share on other sites More sharing options...
Guest philoye Posted October 9, 2007 Share Posted October 9, 2007 No not exactly, I simply added a width property to the big image to make it match the size of the thumbnails. I also added it to the light box group so that when it is clicked on, it will pull up the lightbox and be in the same "group" with the thumbnails. Not very elegant, but it works fine and you don't have to change any of the "core" code, only your skin code (viewProd.tpl). <a href="{IMG_SRC}" rel="lightbox[imageset]"><img src="{IMG_SRC}" alt="{TXT_PRODTITLE}" border="0" title="{TXT_PRODTITLE}" width="100px" /></a> So you see I added: rel="lightbox[imageset] to make it appear with the lightbox group and I added: width="100px" to match the size of my thumbnails. Your thumbnails maybe different. Hope this helps! It does, thanks! I like clean solutions that don't involve hacking core. Quote Link to comment Share on other sites More sharing options...
Guest kieran2 Posted October 18, 2007 Share Posted October 18, 2007 Solved this, see my post on ccf.org http://www.cubecartforums.org/index.php?sh...amp;#entry10248 It uses the correct thumbnail rather than resizing the full image Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.