예제 #1
0
 private static void MapWishlistRoutes(MrCMSAppRegistrationContext context)
 {
     context.MapRoute("Wishlist - Add to Wishlist", "Apps/Ecommerce/AddToWishlist",
                      new { controller = "Wishlist", action = "Add" },
                      new[] { typeof(WishlistController).Namespace });
     context.MapRoute("Wishlist - Remove from Wishlist", "Apps/Ecommerce/RemoveFromWishlist",
                      new { controller = "Wishlist", action = "Remove" },
                      new[] { typeof(WishlistController).Namespace });
     context.MapRoute("Wishlist - Summary", "Apps/Ecommerce/WishlistSummary",
                      new { controller = "Wishlist", action = "Summary" },
                      new[] { typeof(WishlistController).Namespace });
 }
예제 #2
0
        private static void MapUserAccount(MrCMSAppRegistrationContext context)
        {
            context.MapRoute("Update User Info", "user-account/handle/user-info",
                             new { controller = "UserAccountInfo", action = "UpdateUserInfo" },
                             new[] { typeof(UserAccountInfoController).Namespace });

            context.MapRoute("Update Password", "user-account/handle/update-password",
                             new { controller = "UserAccountChangePassword", action = "UpdatePassword" },
                             new[] { typeof(UserAccountChangePasswordController).Namespace });

            context.MapRoute("User Account - Edit", "user-account/handle/edit-address",
                             new { controller = "UserAccountEditAddress", action = "Edit" },
                             new[] { typeof(UserAccountEditAddressController).Namespace });

            context.MapRoute("User Account - Delete Address", "user-account/handle/delete-address/{id}",
                             new { controller = "UserAccountAddresses", action = "DeleteAddress" },
                             new[] { typeof(UserAccountAddressesController).Namespace });
        }
예제 #3
0
        protected override void RegisterApp(MrCMSAppRegistrationContext context)
        {
            context.MapAreaRoute("Commenting admin controllers", "Admin", "Admin/Apps/Commenting/{controller}/{action}/{id}",
                                 new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                                 new[] { typeof(CommentingSettingsController).Namespace });

            context.MapRoute("Add Comments Form", "comments/add/{id}",
                             new { controller = "Comments", action = "Add" },
                             new[] { typeof(CommentsController).Namespace });

            context.MapRoute("Show Comments", "comments/Show/{id}",
                             new { controller = "Comments", action = "Show" },
                             new[] { typeof(CommentsController).Namespace });

            context.MapRoute("Guest Comment", "comments/Post/Guest",
                             new { controller = "Comments", action = "Guest" },
                             new[] { typeof(CommentsController).Namespace });

            context.MapRoute("Logged in Comment", "comments/Post/User",
                             new { controller = "Comments", action = "LoggedIn" },
                             new[] { typeof(CommentsController).Namespace });

            context.MapRoute("Comment - Upvote", "comments/upvote",
                             new { controller = "CommentVoting", action = "Upvote" },
                             new[] { typeof(CommentVotingController).Namespace });

            context.MapRoute("Comment - Downvote", "comments/downvote",
                             new { controller = "CommentVoting", action = "Downvote" },
                             new[] { typeof(CommentVotingController).Namespace });

            context.MapRoute("Comment - Report", "comments/report",
                             new { controller = "CommentReporting", action = "Report" },
                             new[] { typeof(CommentReportingController).Namespace });

            context.MapRoute("Unique Username Check", "comments/username-check",
                             new { controller = "CommentingUserAccount", action = "IsUniqueUsername" },
                             new[] { typeof(CommentingUserAccountController).Namespace });

            context.MapRoute("Update Username", "comments/update-username",
                             new { controller = "CommentingUserAccount", action = "UpdateUsername" },
                             new[] { typeof(CommentingUserAccountController).Namespace });
        }
