Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / adding more pictures and lightbox issues.

adding more pictures and lightbox issues.

Locked

Views: 1,213

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
18 May 2009, 10:23 AM
#1
zvenson avatar

zvenson

New Zenner

Join Date:
May 2009
Posts:
61
Plugin Contributions:
0

adding more pictures and lightbox issues.

Hi!
I need some help over here:
I`m using zj silver template and zen cart 1.3.8
which has the nice lightbox effekt for the main produkt image - i want to add more images for every item and managed how to do that following this tutorial:

https://www.zen-cart.com/tutorials/index.php?article=58

now i want that the images don`t show in the carousel thing at the bottom, but be displayed underneath the main product image.

I figured that out as well putting this instead of the normal "main product image call" to my

tpl_product_info_display.php

<!--beginning of images wrapper--> <div id="productImageWrapper"> <!--bof Main Product Image --> <?php if (zen_not_null($products_image)) { ?> <?php /** * display the main product image */ require($template->get_template_dir('/tpl_modules_main_product_jquery_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_jquery_image.php'); ?> <?php } ?> <!--eof Main Product Image--> <br class="clearBoth" /> <!--bof Additional Product Images --> <?php /** * display the products additional images */ require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?> <!--eof Additional Product Images --> </div>

now everything is working fine, but the newly added images dont have the nice styling and the lightbox doesnt appear when the images are clicked.
I know that i probably have to alter the tpl_modules_additional_images.php file but could`t figure out how to add this to every image:

class="fancy" rel="imageset
can anyone help me with this? Would be very very nice
Thank you!

19 May 2009, 11:09 AM
#2
zvenson avatar

zvenson

New Zenner

Join Date:
May 2009
Posts:
61
Plugin Contributions:
0

Re: adding more pictures and lightbox issues.

well i figured it out - but i think that there could be a more beautiful solution - i post mine solution here, but looking forward to get any improvements:

i updated /includes/modules/additional_images.php

somewhere at line 92 - search for:
// Link Preparation:

and change the link with the javascrip popupWindow call to something like this:

$script_link = '<div style="width:150px;background-color:#eee;padding-top:5px;padding-bottom:5px;border-style:solid;border-width:1px;border-color:#ddd;"' . '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href=" ' . $products_image_large . '" class="fancy" rel="imageset"> ' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';