[ic] display product thumbnail pics..

Paul Jordan interchange-users@interchange.redhat.com
Thu Mar 28 14:10:00 2002


> >
> > Try to input these code on your results.html
> >
> > <a href="[area [item-code]]"><img src="thumb/[item-field
> > thumb]" border="0"><br></a><a href="[area [item-code]]">[item-
> > description]</a>
> >
> > instead of just
> >
> > <a href="[area [item-code]]">[item-description]</a>
> >
> > undee
>
> Actually I would suggest that you create a blank image for
> products which don't have a picture and then do this:
>
> <a href="[area [item-code]]"><img src="thumb/[if-item-field
>  thumb][item-field thumb][else]none.jpg[/else][/if]" border="0">
>  <br></a><a href="[area [item-code]]">[item-description]</a>
>


If you are sure that you are going to have thumbs and images, like I am, I
cut down on db entry and go:

<a href="[area [item-code]]"><img src="__THUMB_DIR__/[item-code].jpg"
border="0"><br></a><a href="[area [item-code]]">[item-description]</a>

my regular images are called by __ITEM_DIR__/[item-code].jpg

This only works if you are positive you will have the same extension for
each type of image, so make all thumbs .gif, or .jpg. Make all you item pics
.gif or .jpg.

This cuts down on database entry alot, for all you need is the sku -
[item-code]

If you run into a item that doesn't have a thumb, just copy your blank thumb
image and name it the sku#.

edit variable.txt to add __THUMB_DIR__ and __ITEM_DIR__

Paul