Hi,This is my solution, please let me know if anything is missing from your point
1- I created a new method in SelectShippingMethod class :
public void AutoSelect()
{
base.DataBind();
pnlEmpty.Visible = false;
SiteConfigurationSection section = SiteConfigurationSection.GetSection();
methods = ShippingService.GetShippingMethods(ShippingPackage.GetShippingPackage(Cart.Get(),
(Address)Session["ShippingAddress"], section.LocationCountry, section.LocationState, section.LocationCity, section.LocationZipcode));
rptShippingMethods.DataSource = methods;
rptShippingMethods.DataBind();
Session["ShippingMethod"] = methods[0];
}
2 - On OnepageCheckOut.ascx.cs on Page_Load, I added :
if (CheckoutPaymentTypeEnum.PaypalExpress != paymentOption.CheckoutPaymentType) {
BindShippingAddress();
//Auto Select Shipping .... By Bahram
selectShippingMethod.AutoSelect();
}
|