Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Invoice sort


mennovg

Recommended Posts

Posted

Hi,

 

I would really like my invoice to be sorted by model nr instead of product name or order that customer added the product to the basket.

 

I have people picking the orders and the products are lined up by model nr.

 

PLEASE help me. I know this is a simple fix but I cannot find the correct file to edit.

 

Please help me out.

Thanx in advance :-)

 

I couldn't find it using the search... Only contribs regarding the catalog showed up. This is mainly an invoice issue...

Posted

in catalog/includes/classes/order.php

 

and

 

admin/includes/classes/order.php

 

 

Find the query similar to this:

 

$index = 0;

$orders_products_query = tep_db_query("select op.orders_products_id, p.products_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price, p.products_tax_class_id, p.products_weight, op.products_serial_number, op.products_software_key from " . TABLE_ORDERS_PRODUCTS . " op left join " . TABLE_PRODUCTS . " p on op.products_id = p.products_id where orders_id = '" . (int)$order_id . "' order by products_name ASC");

 

CHANGE THE LAST PIECE TO:

 

order by op.products_model ASC");

 

 

that will show by model number A to Z downwards listing.

Posted

SORRY .. IGNORE THE LAST POST .. has my stuff in it.

 

 

USE THIS:

 

in catalog/includes/classes/order.php

 

and

 

admin/includes/classes/order.php

 

 

Find the query similar to this:

 

$index = 0;

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

 

CHANGE IT TO:

 

$index = 0;

$orders_products_query = tep_db_query("select op.orders_products_id, p.products_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price, p.products_tax_class_id, p.products_weight from " . TABLE_ORDERS_PRODUCTS . " op left join " . TABLE_PRODUCTS . " p on op.products_id = p.products_id where orders_id = '" . (int)$order_id . "' order by op.products_model ASC");

 

 

that will show by model number A to Z downwards listing.

Archived

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

×
×
  • Create New...