View Single Post
  #7  
Old 08-26-2008, 10:36 AM
  coppercup's Avatar 
coppercup coppercup is offline
 

Senior Member
  
Join Date: Mar 2007
Location: Oklahoma
Posts: 117
 

Default Re: free Dynamic Images module released

I have been playing with this mod and it does not appear to deal with variant images. If you have a primary product image, but also have variant images, the default variant image will override the primary product image on the product page and it will not be resized (at least by default).

I have figured out a simple mod to keep the primary product image from being replaced by the variant image, either by default or upon selection of a different variant from the corresponding variant popup.

Now I'm trying to figure out how to simply display thumbnails of all the variant images directly on the product page (leaving the primary product image as the main image), and I'd like to use the Dynamic Images mod to automatically size the thumbnails. I've managed to create a template that loops through the variants and accesses their images:

Code:
{* $Id: customer_tn_options.tpl,v 1.24 2008/08/25 05:19:21 svowl Exp $ *} {if $variants ne ''} <table width="100%" class="variant-thumbnails"> {foreach from=$variants item=v key=k} {if $v.options ne ''} <tr><td colspan="2" class="{$tdClass}"> <a href="{$product.tmbn_url}" title="{$product.product|escape}" rel="lytebox[detailed]"><img src="{thumb file="/image.php?type=W&id=$k" width=168 link=false hint=false get_image_path=true}" id="product_thumbnail" class="thumb" alt="{$product.product|escape} Photo" /></a> </td></tr> {/if} {/foreach} </table> {/if}

I've placed an include for this code in the product.tpl just below the product details. This code displays the variant images, but at full size.

The smarty "thumb" directive is attempting to call on the Dynamic Images mod to resize the variant images, but the mod expects a the URL path to the image as a string and I'm using the image.php method of referencing the images. I can't figure out how to reference them by URL.

If anybody knows how to do this, I'm very anxious to get this figured out.

Thanks!
Fritz
__________________
Happy coding!
Fritz
x-cart 4.1.10

Copper Cup Images Print, Web & Multimedia Design
www.coppercupimages.com
Reply With Quote