Page 1 of 1

Preselected region

Posted: Mon May 25, 2020 7:06 pm
by oplini
Hello my store is locate in Netherlands so if a guest buy something hi Will find Netherlands as preselected country in billing and shipping informazioni.
I would like preselected also a region for take off --plese select-- Like preselected choise.
How can I do it?

Re: Preselected region

Posted: Mon May 25, 2020 11:44 pm
by rjcalifornia
oplini wrote:
Mon May 25, 2020 7:06 pm
Hello my store is locate in Netherlands so if a guest buy something hi Will find Netherlands as preselected country in billing and shipping informazioni.
I would like preselected also a region for take off --plese select-- Like preselected choise.
How can I do it?
There are two ways to accomplish that:

1. Delete all countries except the one you need, that way the user will only see one country

2. Edit the checkout file, and use JavaScript to preselect the country. You should take into account that the values of the dropdown are IDs, not the ISO name. The JavaScript code will look like this:

Code: Select all

document.getElementById("input-payment-country").value= "21";

Re: Preselected region

Posted: Wed May 27, 2020 12:19 pm
by cedcommerceteam
oplini wrote:
Mon May 25, 2020 7:06 pm
Hello my store is locate in Netherlands so if a guest buy something hi Will find Netherlands as preselected country in billing and shipping informazioni.
I would like preselected also a region for take off --plese select-- Like preselected choise.
How can I do it?
Hi there,

Can you please share screenshot as while guest checkout preselected country shows in list as selected one but there are other countries in a list as well so guests can also change that, so what exactly you mean? Please clear your point.

Thanks !!!