Over-ride Shopping Cart with Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I'm trying to get started over-ride the shopping cart with my own model, view, controller.

I need to add some methods, and view display (but other elements of the cart would be the same)

I've started by duplicating the code for my cart plugin by adding copies of the Nop.Web files:

Nop.Web/Controllers/Controllers/ShoppingCartController.cs
Nob.Web/Views/ShoppingCart/*.cshtml
Nop.Web/Models/ShoppingCart/*.cs

I've added the route to my plugin to correctly identify the 'ShoppingCart' route - which leads me to issues with over-riding the shopping cart.

Multiple declarations now exist for the shopping carts controller? So how would I go about 'overriding' them without removing the 'Controllers' in the default Nop.Web

Thanks

Here is the issue I'm having:

Multiple types were found that match the controller named 'ShoppingCart'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter.
12 years ago
I think I understand now, in order to correctly over-ride the 'Shopping Cart' I'm going to have to over-ride the button that invokes the 'Add To Cart' method and other methods within the Shopping Cart to create my unique handlers for each operation.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.