UpdateCart override not working in v4.0

8 months ago
I am wondering if there is anything that can block an override working ?
I am converting a plugin from v4.2 to v.40.
The UpdateCart override works in v4.2 and v4.1 but it does no work in v4.0

I have a CustomerShoppingCartController loaded in DependencyRegistrar.cs

I have a custom Nop.Plugin.Group.Name\Views\Shared\Components\OrderSummary\Default.cshtml
with the Update Cart button
                        <input type="submit" name="updatecart" value="@T("ShoppingCart.UpdateCart")" class="button-2 update-cart-button" />

Then in the CustomerShoppingCartController I have
        [HttpPost, ActionName("Cart")]
        public override IActionResult UpdateCart(IFormCollection form)

which matches the base IActionResult in ShoppingCartController
        [HttpPost, ActionName("Cart")]
        public virtual IActionResult UpdateCart(IFormCollection form)

For a test I made both routines are exactly the same
The weird thing is there is another override and other routines in CustomShoppingCartController which are being called.
Just the UpdateCart override is not working and it calls the UpdateCart routine in ShoppingCartController

Any suggestions ?
8 months ago
Try to override by Routing

8 months ago
Is it CustomerShoppingCartController  or CustomShoppingCartController?

Can you hit the controller from outside VS with something like Postman?
8 months ago
Sorry my bad typing
Yes it is CustomShoppingCartController
Ok I will have a look at postman