[ic] Product image naming conventions

Mike Heins mike at perusion.com
Thu Aug 21 14:56:33 EDT 2003

Quoting Paul Vinciguerra (pvinci at vinciguerra.com):
> Working with the 20030820 daily build, I was having trouble viewing the 
> product images in the admin on the item edit page and discovered that only 
> images of the form (item|thumb)/<sku>.gif are displayed.
> I tracked this down to a routine in mv_metadata:
> function get_images (sku) {
>                 var path = '/docantiquiaren/images';
>                 var el;
>                 var divit = document.getElementById('images_table');
>                 divit.style.display= 'none';
>                 el = document.getElementById('thumb_img');
>                 el.src = path + '/thumb/' + sku + '_b.gif';
>                 el = document.getElementById('item_img');
>                 el.src = path + '/items/' + sku + '.gif';     
>                 divit.style.display= 'block';
>         }
> I think this needs to be brought inline with the metadata definition for the 
> images, but was wondering if going forward this was going to be a standard 
> naming convention/format for the product images or if this routine needs to 
> support the values of [image] and [thumb]?

The problem is that you can't get JavaScript to access the database for you,
so that if you change the sku the images won't show up. 

You can easily change that metadata definition to use the [data ...] tag
to set the initial image values. I think you also have to have the 
include_form_interpolate database metaconfig set to a true value.

Another option would be to cause that to call an IC page via an
IFRAME, one which would present an image.

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike at perusion.com>

I don't buy from direct telephone or email marketers.  This makes it
hard for me to find a phone company. ;>

More information about the interchange-users mailing list