Forums / Managing Customers and Orders / orders_status_history not printing completely on packing list ad invoice

orders_status_history not printing completely on packing list ad invoice

Locked

Started by badarac on 22 Sep 2010, 2:42 PM · Views: 2,040

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
22 Sep 2010, 2:42 PM
#1
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

orders_status_history not printing completely on packing list ad invoice

I'm running ZC1.3.9f which was a fresh install and lightly modified. I did a fresh install with no mods and have the same problem.

The problem is that the packing list and invoice only display the first entry in the order status history. Not a big deal but it doesn't seem to be working as intended.

22 Sep 2010, 3:29 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: orders_status_history not printing completely on packing list ad invoice

That's not a bug.
If you want it to show more details on the invoice or packing slip, simply enable that feature:

  • Admin->Configuration->Shipping/Packaging->Display Order Comments on Admin Invoice
  • Admin->Configuration->Shipping/Packaging->Display Order Comments on Admin Packing Slip

(Moving this out of the Bug Reports area)*

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Sep 2010, 3:53 PM
#3
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Re: orders_status_history not printing completely on packing list ad invoice

DrByte:

That's not a bug.
If you want it to show more details on the invoice or packing slip, simply enable that feature:

  • Admin->Configuration->Shipping/Packaging->Display Order Comments on Admin Invoice
  • Admin->Configuration->Shipping/Packaging->Display Order Comments on Admin Packing Slip

(Moving this out of the Bug Reports area)*
Thanks for the reply. I set that as you suggested and it works as expected. A couple things about this for future releases. When I configured my stores I didn't think of the orders current status as a comment so that setting title was misleading to me. The description for that setting says :
"Do you want to display the Order Comments on the Admin Invoice?"

And the settings are:
0= OFF
1= First Comment by Customer only
2= All Comments for the Order

I don't think that order status is a customer comment.

The other thing is that even if I only wanted to display one line I would want it to be the current status and not the first.

No big deal but a suggestion.

23 Nov 2010, 1:33 AM
#4
Join Date:
Apr 2009
Posts:
36
Plugin Contributions:
0

Re: orders_status_history not printing completely on packing list ad invoice

Found this thread as the most recent one on search for a similar issue: I wanted my order comments to ONLY show the ones where customer had been notified, and NOT print transaction ID details, etc on the invoice (which gets printed out and sent in customer package)

Found several threads all dealing with issues, tried with the setting to "1" which only prints the FIRST comment, but 2 prints ALL

Similar to this post (which wants the LAST comment where status was updated) - For that issue, open /YOUR_ADMIN/invoice.php and go to line 216-219 - find the SQL query code

$orders_history = $db->Execute("select orders_status_id,date_added,................ order by date_added"); 

and change the order by date_added to order by date_added DESC , and set invoice comments to 1, you will get the last status update printed to the invoice

My issue was different- I wanted JUST comments where customer had been notified (For customer's benefit, since copy of invoice is sent with package) - and for those that are looking for a quick fix to do that, it's simple

Same file as above, but go to line 223-224, and change this code and the lines after it:

while(!$orders_history->EOF) {
$count_comments++;
   ~snip~ (don't touch the echo calls - leave them in place while adding the next code) 
$orders_history ->MoveNext();

change it to look like this:

while(!$orders_history->EOF) {
$count_comments++;
   [b]if($orders_history->fields['customer_notified'] > 0)  {[/b]
   ~snip~ (the echo calls are all here - don't touch em) 
[b]}[/b]

$orders_history ->MoveNext();

And then go to admin, shipping/packing and set the invoice comments to "2" (all) - when you go to the invoice, it only shows the ones the customer knows about by e-mail.. makes for a neater looking invoice.

23 Nov 2010, 1:42 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: orders_status_history not printing completely on packing list ad invoice

~~If your logic says " > 0" then you'll end up displaying private comments intended to NEVER be displayed, since private comments are set as "-1", which is < 0 and thus not caught by your "> 0" safety.

Using "!= 0" would be more appropriate.

Or just upgrade to the latest Zen Cart version.

But, that's a discussion for another thread, since it's a hijacking of the original thread into another topic.~~

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Nov 2010, 2:33 AM
#6
Join Date:
Apr 2009
Posts:
36
Plugin Contributions:
0

Re: orders_status_history not printing completely on packing list ad invoice

DrByte:

If your logic says " > 0" then you'll end up displaying private comments intended to NEVER be displayed, since private comments are set as "-1", which is < 0 and thus not caught by your "> 0" safety.

Using "!= 0" would be more appropriate.

Or just upgrade to the latest Zen Cart version.

But, that's a discussion for another thread, since it's a hijacking of the original thread into another topic.

Huh? how so? -1 is less than 1 and since > 0 means "1 or more" it gets exactly what I want. methinks your logic above is a little bass-ackwards to what I'm shooting for... hehe :)

and I AM on the latest ZC version, BTW :)

(of course, I could get the same result by setting =1 instead of >0 , however, it would not scale if I were to choose later to add additional types, such as "Customer called" or some other similar purpose... such as customers adding more comments ,which I'd set to a number > 1 for example )

The code already checks for where customer notified is >= 0 in the DB query, and I simply removed the = part without altering the query Comments such as those sent by paypal with transaction ID and other info that clutters up invoice are set to 0 , current ZC query picks that up - Of course, I could simply edit the aforementioned SQL query to remove the = for the same effect, however I also added (afterwards) a simple &admin_inv_copy=1 to an additional button in the order options so as to print an admin's view invoice using the same code...

23 Nov 2010, 2:48 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: orders_status_history not printing completely on packing list ad invoice

Argh ... I'm foggy today ... wicked weather headache, and clearly I misread and misunderstood what you were doing. :eek:

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.