public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            // install - success
            routes.MapLocalizedRoute("Install",
                "install",
                new { controller = "Install", action = "Index" },
                new[] { "Aaron.Core.Web.Controllers" });

            routes.MapLocalizedRoute("InstallSuccess",
                "success",
                new { controller = "Install", action = "Success" },
                new[] { "Aaron.Core.Web.Controllers" });
        }
Exemple #2
0
        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            //We reordered our routes so the most used ones are on top. It can improve performance.

            //home page
            routes.MapLocalizedRoute("HomePage",
                            "",
                            new { controller = "Home", action = "Index" },
                            new[] { "MuhDen.Controllers" });

            //login
            routes.MapLocalizedRoute("Login",
                            "login/",
                            new { controller = "Customer", action = "Login" },
                            new[] { "MuhDen.Controllers" });
            //register
            routes.MapLocalizedRoute("Register",
                            "register/",
                            new { controller = "Customer", action = "Register" },
                            new[] { "MuhDen.Controllers" });
            //logout
            routes.MapLocalizedRoute("Logout",
                            "logout/",
                            new { controller = "Customer", action = "Logout" },
                            new[] { "MuhDen.Controllers" });
            //register result page
            routes.MapLocalizedRoute("RegisterResult",
                            "registerresult/{resultId}",
                            new { controller = "Customer", action = "RegisterResult" },
                            new { resultId = @"\d+" },
                            new[] { "MuhDen.Controllers" });

            routes.MapLocalizedRoute("CustomerAdmin",
                           "CustomerAdmin/{action}/{id}",
                           new { controller = "CustomerAdmin", action = "List", id = "" },
                            new[] { "MuhDen.Controllers" });
        }
        public void RegisterRoutes(System.Web.Routing.RouteCollection routes)
        {
            ViewEngines.Engines.Insert(0, new AUConsignorViewEngine());


            //this is needed to get sename converted to category id - not using as it's too difficult to munge in sale id
            ////routes.MapGenericPathRoute("SaleUrl",
            ////    "{generic_se_name}",
            ////    new { controller = "Common", action = "GenericUrl" },
            ////    new[] { "Nop.Web.Controllers" });


            ////////this will map seo name to your controller/action --- this gets to your action without saleId
            //////routes.MapLocalizedRoute("SaleCategory",
            //////     "{SeName}",

            //////     new { controller = "AUConsignor", action = "Category" },
            //////     new[] { "Nop.Web.Controllers" });

            //////GOT RID OF THIS
            //////routes.MapLocalizedRoute("AUProductDetails",
            //////     "{productid}",       //these names must match the names passed in @Url.RouteUrl
            //////     new { controller = "AUConsignor", action = "ProductDetails" },
            //////      //new { seoName = @"."},
            //////      new[] { "Nop.Web.Controllers" });
            //new { productId = @"\d+", shoppingCartTypeId = @"\d+", quantity = @"\d+" },

            // "Product/ProductDetails/{productid}/{SeName}",

           



            //routes.MapLocalizedRoute("ChangeCurrency",
            //                "changecurrency/{customercurrency}",
            //                new { controller = "Common", action = "SetCurrency" },
            //                new { customercurrency = @"\d+" },
            //                new[] { "Nop.Web.Controllers" });


           // var route = routes.MapRoute("SaleCategory", "AUConsignor/Category/{seoId}/{saleId}",
           //     new { controller = "AUConsignor", action = "Category" }, //What controller and action to use -->notice 'area="Admin"' is added                new { id = @"\d+" },
           //     new { seoId = @".", saleId = @"\d+" },
           //     new[] { "Nop.Web.Controllers" }
           //);
           // routes.Remove(route);
           // routes.Insert(0, route);






            //public static Route MapRoute(this RouteCollection routes, string name, string url, object defaults, object constraints, string[] namespaces);
            //                                //Route Name                                 URL that will be controlled
            //???


            //NULL for now
           // var route = routes.MapRoute("Plugin.Misc.AUConsignor.ManageConsignors", "Admin/AUConsignor/ManageConsignors",
           //     new { controller = "AUConsignor", action = "ManageConsignors" }, //What controller and action to use -->notice 'area="Admin"' is added
           //     new[] { "Nop.Plugin.Misc.AUConsignor.Controllers" }
           //);
           // routes.Remove(route);
           // routes.Insert(0, route);

           // route = null;

            // Uncommented to avoid "routing-the-current-request-for-action-is-ambiguous"
             var route = routes.MapRoute("Plugin.Misc.AUConsignor.EditCustomer", "AUConsignorAdmin/Edit/{id}",
                new { controller = "AUConsignorAdmin", action = "Edit", area = "Admin" }, //What controller and action to use -->notice 'area="Admin"' is added
                new { id = @"\d+" },
                new[] { "Nop.Admin.Controllers" }
           );
            routes.Remove(route);
            routes.Insert(0, route);

            //Override Product edit route 
            //var route2 = routes.MapRoute("Plugin.Misc.AUConsignor.Edit",
            //     "Admin/Product/Edit/{id}",
            //     new { controller = "AULot", action = "Edit", area = "Admin" }, //notice 'area="Admin"' is added
            //     new { id = @"\d+" },
            //     new[] { "Nop.Plugin.Misc.AUConsignor.Controllers" }
            //);


            //Override primary Customer edit routes - You need the promary route definition for the Master view override for some reason
            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.Edit",            //this name can be anything but must be unique in the routetable
                "Admin/Customer/Edit/{id}",
                new { controller = "Customer", action = "Edit", area = "Admin" }, //notice 'area="Admin"' is added
                new { id = @"\d+" },
                new[] { "Nop.Admin.Controllers" }
           );

            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.OrderList",            //this name can be anything but must be unique in the routetable
               "Admin/Customer/OrderList/{id}",
               new { controller = "Customer", action = "OrderList", area = "Admin" }, //notice 'area="Admin"' is added
               new { id = @"\d+" },
               new[] { "Nop.Admin.Controllers" }
          );

            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.AddressesSelect",            //this name can be anything but must be unique in the routetable
               "Admin/Customer/AddressesSelect/{id}",
               new { controller = "Customer", action = "AddressesSelect", area = "Admin" }, //notice 'area="Admin"' is added
               new { id = @"\d+" },
               new[] { "Nop.Admin.Controllers" }
          );

            routes.Remove(route);
            routes.Insert(0, route);


            //Have no clue why this works with one parameter
            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.GetCartList",            //this name can be anything but must be unique in the routetable
               "Admin/Customer/GetCartList/{id}",
               new { controller = "Customer", action = "GetCartList", area = "Admin" }, //notice 'area="Admin"' is added
               new { id = @"\d+" },
               new[] { "Nop.Admin.Controllers" }
          );

            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.ListActivityLog",            //this name can be anything but must be unique in the routetable
              "Admin/Customer/ListActivityLog/{id}",
              new { controller = "Customer", action = "ListActivityLog", area = "Admin" }, //notice 'area="Admin"' is added
              new { id = @"\d+" },
              new[] { "Nop.Admin.Controllers" }
         );

            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.RewardPointsHistorySelect",            //this name can be anything but must be unique in the routetable
              "Admin/Customer/RewardPointsHistorySelect/{id}",
              new { controller = "Customer", action = "RewardPointsHistorySelect", area = "Admin" }, //notice 'area="Admin"' is added
              new { id = @"\d+" },
              new[] { "Nop.Admin.Controllers" }
         );

            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("AddressEdit",
                           "customer/addressedit/{addressId}",
                           new { controller = "Customer", action = "AddressEdit", area = "Admin" },
                           new { addressId = @"\d+" },
                           new[] { "Nop.Admin.Controllers" });

 ////////           route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.AddressEdit",            //this name can be anything but must be unique in the routetable
 ////////             "Admin/Customer/AddressEdit/{addressId}/{customerId}",
 ////////             new { controller = "Customer", action = "AddressEdit", area = "Admin" }, //notice 'area="Admin"' is added
 //////////             new { addressId = @"\d+", customerId = @"\d+" },
 ////////             new[] { "Nop.Admin.Controllers" }
 ////////        );


         //   route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.AddressEdit",            //this name can be anything but must be unique in the routetable
         //     "Admin/Customer/AddressEdit/{id}",
         //     new { controller = "Customer", action = "AddressEdit", area = "Admin" }, //notice 'area="Admin"' is added
         //     new { id = @"\d+"},
         //     new[] { "Nop.Admin.Controllers" }
         //);

            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.CreateAddress",            //this name can be anything but must be unique in the routetable
          "Admin/Customer/AddressCreate/{id}",
          new { controller = "Customer", action = "AddressCreate", area = "Admin" }, //notice 'area="Admin"' is added
          new { id = @"\d+" },
          new[] { "Nop.Admin.Controllers" }
        );

            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.SendEmail",            //this name can be anything but must be unique in the routetable
              "Admin/Customer/SendEmail/{id}",
              new { controller = "Customer", action = "SendEmail", area = "Admin" }, //notice 'area="Admin"' is added
              new { id = @"\d+" },
              new[] { "Nop.Admin.Controllers" }
         );

            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.SendPm",            //this name can be anything but must be unique in the routetable
              "Admin/Customer/SendPm/{id}",
              new { controller = "Customer", action = "SendPm", area = "Admin" }, //notice 'area="Admin"' is added
              new { id = @"\d+" },
              new[] { "Nop.Admin.Controllers" }
         );

            routes.Remove(route);
            routes.Insert(0, route);





            route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.Delete",            //this name can be anything but must be unique in the routetable
              "Admin/Customer/Delete/{id}",
              new { controller = "Customer", action = "Delete", area = "Admin" }, //notice 'area="Admin"' is added
              new { id = @"\d+" },
              new[] { "Nop.Admin.Controllers" }
         );

            routes.Remove(route);
            routes.Insert(0, route);




            //-------------------------------------------------------------------------------------------------------------------------------------------

            //Override primary Product edit route - You need this primary route definition for the Master Edit.cshtml view override for some reason
            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.Edit",
                 "Admin/Product/Edit/{id}",
                 new { controller = "Product", action = "Edit", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            //Override primary Product Create route - You need this primary route definition for the Master Create.cshtml view override for some reason
            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.Create",
                 "Admin/Product/Create",
                 new { controller = "Product", action = "Create", area = "Admin" }, //notice 'area="Admin"' is added
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductPictureList",
                 "Admin/Product/ProductPictureList/{id}",
                 new { controller = "Product", action = "ProductPictureList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductCategoryList",
                 "Admin/Product/ProductCategoryList/{id}",
                 new { controller = "Product", action = "ProductCategoryList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductCategoryDelete",
                "Admin/Product/ProductCategoryDelete/{id}",
                new { controller = "Product", action = "ProductCategoryDelete", area = "Admin" }, //notice 'area="Admin"' is added
                new { id = @"\d+" },
                new[] { "Nop.Admin.Controllers" }
           );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductManufacturerList",
                 "Admin/Product/ProductManufacturerList/{id}",
                 new { controller = "Product", action = "ProductManufacturerList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductSpecAttrList",
                 "Admin/Product/ProductSpecAttrList/{id}",
                 new { controller = "Product", action = "ProductSpecAttrList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductAttributeMappingList",
                 "Admin/Product/ProductAttributeMappingList/{id}",
                 new { controller = "Product", action = "ProductAttributeMappingList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductAttributeCombinationList",
                 "Admin/Product/ProductAttributeCombinationList/{id}",
                 new { controller = "Product", action = "ProductAttributeCombinationList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.TierPriceList",
                 "Admin/Product/TierPriceList/{id}",
                 new { controller = "Product", action = "TierPriceList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.RelatedProductList",
                 "Admin/Product/RelatedProductList/{id}",
                 new { controller = "Product", action = "RelatedProductList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.CrossSellProductList",
                 "Admin/Product/CrossSellProductList/{id}",
                 new { controller = "Product", action = "CrossSellProductList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.AssociatedProductList",
                 "Admin/Product/AssociatedProductList/{id}",
                 new { controller = "Product", action = "AssociatedProductList", area = "Admin" }, //notice 'area="Admin"' is added
                 new { id = @"\d+" },
                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.PurchasedWithOrders",
                 "Admin/Product/PurchasedWithOrders/{id}",
                 new { controller = "Product", action = "PurchasedWithOrders", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.PurchasedWithOrders",
                 "Admin/Product/PurchasedWithOrders/{id}",
                 new { controller = "Product", action = "PurchasedWithOrders", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.Delete",
                 "Admin/Product/Delete/{id}",
                 new { controller = "Product", action = "Delete", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductPictureAdd",
                 "Admin/Product/ProductPictureAdd/{id}",
                 new { controller = "Product", action = "ProductPictureAdd", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductCategoryInsert",
                 "Admin/Product/ProductCategoryInsert/{id}",
                 new { controller = "Product", action = "ProductCategoryInsert", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);





            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductManufacturerInsert",
                 "Admin/Product/ProductManufacturerInsert/{id}",
                 new { controller = "Product", action = "ProductManufacturerInsert", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);





            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductSpecificationAttributeAdd",
                 "Admin/Product/ProductSpecificationAttributeAdd/{id}",
                 new { controller = "Product", action = "ProductSpecificationAttributeAdd", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            

            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.ProductAttributeMappingInsert",
                 "Admin/Product/ProductAttributeMappingInsert/{id}",
                 new { controller = "Product", action = "ProductAttributeMappingInsert", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            

            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.TierPriceInsert",
                 "Admin/Product/TierPriceInsert/{id}",
                 new { controller = "Product", action = "TierPriceInsert", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            

            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.RelatedProductAddPopup",
                 "Admin/Product/RelatedProductAddPopup/{id}",
                 new { controller = "Product", action = "RelatedProductAddPopup", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);

            

            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.CrossSellProductAddPopup",
                 "Admin/Product/CrossSellProductAddPopup/{id}",
                 new { controller = "Product", action = "CrossSellProductAddPopup", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.RelatedProductAddPopupList",
                 "Admin/Product/RelatedProductAddPopupList/{id}",
                 new { controller = "Product", action = "RelatedProductAddPopupList", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.AssociatedProductAddPopupList",
                 "Admin/Product/AssociatedProductAddPopupList/{id}",
                 new { controller = "Product", action = "AssociatedProductAddPopupList", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);

            

            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.CrossSellProductAddPopupList",
                 "Admin/Product/CrossSellProductAddPopupList/{id}",
                 new { controller = "Product", action = "CrossSellProductAddPopupList", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.AssociatedProductAddPopup",
                "Admin/Product/AssociatedProductAddPopup/{id}",
                new { controller = "Product", action = "AssociatedProductAddPopup", area = "Admin" }, //notice 'area="Admin"' is added

                new[] { "Nop.Admin.Controllers" }
           );


            routes.Remove(route);
            routes.Insert(0, route);

            
            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.RelatedProductUpdate",
                 "Admin/Product/RelatedProductUpdate/{id}",
                 new { controller = "Product", action = "RelatedProductUpdate", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            
            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.RelatedProductDelete",
                 "Admin/Product/RelatedProductDelete/{id}",
                 new { controller = "Product", action = "RelatedProductDelete", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);




            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.CrossSellProductDelete",
                 "Admin/Product/CrossSellProductDelete/{id}",
                 new { controller = "Product", action = "CrossSellProductDelete", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Admin.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);


            //-------------------------------------------------------------------------------------------------------------------------------------------

            //Override primary Product list route - You need this promary route definition for the Master view override for some reason
            route = routes.MapRoute("Plugin.Misc.AUConsignor.Product.List",
                 "Admin/Product/List",
                 new { controller = "Product", action = "List", area = "Admin" }, //notice 'area="Admin"' is added
                 new[] { "Nop.Admin.Controllers" }
            );

            routes.Remove(route);
            routes.Insert(0, route);


            //this overrides the catalog/products list to go to the lot lister
            route = routes.MapRoute("Plugin.Misc.AUConsignor.ProductList",
                 "Admin/Product/List",
                 new { controller = "AUConsignor", action = "ListLots", area = "Admin" }, //notice 'area="Admin"' is added

                 new[] { "Nop.Plugin.Misc.AUConsignor.Controllers" }
            );


            routes.Remove(route);
            routes.Insert(0, route);



            route = routes.MapRoute("Plugin.Misc.AUConsignor.AUFile.ASyncUpload",
                "Admin/AUFile/ASyncUpload",
                new { controller = "AUFile", action = "ASyncUpload", area = "Admin" }, //notice 'area="Admin"' is added
                //new { id = @"\d+" },
                new[] { "Nop.Admin.Controllers" }
           );


            routes.Remove(route);
            routes.Insert(0, route);


            route = routes.MapRoute("Plugin.Misc.AUConsignor.AUFile.ConsignmentFileAdd",
                "Admin/AUFile/ConsignmentFileAdd",
                new { controller = "AUFile", action = "ConsignmentFileAdd", area = "Admin" }, //notice 'area="Admin"' is added
                //new { id = @"\d+" },
                new[] { "Nop.Admin.Controllers" }
           );


            routes.Remove(route);
            routes.Insert(0, route);




            //------------------------------- FRONT END ---------------------------------------------

            //NJM: this is for categorynavigation.cshtml: <a href="@Url.RouteUrl("AUSaleCategory", new { categoryId = category.CategoryId, saleId = insaleId })">@category.Name
            routes.MapLocalizedRoute("AUSaleCategory",
                "{categoryId}/{saleId}",       //these names must match the names passed in @Url.RouteUrl
                new { controller = "AUPublic", action = "Category" },
                 new { categoryId = @"\d+" },       //NJM: !!!Make sure you put this constraint in or else it starts picking up everything in /AUConsignor/XXX
                //new { seoName = @"."},
                 new[] { "Nop.Web.Controllers" });

            //////add bid to lot - used on the product details pages.
            ////routes.MapLocalizedRoute("AddBidToLot-Details",
            ////                "addbidtolot",
            ////                new { controller = "AUPublic", action = "AddBidToLot_Details" },
            ////    // new { productId = @"\d+", bidAmt = @"\d+", bidUid = @"\d+" },
            ////    //new { productId = @"\d+", bidAmt = @"\d+" },
            ////                new[] { "Nop.Web.Controllers" });

            //add bid to lot - used on the product details pages.
            routes.MapLocalizedRoute("AddBidToLot-Details",
                            "addbidtolot/{productId}",
                            new { controller = "AUPublic", action = "AddBidToLot_Details" },
                             new { productId = @"\d+"},
                            new[] { "Nop.Web.Controllers" });

            ////////////add product to cart (with attributes and options). used on the product details pages.
            //////////routes.MapLocalizedRoute("AddProductToCart-Details",
            //////////                "addproducttocart/details/{productId}/{shoppingCartTypeId}",
            //////////                new { controller = "ShoppingCart", action = "AddProductToCart_Details" },
            //////////                new { productId = @"\d+", shoppingCartTypeId = @"\d+" },
            //////////                new[] { "Nop.Web.Controllers" });
       




            routes.MapLocalizedRoute("AUConsignorProductEmailInquiry",
                "productemailinquiry/{productId}",
                new { controller = "AUPublic", action = "AUConsignorProductEmailInquiry" },
                new { productId = @"\d+" },
                new[] { "Nop.Web.Controllers" });


            routes.MapLocalizedRoute("RefreshLot_Details",
                            "RefreshLot_Details",
                            new { controller = "AUPublic", action = "RefreshLot_Details" },
                // new { productId = @"\d+", bidAmt = @"\d+", bidUid = @"\d+" },
                //new { productId = @"\d+", bidAmt = @"\d+" },
                            new[] { "Nop.Web.Controllers" });

            routes.MapLocalizedRoute("RefreshLot_Redirect",
                            "RefreshLot_Redirect",
                            new { controller = "AUPublic", action = "RefreshLot_Redirect" },
                // new { productId = @"\d+", bidAmt = @"\d+", bidUid = @"\d+" },
                //new { productId = @"\d+", bidAmt = @"\d+" },
                            new[] { "Nop.Web.Controllers" });

            routes.MapLocalizedRoute("CompareLastLotBidChange",
                            "CompareLastLotBidChange",
                            new { controller = "AUPublic", action = "CompareLastLotBidChange" },
                            new[] { "Nop.Web.Controllers" });


            routes.MapLocalizedRoute("AUProductSearch",
                            "search/",
                            new { controller = "AUPublic", action = "Search" },
                            new[] { "Nop.Web.Controllers" });

            //overrides Wishlist
            routes.MapLocalizedRoute("AUWishlist",
                            "wishlist/{customerGuid}",
                            new { controller = "AUPublic", action = "Wishlist", customerGuid = UrlParameter.Optional },
                            new[] { "Nop.Web.Controllers" });

            //copied from Wishlist
            routes.MapLocalizedRoute("AUMybids",
                            "mybids/{customerGuid}",
                            new { controller = "AUPublic", action = "Mybids", customerGuid = UrlParameter.Optional },
                            new[] { "Nop.Web.Controllers" });




            //routes.MapLocalizedRoute("HomepageProducts",
            //                "AUConsignor/HomepageProducts",
            //                new { controller = "AUConsignor", action = "HomepageProducts" },
            //                new[] { "Nop.Web.Controllers" });

             //routes.MapLocalizedRoute("AUHomePage",
             //               "",
             //               new { controller = "AUConsignor", action = "Index" },
             //               new[] { "Nop.Web.Controllers" });


            //routes.Remove(route);
            //routes.Insert(0, route);

            //Override primary Customer edit routes - You need the promary route definition for the Master view override for some reason
           // route = routes.MapRoute("Plugin.Misc.AUConsignor.Customer.Edit",            //this name can be anything but must be unique in the routetable
           //     "Admin/Customer/Edit/{id}",
           //     new { controller = "Customer", action = "Edit", area = "Admin" }, //notice 'area="Admin"' is added
           //     new { id = @"\d+" },
           //     new[] { "Nop.Admin.Controllers" }
           //);

           // routes.Remove(route);
           // routes.Insert(0, route);


              //route = routes.MapRoute("Plugin.Misc.AUConsignor.ProductDetails",

            //This had no effect on the sename route below
            //generic URLs
            //routes.MapGenericPathRoute("GenericUrl2",
            //                           "{generic_se_name}",
            //                           new { controller = "Common", action = "GenericUrl" },
            //                           new[] { "Nop.Web.Controllers" });


            //*****OK this works but gets to an action with no signature, and applies to all seo names
            //////route = routes.MapRoute("Product",
            //////     "{SeName}",
            //////     new { controller = "AUConsignor", action = "ProductDetails" }, //notice 'area="Admin"' is not added
            //////     new[] { "Nop.Plugin.Misc.AUConsignor.Controllers" }
            //////);

            ////////                 "Product/ProductDetails/{productid}/{SeName}",

            //////routes.Remove(route);
            //////routes.Insert(0, route);


            
            //new { controller = "Product", action = "ProductList", area = "Admin" }, //notice 'area="Admin"' is added
            //new[] { "Nop.Admin.Controllers" }

            
                
            //http://localhost:15536/Product/RelatedProductAddPopup?productId=4&btnId=btnRefreshRelatedProducts&formId=product-form
            //--> RelatedProductAddPopupList
            //http://localhost:15536/Product/CrossSellProductAddPopup?productId=4&btnId=btnRefreshCrossSellProducts&formId=product-form
            //--> CrossSellProductAddPopupList






            // new { controller = "AUConsignorAdmin", action = "Edit", area = "Admin" }, //What controller and action to use -->notice 'area="Admin"' is added
            // new[] { "Nop.Admin.Controllers" }

            //this worked but took another approach so as not to copy entire customer controller into your controller
            //                                //Route Name                                 URL
            //var route = routes.MapRoute("Plugin.Misc.AUConsignor.EditCustomer", "Admin/Customer/Edit/{id}",
            //     new { controller = "AUConsignor", action = "EditCustomer", area = "Admin" }, //notice 'area="Admin"' is added
            //     new { id = @"\d+" },
            //     new[] { "Nop.Plugin.Misc.AUConsignor.Controllers" }
            //);
            //routes.Remove(route);
            //routes.Insert(0, route); 

           

        }