[if !cgi mv_data_table] [calc] $CGI->{mv_data_table} = $Values->{mv_data_table} = $Config->{ProductFiles}[0]; return; [/calc] [/if] [comment] [if-mm function="!tables" table=`$Config->{ProductFiles}[0]`] [bounce page="__UI_BASE__/error"] [/if-mm] [/comment] [set ui_class]Merchandising[/set] [set page_title][L]Merchandising Editor[/L][/set] [set table_perm]1[/set] [set help_name]merchandising[/set] [set icon_name]icon_item.gif[/set] @_UI_STD_HEAD_@ [flag type=write table=merchandising] [perl tables="merchandising __UI_META_TABLE__"] my $db = $Db{merchandising}; my $date = $Tag->convert_date({ raw => 1 }); my $space = ' '; $Config->{Sub}{do_timed} = sub { my $code = shift; return unless $db->field($code, 'timed_promotion'); return if $date le $db->field($code, 'finish_date'); $db->set_field($code, 'featured', 'expired'); return; }; $Config->{Sub}{show_exp} = sub { my $code = shift; my $feature = $db->field($code, 'featured'); return $space if ! $feature; return $space if $feature =~ /^expire/; return 'future' if $db->field($code, 'start_date') gt $date; my $exp = $db->field($code, 'finish_date'); if($exp lt $date) { $db->set_field($code, 'featured', 'expired'); return $space; } return $Tag->convert_date( { fmt => '%d-%b', body => $exp }); }; return; [/perl] [output name=search_box] [form-session-id] [output name=""] [if cgi ui_text_qualification] [calc] return if $CGI->{mv_like_spec}; $Scratch->{page_banner} ||= $Scratch->{page_title}; $Scratch->{page_banner} .= errmsg( '-- entries containing "%s"', $CGI->{ui_text_qualification}, ); return; [/calc] [/if] [search-region more=1 arg=" [if cgi ui_text_qualification] se=[cgi ui_text_qualification] su=yes [else]ra=yes[/else][/if] [if cgi ui_sort_field] tf=[cgi ui_sort_field] to=[cgi ui_sort_option] [else] tf=description [/else] [/if] st=db sp=@@MV_PAGE@@ ml=__UI_SZ_LIST_MERCH__ "][on-match] [calc] my $so = $CGI->{ui_sort_option}; my $fld = $CGI->{ui_sort_field}; $fld =~ s/[\s,\0].*//; sub sortrev { my ($f, $n) = @_; my $out = 'ui_sort_option='; $out .= 'n' if $n; return $out unless ($fld eq $f) || ($f eq 'description'); return $out if $so =~ /r/; return $out . 'r'; } return; [/calc]

[page href=@@MV_PAGE@@ extra=rhead form=` return "ui_sort_field=sku\n" . sortrev('sku'); `][L]SKU[/L] | [page href=@@MV_PAGE@@ extra=rhead form=` return "ui_sort_field=description\n" . sortrev('description'); `][L]Description[/L] | [L]Qty pricing[/L] | [L]Up-sell[/L] | [L]Cross-sell[/L] | [L]Promotion[/L] |
[/on-match] [search-list]
[page href=__UI_BASE__/item_edit form=" ui_return_to=@@MV_PAGE@@ item_id=[item-code] "][item-code] | [filter 30][item-description][/filter] | [page href=__UI_BASE__/item_price form=" ui_return_to=@@MV_PAGE@@ merchandising=1 item_id=[item-code] "][if-item-data pricing sku][L]Yes[/L][else][L]No[/L][/else][/if-item-data] | [page href=__UI_BASE__/item_up form=" ui_return_to=@@MV_PAGE@@ merchandising=1 item_id=[item-code] "][if-item-data merchandising upsell_to][L]Yes[/L][else][L]No[/L][/else][/if-item-data] | [page href=__UI_BASE__/item_cross form=" ui_return_to=@@MV_PAGE@@ merchandising=1 item_id=[item-code] "][if-item-data merchandising cross_sell][L]Yes[/L][else][L]No[/L][/else][/if-item-data] | [page href=__UI_BASE__/item_feature form=" ui_return_to=@@MV_PAGE@@ merchandising=1 item_id=[item-code] "][if-item-data merchandising featured][item-exec do_timed][item-code][/item-exec][display table=merchandising column=featured type=display key="[item-code]"][else][L]none[/L][/else][/if-item-data] | [if-item-data merchandising timed_promotion][item-exec show_exp][item-code][/item-exec][else] [/else][/if-item-data]
[/search-list] [no-match]
[L]Nothing matched.[/L]
[/no-match]
[more-list]
[L]More items[/L]: [decade-next][/decade-next] [more] [decade-prev][/decade-prev]
[/more-list]

[/search-region] @_UI_STD_FOOTER_@