Jump to content

Question

Posted

Hello Blesta,  I just signed up for a 30 day trial and I've hit an immediate problem.

It looks like you have chosen to use the ISO 3166 data for addressing, which is wholly inappropriate for any type of online billing system.

In the UK we use addressing in the form of Street Address -- Town / City -- County -- Postcode

ISO 3166 does not conform to this  -  and while ISO 3166 may be some sort of standard - it is not the data anyone would use for UK addressing inside any business application. In fact, the only other application (in my 30 years working in IT)  where I've seen this used  is WHMCS - so it looks like you may have copied this from them. Bad idea because it is fundamentally wrong to use this data. Some of the most common counties do not exist within this data and this will prevent many users from being able to enter their correct addresses. While it is certainly informative information and lists all the principalities in the country, it just doesn't work for street/town/county addressing and I don't believe this data was ever meant to be used for domestic addressing within a commercial setting. That's probably why nobody else does it this way.

Anyway, I'm not going to go on about it. I've made my point. You've obviously chosen this way under bad advice and are unlikely to change it now - however, I cannot use this software unless I can make changes to this list within the application. I'm not going to subject my customers to this infuriating inconvenience. It was simple within WHMCS to change the list, so I'm hoping it is just as simple in Blesta.

1. I can see that the data is held within the following directory...
vendors/respect/validation/library/Rules/SubdivisionCode
2. The files have some sort of validation but I'm not sure if this means there will be an error if a file is changed.
3. I'm assuming the data is being pulled out of these files directly, rather than from the database.

My first question ... can I simply edit the GbSubdivisionCode.php file to replace the data with my own? I understand this would need to be changed upon every update.
Secondly, are the three letter codes in those files used within Blesta for anything - or are they simply ignored?
Thirdly, is there a better way to hack this with a hook or some javascript?

Thank you for your time!

1 answer to this question

Recommended Posts

  • 0
Posted
On 4/28/2025 at 9:25 AM, DDChris said:

Hello Blesta,  I just signed up for a 30 day trial and I've hit an immediate problem.

It looks like you have chosen to use the ISO 3166 data for addressing, which is wholly inappropriate for any type of online billing system.

In the UK we use addressing in the form of Street Address -- Town / City -- County -- Postcode

ISO 3166 does not conform to this  -  and while ISO 3166 may be some sort of standard - it is not the data anyone would use for UK addressing inside any business application. In fact, the only other application (in my 30 years working in IT)  where I've seen this used  is WHMCS - so it looks like you may have copied this from them. Bad idea because it is fundamentally wrong to use this data. Some of the most common counties do not exist within this data and this will prevent many users from being able to enter their correct addresses. While it is certainly informative information and lists all the principalities in the country, it just doesn't work for street/town/county addressing and I don't believe this data was ever meant to be used for domestic addressing within a commercial setting. That's probably why nobody else does it this way.

Anyway, I'm not going to go on about it. I've made my point. You've obviously chosen this way under bad advice and are unlikely to change it now - however, I cannot use this software unless I can make changes to this list within the application. I'm not going to subject my customers to this infuriating inconvenience. It was simple within WHMCS to change the list, so I'm hoping it is just as simple in Blesta.

1. I can see that the data is held within the following directory...
vendors/respect/validation/library/Rules/SubdivisionCode
2. The files have some sort of validation but I'm not sure if this means there will be an error if a file is changed.
3. I'm assuming the data is being pulled out of these files directly, rather than from the database.

My first question ... can I simply edit the GbSubdivisionCode.php file to replace the data with my own? I understand this would need to be changed upon every update.
Secondly, are the three letter codes in those files used within Blesta for anything - or are they simply ignored?
Thirdly, is there a better way to hack this with a hook or some javascript?

Thank you for your time!

Hi DDChris,

We haven't copied anything from our competitor, especially not states and countries so that is interesting. They were originally pulled in from official data sets per https://docs.blesta.com/pages/viewpage.action?pageId=10551368#Debugging/Tools-StatesandCountries but we are planning to make some changes/improvements here as some data has either changed or may not have been totally accurate from the original sources. Perhaps our competitor used the same original sources, I'm not sure. Also, different regions have different preferences for how the date is constructed. You can see the task we're planning to implement here https://dev.blesta.com/browse/CORE-5391 If you have any comments on this task, let us know.

Regarding that library, I don't believe this is used at all for this purpose. States and Countries are stored in the database in the states and countries tables, respectively. So, these can be adjusted there if you prefer, depending on what kind of change you want to make. Codes can't be changed to something other than a code, so changes that relate to how the address is displayed (code, or name, etc) due to the region will likely need to wait for this task to be implemented.

Cheers,

Paul

Join the conversation

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

Guest
Answer this question...

×   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.

Loading...
×
×
  • Create New...