Skip to content

Commit dda3a5e

Browse files
committed
Fixed rate shipping configuration: Fixed "A public action method 'null' was not found on controller 'SmartStore.Admin.Controllers.ShippingController'"
1 parent 3235f70 commit dda3a5e

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/Plugins/Shipping.FixedRate/Controllers/ShippingFixedRateController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ public ActionResult ShippingRateUpdate(FixedShippingRateModel model, GridCommand
7878
int shippingMethodId = model.ShippingMethodId;
7979
decimal rate = model.Rate;
8080

81-
_settingService.SetSetting(string.Format("ShippingRateComputationMethod.FixedRate.Rate.ShippingMethodId{0}", shippingMethodId), rate);
81+
if (shippingMethodId != 0)
82+
{
83+
_settingService.SetSetting(string.Format("ShippingRateComputationMethod.FixedRate.Rate.ShippingMethodId{0}", shippingMethodId), rate);
84+
}
8285

8386
var tmp = new List<FixedShippingRateModel>();
8487
foreach (var shippingMethod in _shippingService.GetAllShippingMethods())

src/Plugins/Shipping.FixedRate/Description.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FriendlyName: Fixed Rate Shipping
22
SystemName: Shipping.FixedRate
3-
Version: 1.3
3+
Version: 1.31
44
MinAppVersion: 2.0.0
55
DisplayOrder: 1
66
FileName: SmartStore.Plugin.Shipping.FixedRate.dll

src/Plugins/Shipping.FixedRate/RouteProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public partial class RouteProvider : IRouteProvider
88
{
99
public void RegisterRoutes(RouteCollection routes)
1010
{
11-
routes.MapRoute("Plugin.Shipping.FixedRate.Configure",
12-
"Plugins/ShippingFixedRate/Configure",
13-
new { controller = "ShippingFixedRate", action = "Configure" },
11+
routes.MapRoute("Plugin.Shipping.FixedRate.Action",
12+
"Plugins/ShippingFixedRate/{action}",
13+
new { controller = "ShippingFixedRate" },
1414
new[] { "SmartStore.Plugin.Shipping.FixedRate.Controllers" }
1515
)
1616
.DataTokens["area"] = "Shipping.FixedRate";

src/Plugins/Shipping.FixedRate/Views/ShippingFixedRate/Configure.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
.DataKeys(keys => keys.Add(x => x.ShippingMethodId).RouteKey("ShippingMethodId"))
1414
.Columns(columns =>
1515
{
16-
columns.Bound(x => x.ShippingMethodName).Width(300).ReadOnly();
17-
columns.Bound(x => x.Rate).Width(100);
16+
columns.Bound(x => x.ShippingMethodName).Width(500).ReadOnly();
17+
columns.Bound(x => x.Rate).Width(180);
1818
columns.Command(commands =>
1919
{
2020
commands.Edit();
21-
}).Width(100);
21+
});
2222

2323
})
2424
.Editable(x =>

0 commit comments

Comments
 (0)