[comment] ui_template: Yes ui_template_name: leftonly [/comment] [tmp members_only]1[/tmp] [tmp page_title]__COMPANY__ -- [L]Returns[/L][/tmp] [control reset=1] [control-set] [component]search_box_small[/component] [/control-set] [control-set] [component]product_tree[/component] [/control-set] [control-set] [component]cart_tiny[/component] [/control-set] [control reset=1] @_LEFTONLY_TOP_@ [if session arg] [seti arg][data session arg][/seti] [else] [bounce page=member/returns] [/else] [/if] [value name=test_user set="[data table=transactions col=username key='[scratch arg]' ]" hide=1] [if type=explicit compare=` return 1 if ! $Values->{test_user} or ! $Session->{username}; return 0 if $Session->{username} eq $Values->{test_user}; return 1; `] [bounce page=member/returns] [/if] [seti order_status][data table=transactions column=status key='[scratch arg]'][/seti] [if scratch order_status eq shipped]

[L ORDER_RETURN_PAR1]Please verify the information below and select the items you wish to return by checking the corresponding checkboxes and modifying the quantity as needed.[/L]

[loop list="[scratch arg]"]

[html-table fr='class="contentbar1"'] [L]ORDER NUMBER[/L] [scratch arg] [L]Order Date[/L] [loop-data transactions order_date] [/html-table]

[perl products userdb] sub get_download { my $sku = shift; return '' unless tag_data('products', 'download', $sku); my $loc = tag_data('products', 'dl_location', $sku); my $save = delete $Scratch->{mv_add_dot_html}; my $url = $Tag->area( { href => "deliver/$loc", arg => $sku } ); $Scratch->{mv_add_dot_html} = $save if $save; return qq{
}; } return; [/perl] [value name=return_items set='' hide=1] [form-session-id] [html-table interpolate=1 td="VALIGN=TOP"] [L]Return[/L] [L]Qty[/L] [L]SKU[/L] [L]Description[/L]
[L]Price[/L]
[L]Extension[/L] [query list=1 st=db sql=| SELECT * FROM orderline WHERE order_number = '[scratch arg]' ORDER BY code | ] [sql-param sku] [description [sql-param sku]]
[if-sql-data orderline size][L]SIZE[/L]-->[sql-param size][/if-sql-data][if-sql-data orderline color] [L]COLOR[/L]-->[sql-param color][/if-sql-data][calc] return unless q{[userdb function=check_file_acl mode=expire location="[sql-param sku]"]}; return get_download(q{[sql-param sku]}); [/calc]
[currency][sql-param price][/currency]
[currency][sql-param subtotal][/currency] [/query] [/html-table]

[L]Contact Information[/L] |
[error name=fname std_label="[L]Company[/L]" required=1] |
[error name=fname std_label="[L]First Name[/L]" required=1] |
[error name=lname std_label="[L]Last Name[/L]" required=1] |
[error name=email std_label="[L]Email Address[/L]" required=1] |
[error name=phone_day std_label="[L]Daytime Phone[/L]" required=1] |
[L]Evening Phone[/L] |
| [html-table interpolate=1 td="VALIGN=TOP"]
[L]Subtotal[/L]:
[currency][loop-data transactions subtotal][/currency]
[L]Sales Tax[/L]:
[currency][loop-data transactions salestax][/currency]
[L]Shipping[/L]:
[currency][loop-data transactions shipping][/currency]
[L]Order Total[/L]:
[currency][loop-data transactions total_cost][/currency] [/html-table]

[/loop] [else] [L]You may only return items from orders that have been fully shipped.[/L] [msg arg.0="" arg.1=""]Please contact %sCustomer Service%s for assistance.[/msg] [/else] [/if]
@_LEFTONLY_BOTTOM_@