I can't believe it. I got lightbox to work on attribute images, and include them in the gallery. I still can't believe I did it, but it works!!!!

I located this file:

includes/modules/MY_TEMPLATE/attributes.php

I took a snippet of code from "Attribute Pop-Ups" add-on:
Code:
					//find large size attribute images. Location must be in /images/large and image name must be image_LRG.ext Mike Scott 070606				
					$array_filename = split("[/\\.]", $products_options->fields['attributes_image']) ;
					$filename = $array_filename[count($array_filename)-2];
					$extension = '.'.$array_filename[count($array_filename)-1];
					$filename = $filename.'_LRG';
					$path = DIR_WS_IMAGES . 'large/attributes/';
					$attribute_image_lrg = $path . $filename. $extension;
					$selected_attrname = $products_options_names->fields['products_options_name'] . ': '.$products_options->fields['products_options_values_name'];
I pasted it into attributes.php around line 481 immediately following this line of code:

Code:
                      //              if ($tmp_attributes_image_row > PRODUCTS_IMAGES_ATTRIBUTES_PER_ROW) {
                      if ($tmp_attributes_image_row > $products_options_names->fields['products_options_images_per_row']) {
                        $tmp_attributes_image .= '<br class="clearBoth" />' . "\n";
                        $tmp_attributes_image_row = 1;
                      }
I then modified the following line:

Code:
                      $tmp_attributes_image .= '<div class="attribImg">' . zen_image(DIR_WS_IMAGES . $products_options->fields['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' ? '<br />' . $products_options->fields['products_options_values_name'] : '') . '</div>' . "\n";
to look like this:

Code:
$tmp_attributes_image .= '<div class="attribImg"><a href="' . $attribute_image_lrg . '" rel="lightbox[gallery]">' . zen_image(DIR_WS_IMAGES . $products_options->fields['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' ? '<br />' . $products_options->fields['products_options_values_name'] : '') . '</a></div>' . "\n";
Be sure to have your large attribute images in the "images/large/attributes/" folder, with _LRG as the extension like normal, and it works!

I am just offering this for what it is, something that worked for me. I had installed the latest 138a cart, and the latest Zen Lightbox and the attributes pop-up code came from its latest version. You should work with the attributes.php file in the YOURTEMPLATE folder so that you can just delete it to uninstall this solution.



Kristin