예제 #4
0
파일: CoreApp.cs 프로젝트: yxb1987/MrCMS
        protected override void RegisterApp(MrCMSAppRegistrationContext context)
        {
            context.MapRoute("External Login", "external-login", new { controller = "ExternalLogin", action = "Login" });
            context.MapRoute("External Login Callback", "external-login/callback",
                             new { controller = "ExternalLogin", action = "Callback" });

            context.MapRoute("User Registration", "Registration/RegistrationDetails",
                             new { controller = "Registration", action = "RegistrationDetails" });
            context.MapRoute("User Registration - check email", "Registration/CheckEmailIsNotRegistered",
                             new { controller = "Registration", action = "CheckEmailIsNotRegistered" });

            context.MapRoute("UserAccountController - account details", "UserAccount/UserAccountDetails",
                             new { controller = "UserAccount", action = "UserAccountDetails" });
            context.MapRoute("UserAccountController - check email isn't already registered", "UserAccount/IsUniqueEmail",
                             new { controller = "UserAccount", action = "IsUniqueEmail" });

            context.MapRoute("UserAccountController - change password", "UserAccount/ChangePassword",
                             new { controller = "UserAccount", action = "ChangePassword" });
        }
예제 #5
0
파일: StatsApp.cs 프로젝트: 79it/Page-Stats
 protected override void RegisterApp(MrCMSAppRegistrationContext context)
 {
     context.MapRoute("Analytics handler", "analytics/log-page-view",
                      new { controller = "Analytics", action = "LogPageView" },
                      new[] { typeof(AnalyticsController).Namespace });
 }
예제 #6
0
        public static void RegisterRoutes(MrCMSAppRegistrationContext context)
        {
            context.MapAreaRoute("Admin controllers", "Admin", "Admin/Apps/Ecommerce/{controller}/{action}/{id}",
                                 new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                                 new[] { typeof(ProductController).Namespace });
            context.MapRoute("Product Variant - GetPriceBreaksForProductVariant",
                             "Apps/Ecommerce/ProductVariant/GetPriceBreaksForProductVariant",
                             new { controller = "ProductVariant", action = "GetPriceBreaksForProductVariant" });

            MapCartRoutes(context);
            MapCheckoutRoutes(context);
            MapPaymentMethodRoutes(context);
            MapRemoteValidationRoutes(context);
            MapWishlistRoutes(context);
            MapUserAccount(context);

            context.MapRoute("User Account Orders", "Apps/Ecommerce/UserAccount/UserAccountOrders",
                             new { controller = "UserAccount", action = "UserAccountOrders" });
            context.MapRoute("User Account - download Order PDF", "Apps/Ecommerce/OrderPdf/ExportOrderToPdf/{id}",
                             new { controller = "OrderPdf", action = "ExportOrderToPdf" },
                             new[] { typeof(OrderPdfController).Namespace });
            context.MapRoute("Product Search - Query", "search/query",
                             new { controller = "ProductSearch", action = "Query" }, new[] { typeof(ProductSearchController).Namespace });
            context.MapRoute("Product Search - Results", "search/results",
                             new { controller = "ProductSearch", action = "Results" },
                             new[] { typeof(ProductSearchController).Namespace });

            context.MapRoute("Brand Search - Query", "brand/search/query",
                             new { controller = "Brand", action = "Query" }, new[] { typeof(BrandController).Namespace });
            context.MapRoute("Brand Search - Results", "brand/search/results",
                             new { controller = "Brand", action = "Results" },
                             new[] { typeof(BrandController).Namespace });

            context.MapRoute("Category Container - Categories", "Apps/Ecommerce/CategoryContainer/Categories",
                             new { controller = "CategoryContainer", action = "Categories" },
                             new[] { typeof(ProductContainer).Namespace });

            context.MapRoute("Export Google Base Feed", "export/google-base-feed",
                             new { controller = "GoogleBaseFeed", action = "ExportProductsToGoogleBaseInResponse" },
                             new[] { typeof(GoogleBaseFeedController).Namespace });

            context.MapRoute("Products - Back in stock request", "Apps/Ecommerce/Product/BackInStock",
                             new { controller = "Product", action = "BackInStock" }, new[] { typeof(ProductController).Namespace });


            context.MapRoute("Download Product", "digital-download/{guid}/{id}",
                             new { controller = "DownloadOrderedFile", action = "Download" },
                             new[] { typeof(DownloadOrderedFileController).Namespace });

            context.MapRoute("Product - Get Variant Details", "product/variant-details/{id}",
                             new { controller = "ProductVariant", action = "Details" }, new[] { typeof(ProductVariantController).Namespace });

            //Product Reviews
            context.MapRoute("Product Review", "Apps/Ecommerce/ProductReview/Add",
                             new { controller = "ProductReview", action = "Add" },
                             new[] { typeof(ProductReviewController).Namespace });

            context.MapRoute("Product Reviews Paging", "Apps/Ecommerce/ProductVariant/ProductReviews",
                             new { controller = "ProductVariant", action = "ProductReviews" });

            context.MapRoute("Product Review Helpfulness Vote Yes", "Apps/Ecommerce/ProductReview/HelpfulnessVotes",
                             new { controller = "ProductReview", action = "HelpfulnessVotes" },
                             new[] { typeof(ProductReviewController).Namespace });

            context.MapRoute("Product Review Helpfulness Vote No", "Apps/Ecommerce/ProductReview/UnhelpfulnessVotes",
                             new { controller = "ProductReview", action = "UnhelpfulnessVotes" },
                             new[] { typeof(ProductReviewController).Namespace });

            // Public Routes
            context.MapRoute("Generate Contact Us Map", "get-contact-map",
                             new { controller = "ContactUs", action = "GenerateMap" },
                             new[] { typeof(ContactUsController).Namespace });
        }
