[ic] Search Results w/ Buy List and order tag
Juergen R. Plasser
plasser at hexagon.at
Wed Sep 17 23:11:37 EDT 2003
I want to use the component "Search Results with Buy List" to
1. to put a quantity of items into the basket (batch or just one row
item, next page is the same results list)
2. to directly go to the basket with a quantity of one item (next page
is order basket)
Here is my code, the problem is, the first point works correctly, that
is processed by the original tag
<input type=image src="__THEME_IMG_DIR__basket.gif"
onClick="this.form.mv_oi[item-increment].value='[item-code]'" border=0>
but the second point just will not take the given quantity into account,
I used the following tags:
<input type=hidden name="mv_oi[item-increment]" value="">
[L]Quantity[/L]: <input type=text name=mv_order_quantity size=2 value="1">
[order [item-code]]<img src="__THEME_IMG_DIR__buynow.gif"
ALT="[item-description]" BORDER="0">[/order]
How can this be realized, maybe without the order tag? (sorry I am new
to interchange and still learning very much every day).
Thanx,
Jürgen
The Code (only relevant section)::
[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>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
[/on-match]
[search-list]
<!-- here we go with our own table -->
<tr>
<td rowspan="3">[if-item-field image]<div class="prodimage"><A
HREF="[area [item-code]]"><img src="items/[item-field image]"
ALT="[item-description]" BORDER="0"></A>[/if-item-field]</div></td>
<td valign="top" width="1">
[if explicit]
[condition]
$inc = '[item-increment]';
return 0 if ($inc % 10) == 1;
return 1;
[/condition]
<img src="__THEME_IMG_DIR__linevert.gif" alt="" height="32"
width="1" align="bottom" border="0">
[/if]
</td>
<td rowspan="3" width="50%"><INPUT TYPE=hidden NAME="mv_order_item"
VALUE="[item-code]"><div class="prodtitle"><a href="[area
[item-code]]">[item-description]</a></div>
<div class="proddesc">[item-field comment]</div></td>
<td valign="top" width="1">
[if explicit]
[condition]
$inc = '[item-increment]';
return 0 if ($inc % 10) == 1;
return 1;
[/condition]
<img src="__THEME_IMG_DIR__linevert.gif" alt="" height="32"
width="1" align="bottom" border="0">
[/if]
</td>
<td rowspan="3"><div class="prodprice">Bestpreis</div>
<div class="prodprice2">[item-price]</div>
<div class="prodbuttons">
<input type=hidden name="mv_oi[item-increment]"
value="">[L]Quantity[/L]: <input type=text name=mv_order_quantity size=2
value="1">
[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__warenkorb.gif"
onClick="this.form.mv_oi[item-increment].value='[item-code]'" border=0>
<A HREF="[area [item-code]]"><img src="__THEME_IMG_DIR__info.gif"
ALT="[item-description]" BORDER="0"></A>
[order [item-code]]<img src="__THEME_IMG_DIR__buynow.gif"
ALT="[item-description]" BORDER="0">[/order]
[/else]
[/if]
</div>
</td>
</tr>
<tr>
<td width="1"></td>
<td width="1"></td>
</tr>
<tr>
<td valign="bottom" width="1"><img src="__THEME_IMG_DIR__linevert.gif"
alt="" height="32" width="1" align="bottom" border="0"></td>
<td valign="bottom" width="1"><img src="__THEME_IMG_DIR__linevert.gif"
alt="" height="32" width="1" align="bottom" border="0"></td>
</tr>
<tr height="1">
<td colspan="5" bgcolor="#fcbe97" height="1"></td>
</tr>
<!-- here we end with our own table -->
[/search-list]
[on-match]
</table>
<!-- <div align=right style="width:95%;"><br><INPUT TYPE=submit
VALUE="[L]Buy List[/L]"></div> -->
<div align=right style="width:95%;"><br><input type=image
src="__THEME_IMG_DIR__warenkorb.gif" border=0></div>
</FORM>
[/on-match]
More information about the interchange-users
mailing list