[ic] Catalog page...

Loy Ellen Gross design@iinc.com
Mon, 27 Nov 2000 11:49:50 -0500 (EST)

On Wed, 22 Nov 2000, Paul Stearns wrote:

>Display 3 by 3 thumbnails (9 thumbnails per page) with description from the cat
>file. There are about 30 categories. Which would obviously take multiple
>When the user clicks on the thumbnail I need to display an image with the
>description, followed by the products and prices which match the category., ala
>the results page. I have the descriptions in the long field of the products.

Warning: I'm not the greatest mv/ic programmer there ever was, so
I'm sure this could be done better, but it does display three across
using multiple files, so I'm sure you could use it as a starting point.

[tag flag build][value mv_searchspec][/tag]

<H2 ALIGN="center">[value mv_searchspec]</H2>

[search-region send=1]

<H4>Matches [matches]
[if value mv_search_match_count > 1]
  of [value mv_search_match_count] found.

[comment] these calc areas are probably what you're looking for [/comment]
[comment] they work together to print a balanced 3-across table [/comment]
  $inc = 1;
  return '';

  [on-change 1]
  [condition][item-data categories subcategory][/condition]

    <P ALIGN="center"><B><FONT COLOR="__HEADERTEXT__">
      [item-data categories subcategory]</FONT></B></P>
  [/on-change 1]

  [comment] start a new table row at zero and every third item [/comment]
    return '<TR VALIGN="top" ALIGN="center">' if ($inc % 3) == 1;
    return '';
    [comment] this scan is through products, passing in some [/comment]
    [comment] vars from the current db (categories) so we don't [/comment]
    [comment] have to look them up yet again [/comment]
    <A HREF="[area scan/dl=[item-code]/di=pageid/ml=99/sp=flyresults/va=in=[item-data categories image]/va=vn=[item-data categories vendor]]">
      [if file /www/hosts/obiesails/catalogimages/[item-data categories thumbnail]]
        <IMG SRC="[item-data categories thumbnail]" WIDTH=100 HEIGHT=100
        HSPACE=3 VSPACE=3 BORDER=1 BORDERCOLOR="#000000" ALIGN="top"
        ALT="[item-data categories pagetitle]"><BR>
      [item-data categories pagetitle]<BR>
  [comment] end the row every third item [/comment]
    return '</TR>' unless ($inc++ % 3);
    return '';
[comment] outside the search list, this finishes off the last row [/comment]
[comment] if products return is not divisible by three - I use [/comment]
[comment] this as a true results page - have no idea how many [/comment]
[comment] will be returned [/comment]
  return '</TR>' if ($inc % 3);
  return '';

<FONT SIZE="-1" FACE="arial,helvetica">Matches [matches] of
[if value mv_search_match_count > 1]
    [value mv_search_match_count] titles found.
<B>Links to more matches:</B><BR>

<P ALIGN="center">Sorry, no matches for <B>[value mv_searchspec]</B>.</P>


Cheers, Loy

"Any language where the unassuming word "fly" signifies an annoying insect, 
	a means of travel, and a critical part of a gentleman's apparel 
		is clearly asking to be mangled." -- Bill Bryson

    Loy Ellen Gross * Web Designer & Programmer * Xcalibur Internet
          716-344-1114 * design@iinc.com * http://www.iinc.com
      Xcalibur Internet is part of the BiznessOnline.com Network