Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Jul 2007
    Posts
    22
    Plugin Contributions
    0

    Default Product sort order on invoice

    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.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Product sort order on invoice

    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!

  3. #3
    Join Date
    Jul 2007
    Posts
    22
    Plugin Contributions
    0

    Default Re: Product sort order on invoice

    So you are telling me that the products are listed by the order the costumer puts them into the cart?

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Product sort order on invoice

    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!

  5. #5
    Join Date
    Apr 2005
    Posts
    34
    Plugin Contributions
    0

    Default Re: Product sort order on invoice

    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

    Code:
     $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";
    Let me know if I'm on the right track

    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

  6. #6
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Product sort order on invoice

    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
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	OrderPlacedOrder.png 
Views:	322 
Size:	8.8 KB 
ID:	4356   Click image for larger version. 

Name:	OrdersShowUpInAdmin.jpg 
Views:	309 
Size:	19.7 KB 
ID:	4357  

  7. #7
    Join Date
    Jan 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Product sort order on invoice

    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");

  8. #8
    Join Date
    Jan 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Product sort order on invoice

    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");

  9. #9
    Join Date
    Dec 2006
    Posts
    87
    Plugin Contributions
    0

    Default Re: Product sort order on invoice

    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.

  10. #10
    Join Date
    Jan 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Product sort order on invoice

    \admin\includes\classes\order.php

    this is the original code:

    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 orders_products_id");
    change
    Code:
    order by orders_products_id
    to
    Code:
    order by products_model

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Product listing/Product prev-next sort order mismatch
    By lat9 in forum Bug Reports
    Replies: 0
    Last Post: 12 May 2015, 02:50 PM
  2. v151 Product Sort within Category - having problems changing the default sort order
    By Don Wagner in forum Customization from the Admin
    Replies: 4
    Last Post: 21 Oct 2012, 03:03 AM
  3. Product Sort Order only sorts Alphabetically, not by the order assigned.
    By webooks in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 12 Nov 2009, 05:19 PM
  4. Changing the sort order of the Products on the super invoice + packing slip
    By DisgruntledGeorge in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 14 Nov 2007, 12:24 PM
  5. Attributes sort order for invoice/packing slip
    By aeolidia in forum Managing Customers and Orders
    Replies: 6
    Last Post: 8 Nov 2006, 11:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR