Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to display SKU (product model) in Orders.php


e_covert

Recommended Posts

I thought people might be interested in this little 'improvement' to 2.1. My client needed to know when looking at an order what the sku's were of the products, in order to fill the order. With a large quantity of products, just showing the description doesn't help fill an order. To that end, I implemented this little bit of code in admin/orders.php to show the sku. Pretty basic stuff....

 

change the line:

$products = tep_db_query("select orders_products_id, products_id,

products_name, products_price, products_quantity, final_price,

products_tax from orders_products where orders_id = '" .

$HTTP_GET_VARS['orders_id'] . "'");

 

to...

$products = tep_db_query("select o.orders_products_id, o.products_id,

o.products_name, o.products_price, o.products_quantity, o.final_price,

o.products_tax, p.products_model from orders_products AS o, products AS p where orders_id = '" . $HTTP_GET_VARS['orders_id'] . "' and

o.products_id=p.products_id");

 

and just below, change:

 

echo '<td nowrap><font face="' . TEXT_FONT_FACE . '" size="' . TEXT_FONT_SIZE . '" color="' . TEXT_FONT_COLOR . '"><b> ' . $products_values['products_name'] . ' </b>' . "n";

 

to...

echo '<td nowrap><font face="' . TEXT_FONT_FACE . '" size="' . TEXT_FONT_SIZE . '" color="' . TEXT_FONT_COLOR . '"><b> ' . $products_values['products_model'] . ' - '. $products_values['products_name'] . ' </b>' . "n";

 

This improvement applies to The Exchange Project Preview Release 2.1

 

Cheers!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...