예제 #7
0
        private static void MapCartRoutes(MrCMSAppRegistrationContext context)
        {
            context.MapRoute("Cart - Details", "Apps/Ecommerce/CartDetails",
                             new { controller = "Cart", action = "Details" },
                             new[] { typeof(CartController).Namespace });

            context.MapRoute("Cart - Header Summary", "Apps/Ecommerce/CartHeader",
                             new { controller = "Cart", action = "HeaderSummary" },
                             new[] { typeof(CartController).Namespace });

            context.MapRoute("Cart - Update Basket", "Apps/Ecommerce/UpdateBasket",
                             new { controller = "Cart", action = "UpdateBasket" },
                             new[] { typeof(CartController).Namespace });

            context.MapRoute("Cart - Empty Basket", "Apps/Ecommerce/EmptyBasket",
                             new { controller = "EmptyBasket", action = "Empty" },
                             new[] { typeof(EmptyBasketController).Namespace });

            context.MapRoute("Cart - Add to Cart", "Apps/Ecommerce/AddToCart",
                             new { controller = "AddToCart", action = "Add" });

            context.MapRoute("Cart - Delete Cart Item", "Apps/Ecommerce/DeleteCartItem",
                             new { controller = "Cart", action = "DeleteCartItem" });

            context.MapRoute("Cart - Apply Discount Code", "Apps/Ecommerce/ApplyDiscountCode",
                             new { controller = "Discount", action = "Apply" });

            context.MapRoute("Cart - Remove Discount Code", "Apps/Ecommerce/RemoveDiscountCode",
                             new { controller = "Discount", action = "Remove" });

            context.MapRoute("Cart - Apply Gift Card Code", "Apps/Ecommerce/ApplyGiftCardCode",
                             new { controller = "GiftCard", action = "Apply" },
                             new[] { typeof(GiftCardController).Namespace });

            context.MapRoute("Cart - Remove Gift Card Code", "Apps/Ecommerce/RemoveGiftCardCode",
                             new { controller = "GiftCard", action = "Remove" },
                             new[] { typeof(GiftCardController).Namespace });

            context.MapRoute("Cart - Save Gift Message", "Apps/Ecommerce/SaveGiftMessage",
                             new { controller = "GiftMessage", action = "Save" },
                             new[] { typeof(GiftMessageController).Namespace });

            context.MapRoute("Cart - Use Reward Points", "Apps/Ecommerce/UseRewardPoints",
                             new { controller = "CartRewardPoints", action = "Save" },
                             new[] { typeof(CartRewardPointsController).Namespace });
        }
