News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Order history list, use order detail on the list page

Started by Kuubs, April 25, 2017, 00:06:08 AM

Previous topic - Next topic

Kuubs

Hello,

I try to change the list.php in the orders virtuemart view so that I can display a order detail value in the table.

Now you can work with a $row object which you get from a foreach loop in the list.php file:

foreach ($this->orderlist as $row) {
         $editlink = JRoute::_('index.php?option=com_virtuemart&view=orders&layout=details&order_number=' . $row->order_number, FALSE);
         
         //$orderdetails = $row['details']['BT']->order_number;
         //print_r($this);
         ?>

         <tr class="<?php echo "row$k"; ?>">
            <td align="left">
               <a href="<?php echo $editlink; ?>" rel="nofollow"><?php echo $row->order_number; ?></a>
               <?php echo shopFunctionsF::getInvoiceDownloadButton($row) ?>
            </td>
            <td align="left">
               <?php //secho shopFunctionsF::getOrderStatusName($row->order_status); ?>
            </td>
            <td align="left">
               <?php echo vmJsApi::date($row->created_on,'LC4',true); ?>
            </td>
            <td align="left">
               <?php echo $this->currency->priceDisplay($row->order_total, $row->currency); ?>
            </td>
         </tr>
   <?php
         $k = 1 - $k;
      }


Now in this object you have limited fields, like city, name or price but not the specific field I require.

If I open the details page from the order the field is displayed, but is there a possibility to get these fields based on order number? Because I can get the order number via the $row->order_number string.

Kuubs

Nobody has a clue?

I have the order number, is it possible to query the database for the order details? I can extract the purhcase order from that.