First of all these 2 mods are really must haves.
I know a lot of people are using these two mods, but we still have the problem to combine these 2 mods perfectly with each other.
The problem is that the detailed image loads the uploaded full sized image instead of the TelaFirma's cached thumbnail.
It would be perfect if it would load the detailed cached files, instead of resizing the thumbnail with the thickbox files (blurry images).
Thanks to Ranger82nd for making the wonderful start.
Here are part of the files and codes which needs to be edited:
skin1/customer/main/product.tpl
First part: Original x-cart code
Second part: Uncommented TelaFirma's code
Third part: Adjusted Thickbox code
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"}*}
{* New Dynamic Image Mod - TelaFirma *}
{if $product.tmbn_url}
{math equation="(z/(y/x))+65" y=$product.image_x x=$config.Appearance.popup_image_width z=$product.image_y assign="p_y" format="%.d"}
<a href="javascript:void(0);" onClick="window.open('{$xcart_web_dir}/thumb_popup.php?productid={$product.productid}','mywindow','width={$config.Appearance.popup_image_width},height={$p_y}')">
{/if}
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$config.Appearance.product_image_width product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" class="NoBorder" alt=$product.product|escape}{if $product.tmbn_url}</a>{/if}
{if $images[0].imageid ne""}
<br>
{include file="modules/Detailed_Product_Images/product_images_detail.tpl"}
{/if}
{* /New Dynamic Image Mod - TelaFirma *}
{* Begin Thickbox *}
{*{if $product.tmbn_url}
<a href="{$product.tmbn_url}" title="{$product.product|escape}" class="thickbox" rel="[detailed]">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$config.Appearance.product_image_width product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" alt=$product.product|escape}
{if $product.tmbn_url}<div align="center" class="SmallText">+ Click to Enlarge</div></a>{/if}
{/if}
<br>
{if $images[0].imageid ne""}
{include file="thickbox/thickbox_productpage.tpl" }
{/if}*}
{* /End Thickbox *}
skin1/thickbox/thickbox_productpage.tpl
(adjusted to TelaFirma's mod)
Code:
{if $images ne ""}
<div style="white-space:nowrap;color:#D90000;font-weight:bold;padding:2px;margin:10px 0 4px;">{$lng.lbl_detailed_images} <img src="{$SkinDir}/thickbox/files/zoom.gif" style="border:0;" alt="{$lng.lbl_enlarge|escape}" /></div>
{section name=image loop=$images}
{if $images[image].avail eq "Y"}
{if $images[image].tmbn_url}
<a href="{$images[image].tmbn_url}" title="{$images[image].alt|escape}" class="thickbox" rel="[detailed]">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$config.Appearance.dthumb_image_width product=$product.product tmbn_url=$images[image].tmbn_url alt=$images[image].alt|escape}</a>
{/if}
{/if}
{/section}
{/if}
skin1/modules/Detailed_Product_Images/
(original TelaFirma's detailed image code)
Code:
{strip}
{* Repeat Thumbnail as first detail image Thumb *}
{math equation="(z/(y/x))+65" y=$product.image_x x=$config.Appearance.popup_image_width z=$product.image_y assign="p_y" format="%.d"}
<a href="javascript:void(0);" onClick="window.open('{$xcart_web_dir}/thumb_popup.php?productid={$product.productid}','mywindow','width={$config.Appearance.popup_image_width},height={$p_y}')">
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$config.Appearance.dthumb_image_width product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" hint="true" class="Thumbnail" alt=$product.product|escape}</a>
{* Repeat Thumbnail End *}
{section name=image loop=$images}
{if $images[image].avail eq "Y"}
{if $images[image].tmbn_url}
{math equation="(z/(y/x))+65" y=$images[image].image_x x=$config.Appearance.popup_image_width z=$images[image].image_y assign="p_y" format="%.d"}
<a href="javascript:void(0)" onclick="window.open('{$xcart_web_dir}/product_images_popup.php?id={$images[image].imageid}','mywindow','width={$config.Appearance.popup_image_width},height={$p_y}')">
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$config.Appearance.dthumb_image_width product=$product.product tmbn_url=$images[image].tmbn_url class="Thumbnail" alt=$images[image].alt|escape}
</a>{if !$smarty.section.image.last} {/if}
{/if}
{/if}
{/section}
{/strip}
Official Thickbox Package by 7Dana:
http://www.7dana.com/106.84.0.0.1.0.phtml
The changes needs to be made in the code of the thickbox files. Unfortunately with my limited code knowledge I can't figure it out.
Some help is really appreciated.
Thanks