예제 #8
0
        private static void MapCheckoutRoutes(MrCMSAppRegistrationContext context)
        {
            context.MapRoute("Set Shipping Details - Edit Shipping Address",
                             "Apps/Ecommerce/SetShippingAddress/ShippingAddress",
                             new { controller = "SetShippingAddress", action = "ShippingAddress" },
                             new[] { typeof(SetShippingAddressController).Namespace });

            context.MapRoute("Set Shipping Details - Show Shipping Address",
                             "Apps/Ecommerce/SetShippingAddress/ShowShippingAddress",
                             new { controller = "SetShippingAddress", action = "ShowShippingAddress" },
                             new[] { typeof(SetShippingAddressController).Namespace });

            context.MapRoute("Set Shipping Details - Set Shipping Address",
                             "Apps/Ecommerce/SetShippingAddress/SetAddress",
                             new { controller = "SetShippingAddress", action = "SetAddress" },
                             new[] { typeof(SetShippingAddressController).Namespace });


            context.MapRoute("Set Shipping Details - Awaiting Address",
                             "Apps/Ecommerce/SetShippingMethod/AwaitingAddress",
                             new { controller = "SetShippingMethod", action = "AwaitingAddress" },
                             new[] { typeof(SetShippingMethodController).Namespace });

            context.MapRoute("Set Shipping Details - Get Shipping Options",
                             "Apps/Ecommerce/SetShippingMethod/ShippingOptions",
                             new { controller = "SetShippingMethod", action = "ShippingOptions" },
                             new[] { typeof(SetShippingMethodController).Namespace });

            context.MapRoute("Set Shipping Details - Set Shipping Method",
                             "Apps/Ecommerce/SetShippingMethod/SetShipping",
                             new { controller = "SetShippingMethod", action = "SetShipping" },
                             new[] { typeof(SetShippingMethodController).Namespace });

            context.MapRoute("Set Shipping Details - Set Shipping Date",
                             "Apps/Ecommerce/SetShippingDate",
                             new { controller = "SetShippingDate", action = "SetDate" },
                             new[] { typeof(SetShippingDateController).Namespace });


            context.MapRoute("Enter Order Email - Set Order Email", "Apps/Ecommerce/SetOrderEmail",
                             new { controller = "EnterOrderEmail", action = "SetOrderEmail" },
                             new[] { typeof(EnterOrderEmailController).Namespace });

            context.MapRoute("Enter Order Email - Set Order Email And Login", "Apps/Ecommerce/SetOrderEmailAndLogin",
                             new { controller = "EnterOrderEmail", action = "SetOrderEmailAndLogin" },
                             new[] { typeof(EnterOrderEmailController).Namespace });

            context.MapRoute("Checkout - Price Summary", "Apps/Ecommerce/Checkout/Summary",
                             new { controller = "Checkout", action = "Summary" },
                             new[] { typeof(CheckoutController).Namespace });

            context.MapRoute("Checkout - Billing Address same as Shipping Address",
                             "Apps/Ecommerce/PaymentDetails/BillingAddressSameAsShippingAddress",
                             new { controller = "PaymentDetails", action = "BillingAddressSameAsShippingAddress" },
                             new[] { typeof(PaymentDetailsController).Namespace });

            context.MapRoute("Checkout - Update Billing Address", "Apps/Ecommerce/PaymentDetails/UpdateBillingAddress",
                             new { controller = "PaymentDetails", action = "UpdateBillingAddress" },
                             new[] { typeof(PaymentDetailsController).Namespace });

            context.MapRoute("Checkout - Save Billing Address", "Apps/Ecommerce/PaymentDetails/SaveBillingAddress",
                             new { controller = "PaymentDetails", action = "SaveBillingAddress" },
                             new[] { typeof(PaymentDetailsController).Namespace });

            context.MapRoute("Checkout - Accept Terms And Conditions", "Apps/Ecommerce/terms-and-conditions/set",
                             new { controller = "TermsAndConditions", action = "Set" },
                             new[] { typeof(TermsAndConditionsController).Namespace });

            context.MapRoute("Checkout - Set Payment Method", "Apps/Ecommerce/PaymentDetails/SetPaymentMethod",
                             new { controller = "PaymentDetails", action = "SetPaymentMethod" },
                             new[] { typeof(PaymentDetailsController).Namespace });

            context.MapRoute("Checkout - Get Payment Methods", "Apps/Ecommerce/PaymentDetails/Methods",
                             new { controller = "PaymentDetails", action = "Methods" },
                             new[] { typeof(PaymentDetailsController).Namespace });

            context.MapRoute("Order Placed - Login and associate order", "order-placed/login",
                             new { controller = "OrderPlaced", action = "LoginAndAssociateOrder" },
                             new[] { typeof(OrderPlacedController).Namespace });

            context.MapRoute("Order Placed - Register and associate order - other", "order-placed/register",
                             new { controller = "OrderPlaced", action = "RegisterAndAssociateOrder" },
                             new[] { typeof(OrderPlacedController).Namespace });
        }
