[ic] re: results.html

Raymond Miecznik interchange-users@interchange.redhat.com
Fri Mar 29 06:34:01 2002


thanks for all the responses, but I am confused as to where I put that thumb
code in the source of results.html  I've pasted it here...

the dir.. where my thumbs are located are:

/home/cart/store/foundation/images/thumb

so what would the path be ? the full path ?

this is what I am going to insert:

<a href="[area [item-code]]"><img src="thumb/[item-code].jpg" border="0">
<br></a><a href="[area [item-code]]">[item-description]</a>

and this is the current contents of results.html:

<br>

[if scratch did_order]
[include file="templates/components/cart_display"]
[/if]
[set did_order][/set]
[search-region]
[set munge_quantity]
[calc]
    $Scratch->{did_order} = 1;
    @q = split /\0/, $CGI->{mv_order_quantity};
    for (@q) {
        next unless length $_;
        $_ = "=$_";
    }
    @parms = grep /^mv_oi\d+/ && $CGI->{$_}, keys %{$CGI};

    # If we have parms, means an individual buy. If we don't
    # we want to strip empty items
    unless (@parms) {
        @i = split "\0", $CGI->{mv_order_item};
        for(my $i = 0; $i < @i; $i++) {
            next if length($q[$i]);
            $i[$i] = '';
        }
        @i = grep length($_), @i;
        @q = grep length($_), @q;
        $CGI_array->{mv_order_quantity} = \@q;
        $CGI->{mv_order_quantity} = join "\0", @q;
        $CGI_array->{mv_order_item} = \@i;
        $CGI->{mv_order_item} = join "\0", @i;
        return;
    }
    my $item = $parms[0];
    $item =~ /(\d+)/ or return;
    my $idx = $1;
    $idx--;
    $CGI->{mv_order_item} = $CGI->{$item};
    $CGI->{mv_order_quantity} = "$q[$idx]";
    return;
[/calc]
    [bounce href="[history-scan exclude=nothing]"]
[/set]
[tmp cross_sale][value-extended name=mv_searchspec index=0][/tmp]

[on-match]
<FORM ACTION="[area nothing]" METHOD=POST>
<input type=hidden name=mv_session_id value="[data session id]">
<INPUT TYPE=hidden  NAME="mv_action" VALUE="refresh">
<INPUT TYPE=hidden  NAME="mv_separate_items"  VALUE="0">
<INPUT TYPE=hidden  NAME="mv_click" VALUE="munge_quantity">
[/on-match]

<table width="90%" border="0" cellspacing="0" cellpadding="3">
<tr class="contentbar2">
  <td><b>&nbsp;Product</b></td>
  <td align="center"><b>SKU</b></td>
  <td align="center"><b>Stock</b></td>
  <td align="center"><b>Price</b></td>
  <td align="center"><b>Qty</b></td>
  <td align="center"><b>Buy</b></td>
</tr>
<tr>
  <td colspan="6">&nbsp;</td>
</tr>

[search-list]

[item-change 1][condition][item-field category][/condition]

<tr class="contentbar1">
  <td colspan="6">&nbsp;[either][value banner_text][or][item-field
category][/either]</td>
</tr>

[/item-change 1]
                   
<tr valign="middle">
      <td>
    <INPUT TYPE=hidden  NAME="mv_order_item"  VALUE="[item-code]">
    <a href="[area [item-code]]">[item-description]</a>
      </td>
      <td align="center">[item-code]</td>
      <td align="center">
    [item-calc]
    my $q = q{[item-data inventory quantity]};
    if($q > 0) {
        return <<EOF;
<font __FFACE__ size="1" color="#008000"><b>Y</b></font>
EOF
    }
    else {
        return <<EOF;
<a href="[area stock-alert [item-code]]"><b>N</b></a>
EOF
    }
[/item-calc]
      </td>
      <td align="center">[item-price]</td>
      <td align="center"><input type=hidden name="mv_oi[item-increment]"
value=""><input type=text name=mv_order_quantity size=2 value=""></td>
      <td align="center">
          [if session browser =~ /mac/]
            <input type=submit value="[L]Buy now[/L]"
onClick="this.form.mv_oi[item-increment].value='[item-code]'" border=0>
        [else]
            <input type=image src="__THEME_IMG_DIR__buynow.gif"
onClick="this.form.mv_oi[item-increment].value='[item-code]'" border=0>
        [/else]
        [/if]
            </td>
</tr>
                   
[/search-list]

</table>

[on-match]
<div align=right><br><INPUT TYPE=submit VALUE="Buy
List">&nbsp;&nbsp;&nbsp;</div>
</FORM>
[/on-match]

[no-match]
<BR><BR>
<BLOCKQUOTE>
Sorry, no matches for <B>[calc]
            my $joiner = ' AND ';
            $joiner = ' OR ' if
                    defined $Search->{''}->{mv_orsearch}[0]
                    and $Search->{''}->{mv_orsearch}[0];
            my @str = grep /\D/, @{$Values->{mv_searchspec}};
            return join $joiner, @str;
            [/calc]
[if value mv_search_error]
<P>
<B>
Errors:
<BR> 
[value-extended name=mv_search_error joiner="<BR>"]
</B>
[/if]

<BR><BR>
</BLOCKQUOTE>
[/no-match]
<BR CLEAR=LEFT>
[more-list]
<BLOCKQUOTE>
Matches [matches] of [match-count] found.
<BR>[more]<BR>
</BLOCKQUOTE>
[/more-list]

[/search-region]

<br>