Change Default country on registration page

Marty

Member
Hi,

does anyone know how I can set the "country" option to a default country of my choice for people who register?
 

twisted1919

Administrator
Staff member
From app you can't really do it, but you can do it from javascript as follows:
Create a file named app-custom.js and place it in /customer/assets/js folder
In the file, put this content:
Code:
jQuery(document).ready(function($){
   $(window).on('load', function(){
       if ( $('#CustomerCompany_country_id').length ) {
           $('#CustomerCompany_country_id').val(223).trigger('change');
       }
   });
});
Change 223 with the id of your country: http://pastebin.com/7Ke9wBVY

Enjoy and please renew your support pack.
 

frm.mwz

Well-Known Member
From app you can't really do it, but you can do it from javascript as follows:
Create a file named app-custom.js and place it in /customer/assets/js folder
In the file, put this content:
Code:
jQuery(document).ready(function($){
   $(window).on('load', function(){
       if ( $('#CustomerCompany_country_id').length ) {
           $('#CustomerCompany_country_id').val(223).trigger('change');
       }
   });
});
Change 223 with the id of your country: http://pastebin.com/7Ke9wBVY

Enjoy and please renew your support pack.

This would be great to add to the standard feature set of the app for future release.
 
Top