@victorelectronics
Thanks for reporting, this is caused by loading everything at once.
Please go to user-profile.php and do this:
Find this code:
<div class="row">
<label for="country"><?php _e('Country', 'sofia'); ?>
<sup>*</sup></label>
<?php UserForm::country_select(osc_get_countries(), osc_user()); ?>
</div>
above this block, place following code:
<?php $user = osc_user(); ?>
<?php $country = Country::newInstance()->listAll(); ?>
<?php if(count($country) <= 1) { $u_country = Country::newInstance()->listAll(); $u_country = $u_country[0]; $user['fk_c_country_code'] = $u_country['pk_c_code']; } ?>
Now find this block:
<div class="row">
<label for="country"><?php _e('Country', 'sofia'); ?>
<sup>*</sup></label>
<?php UserForm::country_select(osc_get_countries(), osc_user()); ?>
</div>
<div class="row">
<label for="region"><?php _e('Region', 'sofia'); ?>
<sup>*</sup></label>
<?php UserForm::region_select(osc_get_regions(), osc_user()); ?>
</div>
<div class="row">
<label for="city"><?php _e('City', 'sofia'); ?>
<sup>*</sup></label>
<?php UserForm::city_select(osc_get_cities(), osc_user()); ?>
</div>
Replace it with:
<div class="row">
<label for="country"><?php _e('Country', 'sofia'); ?>
<sup>*</sup></label>
<?php UserForm::country_select(Country::newInstance()->listAll(), osc_user()); ?>
</div>
<div class="row">
<label for="region"><?php _e('Region', 'sofia'); ?>
<sup>*</sup></label>
<?php UserForm::region_select($user['fk_c_country_code'] <> '' ? osc_get_regions($user['fk_c_country_code']) : '', osc_user()) ; ?>
</div>
<div class="row">
<label for="city"><?php _e('City', 'sofia'); ?>
<sup>*</sup></label>
<?php UserForm::city_select($user['fk_i_region_id'] <> '' ? osc_get_cities($user['fk_i_region_id']) : '', osc_user()) ; ?>
</div>
Let me know if it helped
