Here's a small adjustment that I just realized and that I am sharing.
The goal is to fill the "EstimateShipping" module on load with the country/region/zipcode of the current customer if possible.
In EstimateShipping.ascx.cs, method BindData(), I added in the else part:
if (NopContext.Current.User != null
&& NopContext.Current.User.CountryId != 0
&& !string.IsNullOrEmpty(NopContext.Current.User.ZipPostalCode))
{
CommonHelper.SelectListItem(ddlCountry, NopContext.Current.User.CountryId);
FillStateProvinceDropDowns();
if (NopContext.Current.User.StateProvinceId != 0)
{
CommonHelper.SelectListItem(ddlStateProvince, NopContext.Current.User.StateProvinceId);
}
this.txtZipPostalCode.Text = NopContext.Current.User.ZipPostalCode;
}
Your comments are welcome (optimization, bug, ...).
Best regards,