[ic] UI and display of product images in UI::item edit page

Mike Heins mike at perusion.com
Fri Feb 18 11:27:40 EST 2005


Quoting Niels Svennekj??r (linux at post10.tele.dk):
> 
> >
> >Hi
> >I found this under Tables,Products,Select any product SKU, Standard 
> >View,Included Form.
> ><td class=clabel> Product images </td>
> ><td class=cdata>
> ><script>
> >function get_images (sku) {
> >              var path = '[var IMAGE_DIR]';
> >
> >              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';
> >      }
> ></script>
> >  <table id=images_table>
> >      <tr class=rmarq>
> >           <td>Image</td>
> >           <td>Thumb</td>
> >      </tr>
> >      <tr>
> >           <td><a href="javascript:mvpan_tripTab(2)">[image src="[var 
> >IMAGE_DIR]/items/[cgi item_id]\"  extra=\"border=0 id=item_img\"]<a></td>
> >           <td><a href="javascript:mvpan_tripTab(2)">[image src="[var 
> >IMAGE_DIR]/thumb/[cgi item_id]_b\" extra=\"border=0 
> >id=thumb_img\"]</a></td>
> >      </tr>
> >  </table>
> ></td> 
> 
> 
> Can anyone btw. tell  why the <script> get_image... is there, I cant 
> find any place where the code is called from.

That is/was triggered by a call in the "sku" field. The idea is that if
you have preloaded a bunch of images by SKU, and you create a new
item with a matching SKU, the images will appear on the page when
you type in the matching sku in the sku field.

I don't believe the current UI has the triggering call in it, but
you could run "grep -rl get_images CATDIR/*" and find where if
anyplace it is called.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

There's nothing sweeter than life nor more precious than time.
-- Barney


More information about the interchange-users mailing list