Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow state to be required, optional or disabled #1870

Closed
havenswift-hosting opened this issue Feb 15, 2018 · 42 comments
Closed

Allow state to be required, optional or disabled #1870

havenswift-hosting opened this issue Feb 15, 2018 · 42 comments
Assignees
Milestone

Comments

@havenswift-hosting
Copy link

The county / state field should not always be a required field and having this validation causes a lot of different problems. A little while ago, a status tick box was added for a country so that only those that were enabled are listed in the country dropdown - what is needed is a similar thing for counties / states / regions

  1. You can have a country enabled which doesnt have any regions set and yet CubeCart still insists that a value is entered

  2. While strictly true that the City of London is in the Greater London region, nobody would ever write their address like that but that is what you are forced to do.

  3. Very few people in the UK use county now and in fact the Post Office actively discourages the use of this on addresses - town, postcode is what should be used

  4. In some countries it is very important ie USA and especially Spain so there should be a way to validate and enforce that these are entered

  5. Ref point 3, the Post Office checking software doesnt even return the county as part of the address validation - so for example when using the Crafty Clicks plugin with CubeCart, you enter the postcode and choose which address which doesnt include a county, then hit save and it complains about the county being empty !

A quick solution would be to remove any validation on this field - if anything is selected via dropdown or manually entered, then that can be stored, but an empty value should be possible and should be the default even for those countries where zones are entered.

Another better solution might be a tick box against the zones and then if a zone exists for a country and has the box ticked, it is listed in the dropdown and one of those or a blank entry has to be selected. If a zone exists but is unticked, then it doesnt appear in the dropdown

@bhsmither
Copy link
Contributor

Possible duplicate of #1708.

@abrookbanks
Copy link
Member

abrookbanks commented Feb 19, 2018

A quick solution would be to remove any validation on this field

I'm not sure it's that simple especially with historical garbage in the state field which has caused problems in the past requiring validation. AVS issues too?

Maybe we could trial this in a future mid point release with state as optional per country.

@abrookbanks
Copy link
Member

Also relates to #1720

@abrookbanks
Copy link
Member

abrookbanks commented Feb 19, 2018

As much as this scares me I think it needs addressing (excuse the pun LOL).

I just want to figure out the best way. Do we need an option to select against each country.

e.g.
France

  • Disabled
  • Enabled (zone required)
  • Enabled (zone enabled but optional)
  • Enabled (zone disabled)

@havenswift-hosting
Copy link
Author

You could do it that way and that would solve 99% of current problems people are having - the only additional thing you could add would be to also have an enabled / disabled flag on each zone as well. Would only come into effect if country is enabled and the zone is either required or optional - would enable some zones to be excluded without having to delete them

@abrookbanks
Copy link
Member

Yes that would be the icing on the cake.

@abrookbanks abrookbanks added this to the 6.2.0 milestone Feb 19, 2018
@abrookbanks abrookbanks self-assigned this Feb 19, 2018
@abrookbanks
Copy link
Member

I'm going to see if we can get this into 6.2.

@abrookbanks
Copy link
Member

BIG question.. what happens if these fields are not required or disabled but the customer has a shipping method like all in one shipping broken down by state??

I don't think this can be coded to check the requirements of each extension?

@havenswift-hosting
Copy link
Author

what happens if these fields are not required or disabled but the customer has a shipping method like all in one shipping broken down by state?

That is a store owner config problem and stupidity should be no reason to force "functionality" that breaks a lot of stores. New stores could have countries and zones enabled by default to preserve the current situation and then if settings are changed, it is down to the store owner to ensure that it works

@abrookbanks
Copy link
Member

Yes I agree. I'm over complicating this.

@abrookbanks
Copy link
Member

screen shot 2018-02-26 at 12 39 02

abrookbanks added a commit that referenced this issue Feb 26, 2018
abrookbanks added a commit that referenced this issue Feb 26, 2018
@bhsmither
Copy link
Contributor

I see that if a country has associated states/counties/whatever, being listed in Cubecart_geo_zone, the related form fields would be a required drop-down selector.

So, if a country is now recommended to disregard state/county, would not the simple solution be to remove them from CubeCart_geo_zone?

abrookbanks added a commit that referenced this issue Feb 27, 2018
abrookbanks added a commit that referenced this issue Feb 27, 2018
@abrookbanks abrookbanks modified the milestones: 6.2.0, 6.1.14 Feb 27, 2018
abrookbanks added a commit that referenced this issue Feb 28, 2018
This is proving to be significantly more complex than first thought.
@havenswift-hosting
Copy link
Author

