Results 1 to 6 of 6
  1. #1

    Default Sort items by model name on the order page.

    When I go to admin/customers/orders and then choose an order and then edit it or click invoice, I would like it to sort the items by the module name. I can't seem to sort them by anything nor does it appear to be sorted in any specific order.

    How would I make it display the model name in apha numeric order?

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

    Default Re: Sort items by model name on the order page.

    You can customize the order class in the Admin around line 115 and change the order by to use the module:
    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");
    try using:
    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, orders_products_id");
    and see if that gives the results that you are looking for ...
    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!]
    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

    Default Re: Sort items by model name on the order page.

    In the admin? Do you mean admin.php?

  4. #4

    Default Re: Sort items by model name on the order page.

    I went to admin/orders.php and did not find this code. I am using zencart version 1.3.9g. What file am I supposed to change?

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

    Default Re: Sort items by model name on the order page.

    This is in the order class file in:
    /your_secret_admin_dir/includes/classes/order.php
    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!]
    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!

  6. #6

    Default Re: Sort items by model name on the order page.

    That appears to have done the trick. THANK YOU.

 

 

Similar Threads

  1. Product sort order in "All Products..." page by model
    By corrado444 in forum Basic Configuration
    Replies: 18
    Last Post: 24 May 2011, 05:00 PM
  2. Change the sort order on the checkout_payment page
    By gearheadniko in forum General Questions
    Replies: 2
    Last Post: 23 Nov 2010, 08:52 PM
  3. Replies: 4
    Last Post: 18 Sep 2009, 11:05 PM
  4. can you control the sort order of the featured products on the front page
    By George Susini in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Apr 2009, 08:05 PM
  5. Model sort order checkout page
    By jasmel in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 18 Nov 2008, 03:18 AM

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