예제 #9
0
        private static void MapPaymentMethodRoutes(MrCMSAppRegistrationContext context)
        {
            context.MapRoute("Cash On Delivery - Form", "Apps/Ecommerce/Confirm/CashOnDelivery",
                             new { controller = "CashOnDelivery", action = "Form" },
                             new[] { typeof(CashOnDeliveryController).Namespace });

            context.MapRoute("Payment Not Required - Form", "Apps/Ecommerce/Confirm/PaymentNotRequired",
                             new { controller = "PaymentNotRequired", action = "Form" },
                             new[] { typeof(PaymentNotRequiredController).Namespace });

            context.MapRoute("Paypoint - Form", "Apps/Ecommerce/Confirm/Paypoint",
                             new { controller = "Paypoint", action = "Form" },
                             new[] { typeof(PaypointController).Namespace });
            context.MapRoute("SagePay - Form", "Apps/Ecommerce/Confirm/SagePay",
                             new { controller = "SagePay", action = "Form" },
                             new[] { typeof(SagePayController).Namespace });

            context.MapRoute("PayPal Express Checkout - Form", "Apps/Ecommerce/Confirm/PaypalExpressCheckout",
                             new { controller = "PayPalExpressCheckout", action = "Form" },
                             new[] { typeof(PayPalExpressCheckoutController).Namespace });


            context.MapRoute("PayPal Express Checkout - SetExpressCheckout",
                             "Apps/Ecommerce/PayPalExpress/SetExpressCheckout",
                             new { controller = "PayPalExpressCheckout", action = "SetExpressCheckout" },
                             new[] { typeof(PayPalExpressCheckoutController).Namespace });
            context.MapRoute("PayPal Express Checkout - Reset",
                             "Apps/Ecommerce/PayPalExpress/Reset",
                             new { controller = "PayPalExpressCheckout", action = "Reset" },
                             new[] { typeof(PayPalExpressCheckoutController).Namespace });
            context.MapRoute("PayPal Express Checkout - IPN", "Apps/Ecommerce/PayPalExpress/IPN",
                             new { controller = "PayPalExpressIPN", action = "Handle" },
                             new[] { typeof(PayPalExpressIPNController).Namespace });
            context.MapRoute("Checkout - PayPal Return Handler", "Apps/Ecommerce/PayPalExpressCheckout/ReturnHandler",
                             new { controller = "PayPalExpressCheckout", action = "Return" },
                             new[] { typeof(PayPalExpressCheckoutController).Namespace });
            context.MapRoute("Checkout - PayPal Callback Handler",
                             "Apps/Ecommerce/PayPalExpressCheckout/CallbackHandler",
                             new { controller = "PayPalExpressCallback", action = "Handler" },
                             new[] { typeof(PayPalExpressCallbackController).Namespace });

            context.MapRoute("Checkout - Paypoint 3D Secure Redirect", "Apps/Ecommerce/Paypoint/3DSecureRedirect",
                             new { controller = "Paypoint", action = "Redirect3DSecure" },
                             new[] { typeof(PaypointController).Namespace });
            context.MapRoute("Checkout - Paypoint 3D Secure Response Handler",
                             "Apps/Ecommerce/Paypoint/3DSecureReturnHandler",
                             new { controller = "Paypoint", action = "Response3DSecure" },
                             new[] { typeof(PaypointController).Namespace });

            context.MapRoute("Checkout - SagePay Notification Url", "Apps/Ecommerce/SagePay/Notification",
                             new { controller = "SagePayNotification", action = "Notification" },
                             new[] { typeof(SagePayNotificationController).Namespace });
            context.MapRoute("Checkout - SagePay Success Url", "Apps/Ecommerce/SagePay/Success/{vendorTxCode}",
                             new { controller = "SagePayRedirect", action = "Success" },
                             new[] { typeof(SagePayRedirectController).Namespace });
            context.MapRoute("Checkout - SagePay Success POST", "Apps/Ecommerce/SagePay/SuccessRedirect",
                             new { controller = "SagePayRedirect", action = "SuccessPost" },
                             new[] { typeof(SagePayRedirectController).Namespace });
            context.MapRoute("Checkout - SagePay Failed Url", "Apps/Ecommerce/SagePay/Failed/{vendorTxCode}",
                             new { controller = "SagePayRedirect", action = "Failed" },
                             new[] { typeof(SagePayRedirectController).Namespace });
            context.MapRoute("Checkout - SagePay Failed POST", "Apps/Ecommerce/SagePay/FailedRedirect",
                             new { controller = "SagePayRedirect", action = "FailedPost" },
                             new[] { typeof(SagePayRedirectController).Namespace });
            context.MapRoute("WorldPay - Form", "Apps/Ecommerce/Confirm/WorldPay",
                             new { controller = "WorldPay", action = "Form" },
                             new[] { typeof(WorldPayController).Namespace });
            context.MapRoute("Checkout - WorldPay Notification Url", "Apps/Ecommerce/WorldPay/Notification",
                             new { controller = "WorldPay", action = "Notification" },
                             new[] { typeof(WorldPayController).Namespace });



            //Charity Clear Routes
            context.MapRoute("CharityClear Form", "Apps/Ecommerce/Confirm/CharityClear",
                             new { controller = "CharityClear", action = "Form" },
                             new[] { typeof(CharityClearController).Namespace });
            context.MapRoute("CharityClear PaymentInfo Notification",
                             "Apps/Ecommerce/CharityClear/Notification",
                             new { controller = "CharityClear", action = "Notification" },
                             new[] { typeof(CharityClearController).Namespace });

            context.MapRoute("Braintree Form", "Apps/Ecommerce/Confirm/Braintree",
                             new { controller = "Braintree", action = "Form" },
                             new[] { typeof(BraintreeController).Namespace });

            context.MapRoute("Braintree Form Post", "Apps/Ecommerce/Confirm/BraintreePayment/Card",
                             new { controller = "Braintree", action = "MakePaymentCard" },
                             new[] { typeof(BraintreeController).Namespace });

            context.MapRoute("Braintree Paypal Post", "Apps/Ecommerce/Confirm/BraintreePayment/Paypal",
                             new { controller = "Braintree", action = "MakePaymentPaypal" },
                             new[] { typeof(BraintreeController).Namespace });
        }
예제 #10
0
 private static void MapRemoteValidationRoutes(MrCMSAppRegistrationContext context)
 {
     context.MapRoute("Can add quantity to cart", "can-add-quantity",
                      new { controller = "Cart", action = "CanAddQuantity" }, new[] { typeof(CartController).Namespace });
 }
예제 #11
0
 protected override void RegisterApp(MrCMSAppRegistrationContext context)
 {
     context.MapRoute("MFNav GetChildren", "MobileFriendlyNavigation/GetChildNodes", new { controller = "MobileFriendlyNavigation", action = "GetChildNodes" });
 }