[prev in list] [next in list] [prev in thread] [next in thread] 

List:       interchange-users
Subject:    [ic] Sorting depending on a part of a field
From:       "goetz () verdieck ! de" <goetz () verdieck ! de>
Date:       2005-01-27 20:59:03
Message-ID: BE1F14A7.352A7%goetz () verdieck ! de
[Download RAW message or body]

Hi list,


I try to sort a list depending on a part of the content of a field.
The content of the field named feature_list is for example:
Schnittstelle: ATA/ Kapazität: 60 GB/ 5400 rpm/ Cache: 8 MB/KB/ Formfaktor:
2,5 "

So I want a drop down list with entries:
Schnittstelle,Kapazität,Cache,Formfaktor

I know how to extract the values ATA 60 8 2,5

For example with a part for extracting the number for "Kapazität":
[set item_sku][item-code][/set]
        [perl table=products code=[item-code]]
          my $feature_item = "Kapazit&auml;t";
          my $feature_field = "ARTIKEL2";
          my $code_item = $Scratch->{item_sku};
          # wenn field_inhalt[$i] Kapazität speichern
          my $tmpl= $Tag->data('products', $feature_field, $code_item);
          if ($tmpl =~ m/Kapazit&auml;t: (\d+) GB/g) {
            $tmpl =$1;
             return $tmpl;}else{
             return "-";
          }
        [/perl]


The part for the drop down menu part is like:
......
<select name=sort_field onChange="this.form.submit()">
[loop acclist=1
list="manu_name=Hersteller,price=Preis,ARTIKEL2=Kapazit&auml;t"]
<option value="[loop-code]" [selected name=sort_field
value="[loop-code]"]>[loop-param label]
[/loop]
</select>
<input type=submit value="Sortieren">
</form>
</td>
</tr>
</table>

[search-region more=1
            search="
                fi=products
                st=db
                co=1
                sf=prod_group
                se=Festplatten
                op=eq
                nu=0
                sf=category
                se=[value category]
                ml=25
                tf=[value sort_field]    # should be a selected part of
ARTIKEL2
                "
]

But how can I put the things together ?

I hope I could make my problem clear.

Thanks for hints  or a push in the right direction.

Götz Verdieck









_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic