[ic] Table editor in admin order_status and flex_editor showing two
order_number fields
Tim Good
tim.g at edsd.com
Mon Apr 4 01:46:06 EDT 2005
I am not sure if this is meant to be or perhaps it is in
something
I am doing. In case it is a bug I am submitting to group:
Interchange v. 5.3.1-200503210658 from CVS
when in order_status page the orderline section is
showing two order number fields. eg:
code order_number order_number sku quantity price status
00025-7 00002 00002 foo foo foo foo
>From order_status:
[table-editor
table=transactions
key="[cgi order]"
output_map=1
button_delete=1
form-name=tform
table-width="100%"
next-text="[L]Update status[/L]"
ok-button-style="font-weight: normal; font-size:
smaller"
no-table-meta=1
mv-nextpage="__UI_BASE__/order"
ui_data_fields="code status tracking_number order_id
auth_code archived deleted"
include-form="[scratch form_include]"
include-before="order_id"
widget.code=hidden_text
help.order_id='<span style="font-size:
larger;font-weight: bold">* = [L]settled[/L], - =
[L]voided[/L]</span>'
link-table=orderline
link-key=order_number
link-fields="order_number sku quantity price status"
link-before=order_id
link-no-blank=1
link-label="[L]Ordered Items[/L]"
hidden.ui_sequence_destination="@@MV_PAGE@@"
/]
I could not find documention on "link_view" or the format
of returned fields in linked table so I revied the Editor.pm
file and drew the following solution:
(not sure of line # ... I know lame/lazy but search for line
below)
++ = change
#::logDebug("In link table routines...");
my @ltable;
my @lfields;
my @lkey;
my @lview;
my @llab;
my @ltpl;
my @lnb;
my @lrq;
my @lra;
++ my @lord;
my @lrb;
my @lba;
my @lbefore;
my @lsort;
my $tcount = 1;
if(ref($opt->{link_table}) eq 'ARRAY') {
@ltable = @{$opt->{link_table}};
@lfields = @{$opt->{link_fields}};
@lview = @{$opt->{link_view}};
@lkey = @{$opt->{link_key}};
@llab = @{$opt->{link_label}};
@ltpl = @{$opt->{link_template}};
@lnb = @{$opt->{link_no_blank}};
@lrq = @{$opt->{link_row_qual}};
@lra =
@{$opt->{link_auto_number}};
++ @lord =
@{$opt->{link_order_view}};
@lrb =
@{$opt->{link_rows_blank}};
@lba =
@{$opt->{link_blank_auto}};
@lbefore = @{$opt->{link_before}};
@lsort = @{$opt->{link_sort}};
}
else {
@ltable = $opt->{link_table};
@lfields = $opt->{link_fields};
@lview = $opt->{link_view};
@lkey = $opt->{link_key};
@llab = $opt->{link_label};
@ltpl = $opt->{link_template};
@lnb = $opt->{link_no_blank};
@lrq = $opt->{link_row_qual};
@lra = $opt->{link_auto_number};
++ @lord = $opt->{link_order_view};
@lrb = $opt->{link_rows_blank};
@lba = $opt->{link_blank_auto};
@lbefore = $opt->{link_before};
@lsort = $opt->{link_sort};
}
while(my $lt = shift @ltable) {
my $lf = shift @lfields;
my $lv = shift @lview;
my $lk = shift @lkey;
my $ll = shift @llab;
my $lb = shift @lbefore;
my $lnb = shift @lnb;
my $ls = shift @lsort;
my $lrq = shift @lrq;
my $lra = shift @lra;
++ my $lord = shift @lord;
my $lrb = shift @lrb;
my $lba = shift @lba;
if($lord) {
push @lout, $Tag->row_edit({ table => $lt, columns =>
"$lf" });
}
else {
push @lout, $Tag->row_edit({ table => $lt, columns =>
"$lk $lf" });
}
Now when you pass [table_editor link_order_view=1/] I get
only one
order_number. If anyone could direct me to info on
"link_view" or
using views in the table_editor I would really appreciate
it. I would
like to possibly remove the code field in the link table
altogether.
Tim Good
More information about the interchange-users
mailing list