[interchange-cvs] interchange - ton modified 4 files
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Sat Nov 30 09:17:00 2002
User: ton
Date: 2002-11-30 14:16:22 GMT
Modified: dist/foundation/pages results.html results_big.html
Added: dist/foundation/templates/components results_buylist
Added: results_big
Log:
Added Results page selection via component.
Components:
* results_buylist - replaces the default results.html page
* results_big - replaces the results_big.html page
Component Grid Results will follow soon.
Revision Changes Path
1.1 interchange/dist/foundation/templates/components/results_buylist
rev 1.1, prev_rev 1.0
Index: results_buylist
===================================================================
[comment]
ui_component: results_buylist
ui_type: component
ui_name: results_buylist
ui_class: content
ui_group: search
ui_help: This is the default results page with Buy List.
ui_label: Search Results with Buy List
ui_source: templates/components/results_buylist
[/comment]
<!-- BEGIN COMPONENT [control component results_buylist] -->
<br>
[if scratch did_order]
[include file="templates/components/cart_display"]
<br>
[/if]
[set did_order][/set]
[search-region]
[seti results_return_to][history-scan exclude=nothing count=0][/seti]
[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="[scratch results_return_to]"]
[/set]
[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="95%" border="0" cellspacing="0" cellpadding="3">
<tr class="contentbar2">
<td><b> 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>
[/on-match]
[search-list]
[item-change 1][condition][item-field category][/condition]
<tr class="contentbar1">
<td colspan="6"> [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>Yes</b></font>
EOF
}
else {
return <<EOF;
<a href="[area stock-alert [item-code]]"><b>No</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]
[on-match]
</table>
<div align=right style="width:95%;"><br><INPUT TYPE=submit VALUE="Buy List"></div>
</FORM>
[/on-match]
[no-match]
<BR><BR>
<BLOCKQUOTE>
[comment]
Don't show the search string if it was empty, since it looks weird
and the user will see the error below anyway.
[/comment]
[tmp matchstring][value-extended name=mv_searchspec joiner=" | "][/tmp]
[if scratch matchstring]
Sorry, no matches for <B>[scratch matchstring]</B>.
[/if]
[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>
<!-- END COMPONENT [control component results_buylist] -->
1.1 interchange/dist/foundation/templates/components/results_big
rev 1.1, prev_rev 1.0
Index: results_big
===================================================================
[comment]
ui_name: results_big
ui_type: component
ui_class: content
ui_group: search
ui_label: Search Results with image
ui_help: This is the old results_big page.
[/comment]
<!-- BEGIN COMPONENT [control component results_big] -->
[search-region]
[search-list]
[item-change 1][condition][item-field category][/condition]
<br>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>[either][value banner_text][or][item-field category][/either]</b></td>
</tr>
</table>
[/item-change 1]
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr valign="middle">
<td align=center>
<table border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td valign="top" align="center">
<table width="25%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>[if-item-field image]<A HREF="[area [item-code]]"><img src="items/[item-field image]" ALT="[item-description]" BORDER="0"></A>[/if-item-field]</td>
</tr>
</table>
</td>
<td valign="top" align="center">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td valign="top">
<b><i>[item-description]</i></b>
</td>
</tr>
<tr>
<td align="center">[item-price]</td>
</tr>
<tr>
<td align="center"> </td>
</tr>
[item-calc]
my $q = q{[item-data inventory quantity]};
if($q > 0) {
return <<EOF;
<tr>
<td align="center">
<b>In Stock</b>
</td>
</tr>
EOF
}
else {
return <<EOF;
<tr>
<td align="center">
<b>Out Of Stock</b>
<br><br>
<a href="[area stock-alert [item-code]]">In Stock Notification</a>
</td>
</tr>
EOF
}
[/item-calc]
<tr>
<td align="center"> </td>
</tr>
[if-item-data options o_modular]
<tr>
<td align="center" colspan=2>
[page [item-code]]Custom configure and buy</a>
</td>
</tr>
[else]
<FORM ACTION="[process]" METHOD=POST>
<input type=hidden name=mv_session_id value="[data session id]">
<INPUT TYPE=hidden NAME="mv_todo" VALUE="refresh">
<INPUT TYPE=hidden NAME="mv_order_item" VALUE="[item-code]">
<tr>
<td align="center">
Quantity:
<input type="text" name="mv_order_quantity" size="4" value="1">
</td>
</tr>
<tr>
<td align="center">
<input type="submit" value="Buy it Now!">
</td>
</tr>
</FORM>
[/else]
[/if-item-data]
</table>
</td>
</tr>
<tr>
<td colspan="2">
[item-field comment__MVC_FIELDMUNGE__]
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
[/search-list]
[no-match]
<BR><BR>
<BLOCKQUOTE>
Sorry, no matches for <B>[value-extended name=mv_searchspec joiner=" | "]
</B>.
[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]
<!-- END COMPONENT [control component results_big] -->
2.5 +19 -174 interchange/dist/foundation/pages/results.html
rev 2.5, prev_rev 2.4
Index: results.html
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/pages/results.html,v
retrieving revision 2.4
retrieving revision 2.5
diff -u -r2.4 -r2.5
--- results.html 26 Oct 2002 15:48:38 -0000 2.4
+++ results.html 30 Nov 2002 14:16:22 -0000 2.5
@@ -1,201 +1,46 @@
[comment]
+ui_page: results.html
+ui_type: page
+ui_name: results.html
+ui_page_template: leftright
+ui_version: 4.9.3
+ui_source: pages/results.html
ui_template: Yes
ui_template_name: leftright
[/comment]
[tmp page_title]__COMPANY__ -- Search results[/tmp]
+[tmpn members_only][/tmpn]
[control reset=1]
-
[control-set]
-[component]search_box_small[/component]
+ [component]search_box_small[/component]
[/control-set]
-
[control-set]
-[component]category_vertical[/component]
+ [component]category_vertical[/component]
[/control-set]
-
[control-set]
-[component][/component]
+ [component][/component]
[/control-set]
-
[control-set]
-[component][/component]
+ [component]results_buylist[/component]
[/control-set]
-
[control-set]
-[component]cross[/component]
-[size]2[/size]
-[cols]2[/cols]
-[banner]Also see...[/banner]
+ [component]cross[/component]
+ [banner]Also see...[/banner]
+ [cols]2[/cols]
+ [size]2[/size]
[/control-set]
-
[control-set]
-[component]random[/component]
-[size]3[/size]
-[cols]1[/cols]
-[banner]Specials[/banner]
+ [component]random[/component]
+ [banner]Specials[/banner]
+ [cols]1[/cols]
+ [size]3[/size]
[/control-set]
-
[control reset=1]
@_LEFTRIGHT_TOP_@
-
<!-- BEGIN CONTENT -->
-<br>
-
-[if scratch did_order]
-[include file="templates/components/cart_display"]
-<br>
-[/if]
-[set did_order][/set]
-[search-region]
-[seti results_return_to][history-scan exclude=nothing count=0][/seti]
-[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="[scratch results_return_to]"]
-[/set]
-
-<br>
-
-[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> 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>
-
-[search-list]
-
-[item-change 1][condition][item-field category][/condition]
-
-<tr class="contentbar1">
- <td colspan="6"> [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>Yes</b></font>
-EOF
- }
- else {
- return <<EOF;
-<a href="[area stock-alert [item-code]]"><b>No</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"> </div>
-</FORM>
-[/on-match]
-
-[no-match]
-<BR><BR>
-<BLOCKQUOTE>
-[comment]
- Don't show the search string if it was empty, since it looks weird
- and the user will see the error below anyway.
-[/comment]
-[tmp matchstring][value-extended name=mv_searchspec joiner=" | "][/tmp]
-[if scratch matchstring]
-Sorry, no matches for <B>[scratch matchstring]</B>.
-[/if]
-[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>
-
<!-- END CONTENT -->
-
@_LEFTRIGHT_BOTTOM_@
2.4 +20 -161 interchange/dist/foundation/pages/results_big.html
rev 2.4, prev_rev 2.3
Index: results_big.html
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/pages/results_big.html,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -r2.3 -r2.4
--- results_big.html 1 May 2002 20:55:47 -0000 2.3
+++ results_big.html 30 Nov 2002 14:16:22 -0000 2.4
@@ -1,188 +1,47 @@
[comment]
+ui_page: results_b.html
+ui_type: page
+ui_name: results_b.html
+ui_page_template: leftright
+ui_version: 4.9.3
+ui_source: pages/results_b.html
ui_template: Yes
ui_template_name: leftright
[/comment]
[tmp page_title]__COMPANY__ -- Search results[/tmp]
+[tmpn members_only][/tmpn]
[control reset=1]
-
[control-set]
-[component]search_box_small[/component]
+ [component]search_box_small[/component]
[/control-set]
-
[control-set]
-[component]category_vertical[/component]
+ [component]category_vertical[/component]
[/control-set]
-
[control-set]
-[component][/component]
+ [component][/component]
[/control-set]
-
[control-set]
-[component][/component]
+ [component]results_big[/component]
[/control-set]
-
[control-set]
-[component]cross[/component]
-[size]2[/size]
-[cols]2[/cols]
-[banner]Also see...[/banner]
+ [component]cross[/component]
+ [banner]Also see...[/banner]
+ [cols]2[/cols]
+ [size]2[/size]
[/control-set]
-
[control-set]
-[component]promo[/component]
-[size]3[/size]
-[cols]1[/cols]
-[banner]Specials[/banner]
-[promo_type]specials[/promo_type]
+ [component]promo[/component]
+ [banner]Specials[/banner]
+ [cols]1[/cols]
+ [promo_type]specials[/promo_type]
+ [size]3[/size]
[/control-set]
-
[control reset=1]
@_LEFTRIGHT_TOP_@
-
<!-- BEGIN CONTENT -->
-[search-region]
-
-[search-list]
-
-[item-change 1][condition][item-field category][/condition]
-<table border="0" cellspacing="0" cellpadding="0">
-<tr>
- <td><b>[either][value banner_text][or][item-field category][/either]</b></td>
-</tr>
-</table>
-[/item-change 1]
-
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="middle">
- <td align=center>
-
- <table border="0" cellspacing="0" cellpadding="3" align="center">
- <tr>
- <td valign="top" align="center">
- <table width="25%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>[if-item-field image]<A HREF="[area [item-code]]"><img src="items/[item-field image]" ALT="[item-description]" BORDER="0"></A>[/if-item-field]</td>
- </tr>
- </table>
- </td>
- <td valign="top" align="center">
- <table border="0" cellpadding="3" cellspacing="0">
- <tr>
- <td valign="top">
- <b><i>[item-description]</i></b>
- </td>
- </tr>
- <tr>
- <td align="center">[item-price]</td>
- </tr>
- <tr>
- <td align="center"> </td>
- </tr>
-
-[item-calc]
- my $q = q{[item-data inventory quantity]};
- if($q > 0) {
- return <<EOF;
- <tr>
- <td align="center">
- <b>In Stock</b>
- </td>
- </tr>
-EOF
- }
- else {
- return <<EOF;
- <tr>
- <td align="center">
- <b>Out Of Stock</b>
- <br><br>
- <a href="[area stock-alert [item-code]]">In Stock Notification</a>
- </td>
- </tr>
-EOF
- }
-[/item-calc]
- <tr>
- <td align="center"> </td>
- </tr>
-[if-item-data options o_modular]
- <tr>
- <td align="center" colspan=2>
- [page [item-code]]Custom configure and buy</a>
- </td>
- </tr>
-[else]
-<FORM ACTION="[process]" METHOD=POST>
-<input type=hidden name=mv_session_id value="[data session id]">
-<INPUT TYPE=hidden NAME="mv_todo" VALUE="refresh">
-<INPUT TYPE=hidden NAME="mv_order_item" VALUE="[item-code]">
- <tr>
- <td align="center">
- Quantity:
- <input type="text" name="mv_order_quantity" size="4" value="1">
- </td>
- </tr>
- <tr>
- <td align="center">
- <input type="submit" value="Buy it Now!">
- </td>
- </tr>
-</FORM>
-[/else]
-[/if-item-data]
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- [item-field comment__MVC_FIELDMUNGE__]
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-
-<br>
-
-[/search-list]
-
-[no-match]
-
-<BR><BR>
-<BLOCKQUOTE>
-Sorry, no matches for <B>[value-extended name=mv_searchspec joiner=" | "]
-</B>.
-
-[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]
-
<!-- END CONTENT -->
-
@_LEFTRIGHT_BOTTOM_@