Change default country selected in shipping / billing address?
Currently, the default country selected for the checkout widget in address information is Algeria. How can I change that?
Hello, Ryan.
Thank you for contacting us.
The Checkout widget is a complex. largely self-contained control that currently does not have the level of configurability required to change which country is displayed in that dropdown. You would have to create your own checkout widget. If that interests you, please take a look at this blog post which discusses custom checkout and has source code.
I apologize for any inconvenience. Please let us know if you have any further questions.
All the best,
Randy Hodge
the Telerik team
Is there a way to change it using javascript (i.e. during a onload event)?
Anyone still interested in this here was my solution, adapted from Telerik's internal JS that gets called.
Add this to the bottom of your Shipping/billing address form template:
<telerik:RadCodeBlock ID=
"RadCodeBlock1"
runat=
"server"
>
<script type=
"text/javascript"
>
function pageLoad()
var countryShipping = $find($(
".sfCountryShipping"
).attr(
"id"
));
var countryBilling = $find($(
".sfCountryBilling"
).attr(
"id"
));
countryShipping ? countryShipping.findItemByValue(
'AU'
).select() : 0;
countryBilling ? countryBilling.findItemByValue(
'AU'
).select() : 0;
</script>
</telerik:RadCodeBlock>
Just had a thought & caveat. This setup is for a shop that doesn't allow sign in, and therefore the country/state fields are not pre-populated...
Not sure how this will interfere with pre-populated fields, please bear in mind.