Zen Cart Logo
Forums / Managing Customers and Orders / Attributes sort order for invoice/packing slip

Attributes sort order for invoice/packing slip

Locked

Views: 2,827

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
20 Sep 2006, 1:47 AM
#1
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

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.

      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> <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!

20 Sep 2006, 2:04 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Attributes sort order for invoice/packing slip

Do all Option Names, Option Values and Attributes have sort orders set?

22 Sep 2006, 6:49 AM
#3
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

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!

24 Sep 2006, 3:18 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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 ...

25 Sep 2006, 9:03 PM
#5
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

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 Nov 2006, 4:38 AM
#6
boylan avatar

boylan

New Zenner

Join Date:
Sep 2006
Location:
Gillette, NJ, USA
Posts:
35
Plugin Contributions:
0

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.

8 Nov 2006, 10:15 PM
#7
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

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.