Hi I need to figure out if there is any way to get the product list on the invoice to be sorted after module name or product number.
Hi I need to figure out if there is any way to get the product list on the invoice to be sorted after module name or product number.
The current method is to have all products added to the cart in the method the customer sees it ...
Then from the checkout to the email to the account history to the order all match in this same method ...
To change the display in the order for the Admin that would then not match the customer's order ... you would have to customize the order class and include an order by based on what you are wanting to see ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
So you are telling me that the products are listed by the order the costumer puts them into the cart?
Yes ... if you look at the shopping_cart, then the checkout_confirmation, then the account_history_info, then the emails, then the orders ... you will find them in the same order ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Hi Ajeh
Just a follow on question. I would like to have the products on the invoice and/or packing slip sorted by the model number so I can use a prefix on the model number to determine packing order.
I gather from what you have said that I need to edit the file /includes/classes/order.php and add an order by to the query that gathers the product information
Let me know if I'm on the right trackCode:$orders_products_query = "select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, onetime_charges, products_priced_by_attribute, product_is_free, products_discount_type, products_discount_type_from from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by products_model";
Cheers
Siege
Servant of the LORD.
Ask, and it will be given to you
Seek, and you will find;
Knock, and it will be opened to you...
Matthew 7:7
Hi For some reason the "invoice" and "admin backend details" gets all messed up with the orders... I think It trys to alphabetize the products, but it just puts a few here and there at random. I have not changed the coding yet.
See attachments
how about this:
$orders_products = $db->Execute("select orders_products_id, products_id, products_name, products_model,
products_price, products_tax, products_quantity,
final_price, onetime_charges,
product_is_free
from " . TABLE_ORDERS_PRODUCTS . "
where orders_id = '" . (int)$order_id . "'
order by products_model");
how about changing (not adding) it to:
Code:$orders_products = $db->Execute("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, onetime_charges, product_is_free from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by products_model");
Thanks for the reply. But Where is this code file at? Can you be a little more specific as to change this to this in this file.
Thank you Again.
\admin\includes\classes\order.php
this is the original code:
changeCode:$orders_products = $db->Execute("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, onetime_charges, product_is_free from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by orders_products_id");toCode:order by orders_products_idCode:order by products_model
Bookmarks