Mailing List Archive

showing items in order reports
I have modified the order reports to include some new reports, including
'pending orders. 'shipped orders', and 'canceled orders'.

During the report generation, I have added an items field and would like
for the first 4 items of each order be looked up from orderline and
placed into the table data for that field.

Example

HCPZ55305
<https://huldaclarkparazapper.com/cgi-bin/cart.cgi/admin/order_view?order=HCPZ55305&id=du6akAKs&mv_pc=123>
petz_UZI
Sunny Keala, HI 20180221 04:02:49 $300.70 pending

would become
HCPZ55305
<https://huldaclarkparazapper.com/cgi-bin/cart.cgi/admin/order_view?order=HCPZ55305&id=du6akAKs&mv_pc=123>
petz_UZI pz30050
pz00008
pz00019m
Sunny Keala, HI 20180221 04:02:49 $300.70 pending




Any suggestions on how to accomplish this. I have tried several
different ways of looking it up from orderline but none have worked so far.
showing items in order reports [ In reply to ]
Still not able to add items into report:

from pending.html


________________________

[perl tables="store orderline"]
    my $mary;
    $line->{items}="..";
    return <<EOF unless $mary = $Tmp->{main};
    <TR class=rnorm>
    <TD VALIGN=top>
    <H2>Bad query specified, caused error.</H2>
    </TD>
EOF
    $out = '';

    my $skustring = '';

    my $skudisplay = '';

    if(my $qary = $Tmp->{qual}) {

        $skustring = '&sku=';
        my @skus = split /[\s,\0]+/, $CGI->{sku};
        $skustring .= join('&sku=', @skus);
        $skudisplay = join(', ', @skus);
        $line->{items} = $skudisplay; # show skus

- - - - - - - - - - - - - - -  extra omitted



    foreach $line (@$mary) {
        if ( $line->{status} eq 'pending') {  ### pending orders only



        my $items = $line->{items};
        $total_sales    += $line->{total_cost};
        $amount = $Tag->currency({}, $line->{total_cost});
            $line->{status} = $Tag->loc('', $line->{status});

        $url = $Tag->area({     href => '__UI_BASE__/order_view',
                    form => "order=$line->{order_number}", });


        $out .= <<EOF;

    <TR class=rnorm BORDER=4>
    <TD VALIGN=top>
    <A HREF="$url">$line->{order_number}</A>
    </TD>
    <TD VALIGN=top>
    $line->{affiliate}&nbsp;
    </TD>

    <TD VALIGN=top>

    $line->{items} .. $items<!-- -->
    </TD>


____________________________

The problem is that while the .. is being displayed, I am not showing
any items.



_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users