Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Managing Customers and Orders / Customer Comments on Invoice

Customer Comments on Invoice

Locked

Started by welshop_com on 6 Mar 2007, 3:47 PM · Views: 6,320

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
6 Mar 2007, 3:47 PM
#1
welshop_com avatar

welshop_com

Zen Follower

Join Date:
Aug 2004
Location:
Newport, Wales
Posts:
262
Plugin Contributions:
0

Customer Comments on Invoice

Hi

In previous versions of ZenCart (1.2.6) I had the Invoice configured to show customer comments. I think Dr Byte gave me the info and was as follows

<!--add comment starts--> <tr><td class="main"><?php echo '<b>Customer comments: </b>' . $orders_history->fields['comments']; ?></td> </tr> <!--add comment ends-->

Having just upgraded to 1.3.7 this code no longer works. I have been playing with it for ages now and nothing is working so I thought I would throw this one out to the Community to see if anyone has an answer

Cheers
Brinley

6 Mar 2007, 5:11 PM
#2
welshop_com avatar

welshop_com

Zen Follower

Join Date:
Aug 2004
Location:
Newport, Wales
Posts:
262
Plugin Contributions:
0

Re: Customer Comments on Invoice

Worked it out!

I fogot to add the select query to the page

So for anyone else who wants to do this the below goes above the $order_check statement in Invoice.php in Admin

//--Add comments starts--
$orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments
from " . TABLE_ORDERS_STATUS_HISTORY . "
where orders_id = '" . zen_db_input($oID) . "'
order by date_added limit 1");
//--Add comments ends--

Also add the below code to the page -

<!--add comment starts--> <tr><td class="main"><?php echo '<b>Customer comments: </b>' . $orders_history->fields['comments']; ?></td> </tr> <!--add comment ends-->

Cheers
Brinley

25 Jul 2007, 2:58 PM
#3
snarkys avatar

snarkys

Zen Follower

Join Date:
Apr 2006
Posts:
244
Plugin Contributions:
0

Re: Customer Comments on Invoice

thank you : )

28 Jul 2007, 12:57 AM
#4
tatiana77 avatar

tatiana77

Zen Follower

Join Date:
May 2007
Posts:
114
Plugin Contributions:
0

Re: Customer Comments on Invoice

Update on your helpful suggestion, just in case someone's wondering, this is the first part of your code, but I added the <?php, ?> to it..

<?php //--Add comments starts-- $orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . zen_db_input($oID) . "' order by date_added limit 1"); //--Add comments ends-- ?>

Haven't tried it out yet though, but looks helpful.


30 Jul 2007, 7:23 PM
#5
snarkys avatar

snarkys

Zen Follower

Join Date:
Apr 2006
Posts:
244
Plugin Contributions:
0

Re: Customer Comments on Invoice

very helpfull for us because we ship off these.

2 Aug 2007, 11:37 PM
#6
stormshade avatar

stormshade

Zen Follower

Join Date:
Jun 2007
Posts:
112
Plugin Contributions:
0

Re: Customer Comments on Invoice

This was one of the answers I came looking for. Thank you. Gonna go try it out.

2 Aug 2007, 11:57 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Customer Comments on Invoice

NOTE: this feature has been added as an option in the upcoming Zen Cart v1.3.8 ...

Display Order Comments on Admin Invoice
Do you want to display the Order Comments on the Admin Invoice?
0= OFF
1= First Comment by Customer only
2= All Comment for the Order

And of course for the Packing Slip as well ... :smile:

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!

8 Aug 2007, 3:39 AM
#8
taipa avatar

taipa

New Zenner

Join Date:
Nov 2005
Posts:
54
Plugin Contributions:
0

Re: Customer Comments on Invoice

Ajeh:

NOTE: this feature has been added as an option in the upcoming Zen Cart v1.3.8 ...

And of course for the Packing Slip as well ... :smile:

Awesome! Thank you! ^_^

Canadians who use Quickbooks please read this thread!

24 Aug 2007, 11:41 AM
#9
thieving_gypsy avatar

thieving_gypsy

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

Re: Customer Comments on Invoice

Quick update on this one - remove the limit 1 from the SQL statement then add the following code to display all the customer comments on the packing slip - not just the first...

<?php
	while (!$orders_history->EOF) {
		echo(zen_date_long($orders_history->fields['date_added']) . ": " . $orders_history->fields['comments'] . "<br>"); 
		$orders_history->MoveNext();
	}

?>

Hope this helps someone...

25 Oct 2007, 3:05 PM
#10
alanq avatar

alanq

New Zenner

Join Date:
Aug 2007
Posts:
15
Plugin Contributions:
0

Re: Customer Comments on Invoice

Another Thank You.
I came looking for this answer -- and found it here :smile:

13 Nov 2007, 11:20 PM
#11
cafeprima avatar

cafeprima

New Zenner

Join Date:
Feb 2007
Posts:
41
Plugin Contributions:
0

Re: Customer Comments on Invoice

Thank you! I added the code at the very end of the code, just before the </body> tag so that the comment shows up on the bottom of the invoice instead of the top--it was easier for me to see that way. Just thought I'd post it for anyone else.

But THANK YOU to the OP! This is very helpful to me!

14 Jan 2008, 2:29 AM
#12
pe7er avatar

pe7er

New Zenner

Join Date:
Apr 2007
Location:
Nijmegen, Netherlands
Posts:
44
Plugin Contributions:
0

Re: Customer Comments on Invoice

Thanks for posting this useful modification, welshop.com !

Kind Regards,
Peter Martin, Joomla specialist
www.db8.nl

14 Jan 2008, 3:41 AM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Customer Comments on Invoice

Note: in v1.3.8a there are now Order Comments on the orders, packingslip and invoice as desired:
http://www.zen-cart.com/forum/showthread.php?t=81696

Look in the settings for Configuration ... Shipping/Packaging ...

Display Order Comments on Admin Invoice
Do you want to display the Order Comments on the Admin Invoice?
0= OFF
1= First Comment by Customer only
2= All Comments for the Order

Display Order Comments on Admin Packing Slip
Do you want to display the Order Comments on the Admin Packing Slip?
0= OFF
1= First Comment by Customer only
2= All Comments for the Order

Note: be sure to keep up to date on any quirks and tweaks on v1.3.8a ...
http://www.zen-cart.com/forum/showthread.php?t=81696

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!

4 Sep 2009, 11:39 PM
#14
arliss61 avatar

arliss61

New Zenner

Join Date:
Oct 2007
Posts:
29
Plugin Contributions:
0

Re: Customer Comments on Invoice

Very useful for those of us on V1.3.7

thanks