[comment] ui_template: Yes ui_template_name: leftonly ui_template_layout: LEFTONLY_TOP, UI_CONTENT, LEFTONLY_BOTTOM ui_template_description: Page with top/left areas. page_title: description: Page title page_banner: description: Page banner help: Defaults to page title members_only: options: 1=Yes,0=No* widget: radio description: Members only component_before: options: =none, specials=Specials, random=Random items widget: select description: Component before content component_after: options: =none, specials=Specials, random=Random items widget: select description: Component after content bgcolor: options: #FFFFFF=White,pink=Pink widget: select description: Background color [/comment] [set page_title]__COMPANY__ -- Returns[/set] [set page_banner]Returns[/set] __LEFTONLY_TOP__

Please select an order below to continue with the return process.

[query st=db arrayref=orders sql="SELECT code,status,nitems,subtotal,shipping,handling,total_cost,payment_method,order_date FROM transactions WHERE username = '[data base=session field=username filter=sql]' ORDER by code "][/query] [mvasp tables=transactions] <% my $uid = $Session->{username}; if (! $uid) { $Document->write ("

You are not logged in.

"); return; } my $orders = $Tmp->{orders}; if(! $orders or scalar @$orders == 0) { $Document->write( "No pending orders for $uid."); return; } HTML ""; my $header_template = <<'EOF'; EOF my $line_template = <<'EOF'; EOF my %hash; my @fields = qw/order_number status nitems subtotal shipping handling total_cost payment_method order_date/; my $row; my %summary; my $first; my $record; HTML $header_template; foreach $record (@$orders) { my $line = $line_template; @hash{@fields} = @$record; $hash{detail_url} = $Tag->area( { href => 'query/order_return', arg => $hash{order_number}, }); if($hash{status} =~ /\d/) { my @ids = grep /\S/, split /\s+/, $hash{status}; $hash{status} = ''; for(@ids) { $hash{status} .= <UPS $_ EOF } } else { $hash{status} = <currency ({ body=> $hash{$_} }); } if($hash{handling}) { $hash{handling} = "
(handling " . $Tag->currency ({ body=> $hash{handling} }) . ")"; } else { $hash{handling} = ''; } $line =~ s/\$(\w+)/$hash{$1}/g; HTML $line; } HTML "
ORDER ID DATE TOTAL STATUS
$order_number $order_date $total_cost $status
"; %> [/mvasp]
[seti export][tag export transactions transactions.txt][/tag][/seti] [seti export][tag export orderline orderline.txt][/tag][/seti] __LEFTONLY_BOTTOM__