Jump to content

Force Packing Slip Address in CAPS?


Guest imjesus

Recommended Posts

Guest imjesus

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.

Link to comment
Share on other sites

  • 3 weeks later...

Guest nixxie

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 :)

Link to comment
Share on other sites

Guest imjesus

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 :-)

Link to comment
Share on other sites

  • 2 years later...

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 -

print.jpg

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)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...