Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add Field to Invoice


Guest

Recommended Posts

Hi Guys

 

I'm having problems getting the invoice and packing slip to display an additional field from the products table. I have inserted a field called "author" into the products table and have it displaying everywhere else. But i can't get it to display on the invoice. Can anyone help me out?

 

Thanks

Link to comment
Share on other sites

Hi Burt

 

Yeah i tried that

 

admin/includes/classes/order.php

--------------------------------------

$index = 0;

$orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_author, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

while ($orders_products = tep_db_fetch_array($orders_products_query)) {

$this->products[$index] = array('qty' => $orders_products['products_quantity'],

'name' => $orders_products['products_name'],

'model' => $orders_products['products_model'],

'author' => $orders_products['products_author'],

'tax' => $orders_products['products_tax'],

'price' => $orders_products['products_price'],

'final_price' => $orders_products['final_price']);

 

$subindex = 0;

------------------------------------------------

 

And the i called it in admin/invoice.php

 

<?php

for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {

echo ' <tr class="dataTableRow">' . "\n" .

' <td class="dataTableContent" valign="top" align="left">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .

' <td class="dataTableContent" valign="top" align="left">' . $order->products[$i]['name'] . '  <br>Author: ' . $order->$products[$i]['author'];

------------------------------------------------

 

Any ideas what i have done wrong???

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...