lol - it certainly isnt !

@abrookbanks
Copy link
Member

abrookbanks commented Mar 6, 2018

Hehe.. 6.2 will have a short beta so we can see how this goes. We should now have the addresses formatted to Royal Mail standards.

miss s pollard
1 chapel hill
heswell
bournemouth
bh1 1aa
United Kingdom

should now show like..

screen shot 2018-03-06 at 13 32 40

@abrookbanks
Copy link
Member

abrookbanks commented Mar 6, 2018

@havenswift-hosting
Copy link
Author

Looking forward to testing it when you are happy to release the beta

@abrookbanks
Copy link
Member

Thanks. Not too far off now.

@abrookbanks
Copy link
Member

The country will only show on invoices now if its not a national order.

@havenswift-hosting
Copy link
Author

I saw you had included that - are you going to be looking at different address layouts depending on country ? There arent too many different formats

@havenswift-hosting
Copy link
Author

Most of Western Europe (excluding UK) is the same (with slight differences in upper case and capitalisation)

https://personal.help.royalmail.com/app/answers/detail/a_id/112/related/1

@abrookbanks
Copy link
Member

Not for this release I don't think. Most countries have the town in upper case so we should at least be better than we were.

@abrookbanks
Copy link
Member

Reopening because I think the upgrade should make state optional by default aside from Argentina, Brazil, Canada, China, Indonesia, India, Japan, Mexico, Thailand or USA.

@Dirty-Butter
Copy link

It would be very helpful if there were a way to Search for a country in order to change the State and EU settings.

@theoneandonly-vector
Copy link

I don't see any status drop-down, it's still the tick/untick over here.

@abrookbanks
Copy link
Member

Then your store hasn't been upgraded to the latest version fully.

@theoneandonly-vector
Copy link

theoneandonly-vector commented May 6, 2018 via email

@Dirty-Butter
Copy link

Dirty-Butter commented May 6, 2018

I am having an issue with the Required placeholder on 6.2.1 latest commit. See https://forums.cubecart.com/topic/53956-problem-with-state-placeholder-in-620/

It's also showing on the 6.2.0 Demo store.

@theoneandonly-vector
Copy link

any additional info pls.. I also tried it on a 2nd setup, which doesn't work too..

@abrookbanks
Copy link
Member

This is not a tech support channel.

@theoneandonly-vector
Copy link

theoneandonly-vector commented May 8, 2018

this isn't about getting tech support.. there is a fault in the upgrade procedure. this can't be fixed by tech support..
this kind of interaction already happened here:
#1900

there is no way I did something wrong updating it.

@abrookbanks
Copy link
Member

6.2.1 isn't released yet so its really not a good idea to be trying to use it. Please keep with 6.2.0 for now.

@abrookbanks
Copy link
Member

I don't see any status drop-down, it's still the tick/untick over here.

You can't have upgraded properly. If you don't see the drop down menus then the code of your store is still at 6.0.x or 6.1.x.

@theoneandonly-vector
Copy link

what could have gone wrong by uploading a clone of github's 6.2.1 and running the setup upgrade process? it even shows me 6.2.1 in settings.

@abrookbanks
Copy link
Member

abrookbanks commented May 8, 2018

If we add more changed to the 6.2.1 upgrade then when you upgrade to 6.2.2 these will be missed as it will already think it is fully upgraded to 6.2.1 when its not been fully. This could have some significant consequences from a stability point of view.

If you don't see a drop down next to each country then the code isn't at 6.2.x. Check the files uploaded overwriting the existing ones and please don't forget not to upload the /admin folder as it is. It needs to be renamed accordingly to the name of your admin folder (e.g. "admin_xxxxx").

@theoneandonly-vector
Copy link

theoneandonly-vector commented May 8, 2018 via email

@abrookbanks
Copy link
Member

Ok now? What was the problem?

@theoneandonly-vector
Copy link

theoneandonly-vector commented May 8, 2018 via email

@abrookbanks
Copy link
Member

Ok so it wasn't a fault after all. A support issue.😁

Pleased it is ok now.

@Dirty-Butter
Copy link

I had a comment 3 days ago in this thread that looks like it kind of got lost in the conversation with vector. It concerns the State Required placeholder showing in the wrong situation.
https://forums.cubecart.com/topic/53956-problem-with-state-placeholder-in-620/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants