Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 postal code (zip) capitals
Author « Topic »  

quantum503
Advanced Member

United Kingdom
230 Posts

Pre-sales questions only
(More Details...)

Posted - 09/14/2021 :  09:13:25  
Hi

In the UK Zip codes are post codes and the letters used in them should be uppercase. I'm finding that there are a few instances where they are coming through as lowercase which is affecting other processes further down the line.

I'm using PHP v7.2.3 and have the code . strtoupper($destZip) inserted into inccart.php. I have also added classes to the style thus:
<style>
.cdformzip {
text-transform: uppercase;
}
#zip {
text-transform: uppercase;
}
</style>

I am unable to replicate this myself as lowercase is automatically converted as I enter it.

Have I missed something else - such as a mobile class?

All suggestions greatly appreciated.

Eric

quadrant
Ecommerce Template Guru

United Kingdom
1099 Posts

Posted - 09/14/2021 :  09:33:39  
Hi Eric,

With the 'few instances' is there something common with the orders such as using PayPal Express where the customer doesn't fill their address in?

Regards,
David

quantum503
Advanced Member

United Kingdom
230 Posts

Pre-sales questions only
(More Details...)

Posted - 09/14/2021 :  12:37:57  
Hi David

Thanks for your reply. Most are PayPal but of the dozen or so that I've looked at two are credit card transactions. Now that you mention it, I remember that Paypal can bypass the address fields, but that still leaves the other two.

Do you think that there is a way to format that field in the confirmation email since that is what we are using to parse the transaction details into the order processing system where it needs to be formatted correctly?

Eric

quadrant
Ecommerce Template Guru

United Kingdom
1099 Posts

Posted - 09/14/2021 :  22:39:11  
Hi Eric,

If it's the confirmation email then you could try looking in incemail.php at the getemailrecpt function.

Around line 80 try changing:
$recpt.=$rs['ordZip'] . '<br />';
to
$recpt.= strtoupper($rs['ordZip']) . '<br />';

If you also use a different shipping address in cart you might need to change ordShipZip too.

I've not tested the above but we do something similar with the product name and of course it will get overwritten when you next update.

Regards,
David

quantum503
Advanced Member

United Kingdom
230 Posts

Pre-sales questions only
(More Details...)

Posted - 09/14/2021 :  22:45:54  
Thanks David

I'll try that and see how it goes.

Eric

Vince
Administrator

42425 Posts

Posted - 09/15/2021 :  02:07:26  
I've had a good Google on the subject and can't find a country that uses Postal Codes that wouldn't have the letters in upper case. So, I've made some changes in the v7.4 updater so that all zips are forced to upper case when saved with the order details.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

quadrant
Ecommerce Template Guru

United Kingdom
1099 Posts

Posted - 09/15/2021 :  04:45:58  
Hi Vince,

That will be a great time saver so thanks for making the changes.

We use a postcode lookup during checkout so not a big issue when that's used but the number of PayPal Express orders or manually entered addresses we get where we have to amend is staggering.

Regards,
David

quantum503
Advanced Member

United Kingdom
230 Posts

Pre-sales questions only
(More Details...)

Posted - 09/15/2021 :  05:19:38  
Thanks guys

That's great. Excellent support as usual.

Eric

quantum503
Advanced Member

United Kingdom
230 Posts

Pre-sales questions only
(More Details...)

Posted - 11/01/2021 :  01:47:28  
Hi Guys

I have updated my clients website to v7.4.2 but I notice that this issue is not entirely fixed. I have the odd one which still comes through as lower case. I think this is a PayPal issue but I had thought the latest update included a fix for that. Was I mistaken?

Eric

Vince
Administrator

42425 Posts

Posted - 11/01/2021 :  10:44:58  
Hi Eric
Good point, the PayPal Express order will bypass the code to put the Zip in upper case so I've made a change for that now and uploaded it in the updater.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

quantum503
Advanced Member

United Kingdom
230 Posts

Pre-sales questions only
(More Details...)

Posted - 11/01/2021 :  14:57:01  
Thanks Vince

I'll try that.

Eric
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000