Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2005
    Posts
    174
    Plugin Contributions
    0

    Default Attributes sort order for invoice/packing slip

    I've recently noticed that on the Orders, Invoice, and Packing Slip pages in the admin, the product attributes seem to be in a random order.

    Is there a way to adjust these pages so the attributes use the sort order specified in the Attributes Controller?

    It's a problem for my client because her attributes are paired, and it's confusing to create the product when these attributes are out of order.

    Example:

    1 x Mommy Tags Bracelet
    - Second Child Name: joe smith (+$7.50)
    - Main Tag Birthdate: 08/19/03
    - Main Tag Child Name: josephine smith
    - Second Child Birthdate: 06/08/06

    We would like to see these in order, like so:

    1 x Mommy Tags Bracelet
    - Main Tag Child Name: josephine smith
    - Main Tag Birthdate: 08/19/03
    - Second Child Name: joe smith (+$7.50)
    - Second Child Birthdate: 06/08/06

    I've looked at invoice.php and packingslip.php files, but am not sure how (or if) this is being sorted.

    Any tips on how to make this change?

    This is for a 1.2.7 site.

    Code:
          if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
            for ($j=0, $k=sizeof($order->products[$i]['attributes']); $j<$k; $j++) {
              echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
              echo '</i></small></nobr>';
            }
          }
    Thanks in advance for any advice or code!

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

    Default Re: Attributes sort order for invoice/packing slip

    Do all Option Names, Option Values and Attributes have sort orders set?
    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
    Join Date
    Mar 2005
    Posts
    174
    Plugin Contributions
    0

    Default Re: Attributes sort order for invoice/packing slip

    The option names have sort orders and the option values are text fields.

    Right now they are set like this in the Option Name Manager:

    - Main Tag Child Name: 1
    - Main Tag Birthdate: 2
    - Second Child Name: 3
    - Second Child Birthdate: 4

    They display in the correct order on the item pages, just not on the invoice through the admin.

    Thanks!

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

    Default Re: Attributes sort order for invoice/packing slip

    Very odd ...

    I added 4 text Option names in a random order ... added them to the Product in a random order ...

    They maintain their order from Product Info ... Shopping Cart ... Checkout Confirmation ... Email ... Order ... My Account ...

    I am numbering in 10s as in 10, 20, 30, 40 etc.

    That is the only difference that I can 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!]
    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
    Mar 2005
    Posts
    174
    Plugin Contributions
    0

    Default Re: Attributes sort order for invoice/packing slip

    Checking again with my client's site, it looks like her invoices almost always have the item options in the correct order and she's just seen a few that are out of order. Strange because I can't track down what's different about the "bad" order - I found a good invoice for the exact same item.

    I've asked her to gather a few order numbers for me to compare so I can try to find a similarity between them. I'll let you know if I figure this one out!

  6. #6
    Join Date
    Sep 2006
    Location
    Gillette, NJ, USA
    Posts
    35
    Plugin Contributions
    0

    Default Re: Attributes sort order for invoice/packing slip

    I've had this happen a few rare times as well - did you figure out why it was happening? I can't even see a pattern - I can't solve it without a pattern.

  7. #7
    Join Date
    Mar 2005
    Posts
    174
    Plugin Contributions
    0

    Default Re: Attributes sort order for invoice/packing slip

    No, I haven't figured this one out! I can't tell what's different about these few screwy orders.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 18 Sep 2013, 04:09 AM
  2. Missing order status history in invoice and packing slip
    By flix in forum Managing Customers and Orders
    Replies: 1
    Last Post: 12 Feb 2011, 12:19 PM
  3. Change Font Color for Invoice/Packing Slip
    By kenny724 in forum General Questions
    Replies: 1
    Last Post: 17 May 2010, 05:52 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

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