| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Printing 'Customer Notes' on invoices | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Printing 'Customer Notes' on invoices
When the customer goes to Checkout and selects a payment method of Credit Card, then enters something in "customer notes", like special shipping instructions, those notes are encrypted along with the credit card information and written in the database.
We found them hard to read and easy to miss when embedded in the credit card information on the Admin / Orders screen. We also wanted to print these instructions on the customer's invoice and Not print the credit card information. I've put together a modification that will do this. It basically replicates those "customer notes" to the xcart-orders.notes field in the database, making it easy to read back and print where we want. We are on x-cart version 3.5.4 and using Authorizenet / AIM for Credit Card processing. I will install this change tonight and if all goes well, will post the instructions tomorrow, if anyone is interested?
__________________
Linux / Apache 1.3.31 PHP 4.3.3 MySQL 4.0.18 X-Cart 3.5.4 in production Mar 08, 2004 X-Cart 3.5.4 Win2k SP4 for development |
|||||||
#2
|
|||||||||
|
|||||||||
Hello I am using Sim and AN. It would be nice to know how to do this. I could never understand why we could not pass the notes in the e-mail. The sales department gets the e-mail and never do get the customer notes. What a bad system. Customer note shold be for customer notes no the the CC information.
__________________
Staying To The Right But Left of Rush X-cart Current version: 4.4.2 X-cart Current version: 4.4.1 X-cart Version 4.0.14 X-cart Version 4.1.6 Litecomm Version: 2.2.35 Operating System Linux PHP Version 5.2.14 Apache/2.2.16 (Unix) MySQL client version: 5.091 |
|||||||||
#3
|
|||||||
|
|||||||
Hi -- I installed our "fix" last night and all is well. As soon as I finish another little project, I'll post the changes I made.
Our notes were there, but buried in the little box with the CC info on the Admin / Orders page and Very Easily overlooked. Give me an hour and I'll have the details up here.
__________________
Linux / Apache 1.3.31 PHP 4.3.3 MySQL 4.0.18 X-Cart 3.5.4 in production Mar 08, 2004 X-Cart 3.5.4 Win2k SP4 for development |
|||||||
#4
|
|||||||
|
|||||||
The scenario:
Customer clicks on "CheckOut" Selects credit card for method of payment and clicks on "Continue" Below the fields for the credit card information is a textbox for "Customer Notes". When the order is submitted, the "Customer Notes" get encrypted along with the credit card data and are placed in the x-cart_orders.details field of the database. When you view an individual order in the Admin / Orders section of the cart, the little box titled: "Order details (not visible to customer and provider):" has the "Customer Notes" in it, but they're buried in the middle of the credit card data. We didn't even find them for a week! The field below the Order Details, can be used by the admin or order filler to write notes and this second field is stored in the x-cart_orders.notes field in the database but not printed anywhere. So, my solution: 1. Signed in as an admin, under Administration / Languages / the label "lbl_order_notes" reads "Order Instructions (not visible to customer)". I changed the Value to read "Special Instructions" but left the label variable name alone. 2. [x-cart root dir]/skin1/main/history_order.tpl, I enlarged both the Order Details and (now) Special Instructions textboxes, to maintain my sanity. Code:
3. [x-cart root dir]/payment/payment_cc.php I added a new variable, $order_notes, to store the information that the customer entered in "Customer Notes". This is already in the $order_details variable but that's the one that gets encrypted and I didn't want to deal with stripping information out of that block. Near the top of the file, find $order_details = ""; and simply add the new variable under it. Code:
A few lines further in the same file, set the value of the new $order_notes. Code:
Again in the same file, around line 67, look for the comment # Put order in table Code:
Same file still, around line 95, add the new variable again after $order_details: Code:
That should be all for this file. 4. [x-cart root dir]/include/func.php Around line 2132, you need to add the new variable, $order_notes to the insert query so it's saved when a new order gets added to the database. Code:
Now the ugly one, but Very little change (we're still in func.php): Code:
......,reg_numbers, notes, vat_applied) values....... and in the values list, added our new variable in the same position near the end: ......., '$reg_numbers', '".addslashes($order_notes)."', '$current_order[vat_applied]')");...... Look for reg_numbers in the query and just add the additional field to the two places. 5. [x-cart root dir]/skin1/mail/order_invoice.tpl Added two new lines to print the label "Special Instructions:" and the data that we saved above in xcart_orders.notes. Code:
6. YOU'RE DONE. I apologize for the length but hoped to make it clear and easy to follow.
__________________
Linux / Apache 1.3.31 PHP 4.3.3 MySQL 4.0.18 X-Cart 3.5.4 in production Mar 08, 2004 X-Cart 3.5.4 Win2k SP4 for development |
|||||||
#5
|
|||||||||
|
|||||||||
Hello Loon
Wow, I am going to print this out and give it a try. I am a bit slow on this type of things. However I think your instructions are very easy to follow. I will give it an attempt. I wonder why Xcart does not make the customer note used for customer notes only. Then they can be sent anywhere. without a problem. That is another story. Thank you for your help and time on passing this information on.
__________________
Staying To The Right But Left of Rush X-cart Current version: 4.4.2 X-cart Current version: 4.4.1 X-cart Version 4.0.14 X-cart Version 4.1.6 Litecomm Version: 2.2.35 Operating System Linux PHP Version 5.2.14 Apache/2.2.16 (Unix) MySQL client version: 5.091 |
|||||||||
#6
|
|||||||
|
|||||||
You're very welcome. Hope it goes well. I forgot to mention that when you view the individual order in admin, if you want, you can add more comments to the "special instructions" and click "modify", then print the invoice and they'll all be there. We find it useful to elaborate on the instructions from the customer ocassionally so the order filler knows what to do.
Good luck! Jean
__________________
Linux / Apache 1.3.31 PHP 4.3.3 MySQL 4.0.18 X-Cart 3.5.4 in production Mar 08, 2004 X-Cart 3.5.4 Win2k SP4 for development |
|||||||
#7
|
|||||||
|
|||||||
I would like to extend my thanks for these nicely written directions, and offer up one addition. If you accept any offline payment methods such as money orders you will need to make a change to the [x-cart root dir]/payment/payment_offline.php file.
Quote:
If you change the function definition to Code:
NOTE: the addtion of ' = "" ' after the $order_notes this should elminate any potential issues if this function is called and a $order_notes variable is not included. PAYMENT_OFFLINE.php This file does not appear to check for Customer Notes to place in the $order_detials so we have to do a little more changing. Code:
Becomes Code:
NOTE the addition of elseif($key=="Customer_Notes") $order_notes = "Customer Notes: $val"; THEN Code:
Needs the addition of the $order notes variable Code:
And thats all folks Thanks
__________________
PHPdev --------------------- X-Cart: 4.1.11 OS: Linux Apache: 2.0.61 |
|||||||
#8
|
|||||||
|
|||||||
Excellent addition, thank You!
We aren't taking anything other than CC orders at the moment so I didn't pursue changing this part but am happy to see it works there also.
__________________
Linux / Apache 1.3.31 PHP 4.3.3 MySQL 4.0.18 X-Cart 3.5.4 in production Mar 08, 2004 X-Cart 3.5.4 Win2k SP4 for development |
|||||||
#9
|
|||||||
|
|||||||
I tried this mod and my order_notes comes out encrypted on the email and in the admin order detail. Any ideas why?
__________________
Keith X-Cart v3.4.14 |
|||||||
#10
|
|||||||||
|
|||||||||
Blowfish encryption was added to the order notes field around version 3.5.6.
This mod would have to be reworked to allow decryption of the order notes for printing. It has become much more complicated. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|