Revision 777

Date:
2019/05/07 09:43:31
Author:
ahitrov
Revision Log:
Get with items

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/webshop/comps/contenido/webshop/components/order_list.msn

     
    5 5 input.text { border:1px solid gray; }
    6 6
    7 7 </style>
    8 % if ( @basket ) {
    8 % if ( @$basket ) {
    9 9 <form action="recount.html" method="post">
    10 10 <table width="100%" border="0" cellpadding="4" cellspacing="0" class="tlistdocs" bgcolor="white">
    11 11 <tr bgcolor="#efefef">
     
    20 20 <th>Сумма</th>
    21 21 </tr>
    22 22
    23 % foreach my $obj ( @basket ) {
    23 % foreach my $obj ( @$basket ) {
    24 24 % $total_num += $obj->number;
    25 25 % $total_sum += $obj->number * $obj->price;
    26 26 <tr><td>\
     
    31 31 % }
    32 32 </td>
    33 33 <td><% $obj->articul %></td>
    34 <td><% $obj->ext_id %></td>
    34 <td><% exists $obj->{item} ? $obj->{item}->ext_id : '' %></td>
    35 35 <td><a href="/contenido/document.html?class=<% $obj->class %>&id=<% $obj->id %>" target="_blank"><% $obj->name %></a></td>
    36 36 <td><% $obj->colour || '&nbsp;' %></td>
    37 37 <td><% $obj->size || '&nbsp;' %></td>
     
    107 107 <%init>
    108 108
    109 109 return unless ref $order;
    110 my @basket = $keeper->get_documents(
    111 class => 'webshop::Basket',
    112 status => 1,
    113 order_id => $order->id,
    114 );
    110 my $basket = $keeper->{webshop}->get_basket(
    111 order_id => $order->id,
    112 status => 1,
    113 with_products => 1,
    114 ) // [];
    115 115 my $total_sum = 0;
    116 116 my $total_num = 0;
    117 117