Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Lazy way around product option images

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 06-19-2005, 06:35 PM
 
extreme extreme is offline
 

Member
  
Join Date: Jun 2005
Posts: 28
 

Default Lazy way around product option images

In a perfect world I wanted my product images to update depending on the product option chosen (ie. 250g would show a 250g jar, 1kg would show a 1kg jar.)

Unfortunately I don't have the time or skills to implement that so here's a cheap and nasty way around it.

I have just changed the detailed product images module a little so that now I have a product option images list. Now on the product detail screen it shows a list of the available sizes and their images. It doesn't link to anything, and it's probably a bit of a double up as you have to enter the options in the product options section and then again in the description for each image but at least now I have pictures for each option!

Change modules\detailed_product_images\product_images.tpl from this:

Code:
{* $Id: product_images.tpl,v 1.10.2.1 2004/05/18 06:23:01 mclap Exp $ *} {if $images ne ""} {capture name=dialog} <div align=center> {section name=image loop=$images} {if $images[image].avail eq "Y"} {if $images[image].tmbn_url} [img]{$images[image].tmbn_url}[/img] {else} [img]{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}[/img] {/if} {/if} {/section} </div> {/capture} {if $smarty.capture.dialog ne ""} {include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra="width=100%"} {/if} {/if}

To this:

Code:
{* $Id: product_images.tpl,v 1.10.2.1 2004/05/18 06:23:01 mclap Exp $ *} {if $images ne ""} {capture name=dialog} <div align=left><table border=0 width=100% cellpadding=0 cellspacing=0> {section name=image loop=$images} <tr><td width=30%> {if $images[image].avail eq "Y"} {if $images[image].tmbn_url} [img]{$images[image].tmbn_url}[/img] {else} [img]{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}[/img] {/if}</td> <td valign=top>{$images[image].alt}</td> </tr> {/if} {/section} </table> </div> {/capture} {if $smarty.capture.dialog ne ""} {include file="dialog.tpl" title=$lng.lbl_detailed_images content=$smarty.capture.dialog extra="width=100%"} {/if} {/if}

Change the lbl_detailed_images label from "Detailed images" to "Product option images"

Change the two occurances of "Alternativetext" in modules\detailed_product_images\product_images_mod ify.tpl to "Description"

In main\product_modify.tpl, change 'title="Detailed images"' to 'title="Product option images"' (down the bottom)
__________________
X-Cart version 4.1.10 (upgraded painfully from 4.0.18.)
Reply With Quote
  #2  
Old 06-20-2005, 04:58 AM
 
Online Michael Online Michael is offline
 

eXpert
  
Join Date: Mar 2005
Location: Melbourne, Australia
Posts: 273
 

Default

Is it possible to see this in action anywhere?
__________________
X-Cart 5.3.5.4
Reply With Quote
  #3  
Old 06-20-2005, 03:27 PM
 
extreme extreme is offline
 

Member
  
Join Date: Jun 2005
Posts: 28
 

Default

You'll have to excuse my dodgy product images; I haven't been given any real ones yet. You get the idea though.


http://www.denco.com.au/home/screenshot.jpg
__________________
X-Cart version 4.1.10 (upgraded painfully from 4.0.18.)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:31 PM.

   

 
X-Cart forums © 2001-2020