I have been living with this mod now for 2 days and it is a home run. Fantastic.
Thank you, Goran for bringing this to us.
I have been trying to figure out how to improve this -- I want to make it so that clicking on the thumbnail image opens up the thickbox, image #1. I am REAL CLOSE to figuring this out, but I am obviously missing one (essential) concept.
So far, I have done the following:
1. enabled Detailed Product Images options (4.1 admin settings) - and then changed this code in product.tpl:
Code:
{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'}
{* comment out the include for the stock popup_image.tpl *}
{* {include file="modules/Detailed_Product_Images/popup_image.tpl"} *}
{* then add the include for thickbox *}
{include file="thickbox/thickbox_productpage.tpl" }
{else}
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"} {/if}
2. OK, so far so good... then I copied this code from the no longer in use, modules/Detailed_Product_Images/popup_image.tpl:
Code:
<a href="javascript: void(0);" onclick="javascript: popup_image('D', '{$product.productid}', '{$max_x}', '{$max_y}', '{$product.product|escape:"url"}');">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}</a>
This is the code that displays the thumbnail, and there is js to call the OLD detailed popup image.
3. I pasted this code at the top of thickbox_productpage.tpl (in its own table) -- and then removed:
Code:
<a href="javascript: void(0);" onclick="javascript: popup_image('D', '{$product.productid}', '{$max_x}', '{$max_y}', '{$product.product|escape:"url"}');">
and
</a>
SO, now the thumbnail appears, but we need a way to call on thickbox.
I tried simply copying the code from later down in thickbox:
Code:
<a href="{$xcart_web_dir}/image.php?id={$images[image].imageid}&type=D" title="{$images[image].alt|escape}" class="thickbox" rel="[detailed]">
and
</a>
and insert it around:
Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}
But that only called the thickbox, but did not load the desired image.
I AM SO FREAKING CLOSE TO FIGURING THIS OUT...
Anyone who actually knows what they are doing want to chime in and set me straight?
Thanks!!!!!!!!!
Jeremy