[ic] Brand Listing

Ronald Camilleri interchange-users@icdevgroup.org
Mon Aug 5 07:51:03 2002


Dear List,

I am working on a catalog running on interchange 4.8 and added a field
(brand) in the products table. Everything is working as should. My client
needs a list of the brands available in a particular area (selected).

First I make a search for the areas:

 [page brand]
        <b>Search for available brand names in</b>

                  <select name=search1>
                  [loop option=area search="
                        fi=area
                        sf=which_page
                        se=all
                        rf=code, name
                        tf=name
                        sp=brand
                   "]
        <option value = "[loop-data area name]" > [loop-data area name]
</option>
                  [/loop]
                  </select>
  areas.
[/page]


When the user select the area will be sent to the result page 'brand':

Brand Names found online for
[cgi mv_searchspec]

<br>
 [loop search="
                    fi=products
                    se=[cgi mv_searchspec]
                    sf=prod_group
                    rf=sku, brand
                    un=1
                    tf=brand
                    ml=1000
            "]
<option value="[loop-data products brand]"> [loop-data products brand]
</option>
 <br>
           [/loop]
<br>
<hr>
<br>
   <H3>Other Brand Names that we stock:</H3>
<br>
<table............

This code will list all brand names and not making the search with the
selected area name, I tried many different combinations to convert
mv_searchspec to a string from the information found online and in mailing
lists but with no success. Also I cannot figure out how to display only one
match when more than one brand of the same name is found.

Well done to all those who in some way or another helped in producing this
product.

Ronald Camilleri