Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Short Product Summary In Admin...


Austin519

Recommended Posts

Thought I would just put this out for anyone interested...I just added a little tiny snippet to my admin/orders.php file to allow me to see a summary of the products ordered (rather than having to click twice on an order and see the full layout). Not sure if anyone wants it or if there's something better, but it works for me:

 

In orders.php, find:

        $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . tep_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . tep_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>');
       $contents[] = array('text' => '<br>' . TEXT_DATE_ORDER_CREATED . ' ' . tep_date_short($oInfo->date_purchased));

 

Wherever you want to display the product summary insert the lines below after a line beginning with $contents[]... I wanted mine at the bottom which I think most will, so insert it after:

        $contents[] = array('text' => '<br>' . TEXT_INFO_PAYMENT_METHOD . ' '  . $oInfo->payment_method);

 

The following lines:

//Order Summary - Austin519   
       $order = new order($oID);
  $contents[] = array('align' => 'center', 'text' => '<br>--= Order Summary =--');
       for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
           $contents [] = array('text' => $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name']);
  }

 

Enjoy. It would be relatively easy to code in an "order summary" button that pops that up, but I wanted mine to always show...hence no need.

 

Austin519

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...