Hi,
I am using nopcommerce 3.20 source,
is there any way to hide the shipping method step and just go straight from the shipping address to payment method,
i only offer one shipping method so it is pointless the customer seeing this step,
protected virtual JsonResult OpcLoadStepAfterShippingAddress(IList<ShoppingCartItem> cart)
{
var shippingMethodModel = _checkoutModelFactory.PrepareShippingMethodModel(cart, _workContext.CurrentCustomer.ShippingAddress);
if (_shippingSettings.BypassShippingMethodSelectionIfOnlyOne &&
shippingMethodModel.ShippingMethods.Count == 1)
{
//if we have only one shipping method, then a customer doesn't have to choose a shipping method
_genericAttributeService.SaveAttribute(_workContext.CurrentCustomer,
NopCustomerDefaults.SelectedShippingOptionAttribute,
shippingMethodModel.ShippingMethods.First().ShippingOption,
_storeContext.CurrentStore.Id);
//load next step
return OpcLoadStepAfterShippingMethod(cart);
}
return Json(new
{
update_section = new UpdateSectionJsonModel
{
name = "shipping-method",
html = RenderPartialViewToString("OpcShippingMethods", shippingMethodModel)
},
goto_section = "shipping_method"
});
}