[comment] ui_template: Yes ui_template_name: leftonly [/comment] [tmp page_title]__COMPANY__ -- [L]Welcome[/L][/tmp] [control reset=1] [control-set] [component]search_box_small[/component] [/control-set] [control-set] [component]cart_tiny[/component] [/control-set] [control-set] [component]product_tree[/component] [/control-set] [control reset=1] [tmpn members_only]1[/tmpn] [set page_banner][L]Saved Carts[/L] / [L]Recurring Orders[/L][/set] [set page_title]__COMPANY__ -- [L]Saved Carts[/L] / [L]Recurring Orders[/L][/set] @_LEFTONLY_TOP_@ [if cgi delete_cart] [delete_cart nickname="[cgi delete_cart]"] [/if] [if cgi retrieve_cart] [load_cart nickname="[cgi retrieve_cart]"] [/if] [userdb function=get_cart_names hide=1] [if value carts] [calc] $Scratch->{saved_carts_carts} = ''; $Scratch->{saved_carts_recurring} = ''; push(@Vend::TmpScratch,qw/saved_carts_carts saved_carts_recurring/); foreach my $var (split("\n",$Tag->value('carts'))) { my($name,$last_update,$type) = split(':',$var); my $delink = $Tag->page({ href => "@@MV_PAGE@@", form => " delete_cart=$var mv_action=return ", }); my $golink = $Tag->page({ href => "ord/basket", form => " retrieve_cart=$var mv_action=return ", }); $last_update = $Tag->time({time => $last_update, format => '%B %e, %Y %H:%M'}); my $row = <<"END";
$delink $golink$name $last_update
END if($type eq 'c') { $Scratch->{saved_carts_carts} .= $row; } elsif($type eq 'r') { $Scratch->{saved_carts_recurring} .= $row; } } return ''; [/calc] [/if] [loop list="saved_carts_carts saved_carts_recurring"] [if explicit] [condition]'[loop-code]' eq 'saved_carts_carts'[/condition] [tmp this_label][L]Saved Carts[/L][/tmp] [/if] [if explicit] [condition]'[loop-code]' eq 'saved_carts_recurring'[/condition] [tmp this_label][L]Recurring Orders[/L][/tmp] [/if] [if scratch [loop-code]]

[scratch this_label]
| [L]Name[/L] | [L]Modified[/L]
[scratch [loop-code]]

[else] [msg arg.0="[scratch this_label]"]No %s entered.[/msg]
[/else] [/if] [/loop] @_LEFTONLY_BOTTOM_@