Guest imjesus Posted July 6, 2009 Share Posted July 6, 2009 Is there any way that on the packing slip the shipping address at the top can be displayed in ALL CAPS? The one that says: 'DELIVER TO' at the top of the invoice. Simply because, not all customers write their name/address in a neat format, sometimes all lower case, and by putting it in all CAPS then this will look neater on the delivery note and label. Thank you. Quote Link to comment Share on other sites More sharing options...
Guest nixxie Posted July 23, 2009 Share Posted July 23, 2009 Is there any way that on the packing slip the shipping address at the top can be displayed in ALL CAPS? The one that says: 'DELIVER TO' at the top of the invoice. Simply because, not all customers write their name/address in a neat format, sometimes all lower case, and by putting it in all CAPS then this will look neater on the delivery note and label. Thank you. I wanted the same with my packing slip, however I forced capitlization at customer registration rather than adapting the packing slip code. I prefered to do it this way, so the database held the data in caps (in case I needed caps for anything other than the packing slip, I didn't need to repeat the function, so to speak). I completed this for my cc3 site - but cannot find the forum link to the original code that somebody submitted. Likewise, couldn't find anything for cc4, so used the same function and it worked! Always backup first... Open: includes/content/reg.inc.php Around line 93, find the inputs for customer registration ie. $record["email"] = $db->mySQLSafe($_POST['email']); $record["title"] = $db->mySQLSafe($_POST['title']); $record["firstName"] = $db->mySQLSafe($_POST['firstName']); $record["lastName"] = $db->mySQLSafe($_POST['lastName']); $record["companyName"] = $db->mySQLSafe($_POST['companyName']); $record["add_1"] = $db->mySQLSafe($_POST['add_1']); $record["add_2"] = $db->mySQLSafe($_POST['add_2']); $record["town"] = $db->mySQLSafe($_POST['town']); $record["county"] = $db->mySQLSafe($county); $record["postcode"] = $db->mySQLSafe($_POST['postcode']); $record["country"] = $db->mySQLSafe($_POST['country']); $record["phone"] = $db->mySQLSafe($_POST['phone']); $record["mobile"] = $db->mySQLSafe($_POST['mobile']); $record["regTime"] = $db->mySQLSafe(time()); $record["ipAddress"] = $db->mySQLSafe(get_ip_address()); To change the registration field you want to store as CAPS in your database, add the function strtoupper() function ie. $record["postcode"]= $db->mySQLSafe(strtoupper($_POST['postcode'])); Personally, I added this function to all the address and names fields and works a treat for me. Hope this helps :) Quote Link to comment Share on other sites More sharing options...
Guest imjesus Posted July 23, 2009 Share Posted July 23, 2009 Is there any way that on the packing slip the shipping address at the top can be displayed in ALL CAPS? The one that says: 'DELIVER TO' at the top of the invoice. Simply because, not all customers write their name/address in a neat format, sometimes all lower case, and by putting it in all CAPS then this will look neater on the delivery note and label. Thank you. I wanted the same with my packing slip, however I forced capitlization at customer registration rather than adapting the packing slip code. I prefered to do it this way, so the database held the data in caps (in case I needed caps for anything other than the packing slip, I didn't need to repeat the function, so to speak). I completed this for my cc3 site - but cannot find the forum link to the original code that somebody submitted. Likewise, couldn't find anything for cc4, so used the same function and it worked! Always backup first... Open: includes/content/reg.inc.php Around line 93, find the inputs for customer registration ie. $record["email"] = $db->mySQLSafe($_POST['email']); $record["title"] = $db->mySQLSafe($_POST['title']); $record["firstName"] = $db->mySQLSafe($_POST['firstName']); $record["lastName"] = $db->mySQLSafe($_POST['lastName']); $record["companyName"] = $db->mySQLSafe($_POST['companyName']); $record["add_1"] = $db->mySQLSafe($_POST['add_1']); $record["add_2"] = $db->mySQLSafe($_POST['add_2']); $record["town"] = $db->mySQLSafe($_POST['town']); $record["county"] = $db->mySQLSafe($county); $record["postcode"] = $db->mySQLSafe($_POST['postcode']); $record["country"] = $db->mySQLSafe($_POST['country']); $record["phone"] = $db->mySQLSafe($_POST['phone']); $record["mobile"] = $db->mySQLSafe($_POST['mobile']); $record["regTime"] = $db->mySQLSafe(time()); $record["ipAddress"] = $db->mySQLSafe(get_ip_address()); To change the registration field you want to store as CAPS in your database, add the function strtoupper() function ie. $record["postcode"]= $db->mySQLSafe(strtoupper($_POST['postcode'])); Personally, I added this function to all the address and names fields and works a treat for me. Hope this helps COOL! Thanks, I will try this out and see how it goes! Thank you very much :-) Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 9, 2011 Share Posted October 9, 2011 I'd like to do this for a v5 install, but so far I've not been able to get it to work. If anyone figures out how to do this with v5, please post your solution. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 15, 2011 Share Posted October 15, 2011 The file you need to edit is .../admin/sources/order/print.inc.php Remember to make a copy of it before editing it! Here's a screenshot of a part of mine - I've used the ucwords(stringname) command, which puts a capital letter on the front of each word, so you'd need the strtoupper(stringname) command to make all yours into capitals. I bought myself the book "PHP & MySQL for Dummies" so that I can begin to understand and mod the code to my needs. You can see an example of my invoice here - http://www.bits4vits.co.uk/example-invoice.pdf I've changed a few things - Showing the shipping method so I have something to refer to Omitting the discount bit unless they're getting one - saves people asking about it! Added the payment method and a "Received with thanks" message Added my VAT Number and Company Registration details as is needed in the UK Also, in the address country is omitted if it is the "United Kingdom", no point printing it on local orders... Dave, Bits4Vits B) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.