Example #1
0
        public static IBuilder AddVendrEventHandlers(this IBuilder builder)
        {
            // Reset shipping / payment methods when certain elements of
            // an order change
            builder.WithNotificationEvent <OrderProductAddingNotification>()
            .RegisterHandler <OrderProductAddingHandler>();

            builder.WithNotificationEvent <OrderLineChangingNotification>()
            .RegisterHandler <OrderLineChangingHandler>();

            builder.WithNotificationEvent <OrderLineRemovingNotification>()
            .RegisterHandler <OrderLineRemovingHandler>();

            builder.WithNotificationEvent <OrderPaymentCountryRegionChangingNotification>()
            .RegisterHandler <OrderPaymentCountryRegionChangingHandler>();

            builder.WithNotificationEvent <OrderShippingCountryRegionChangingNotification>()
            .RegisterHandler <OrderShippingCountryRegionChangingHandler>();

            builder.WithNotificationEvent <OrderShippingMethodChangingNotification>()
            .RegisterHandler <OrderShippingMethodChangingHandler>();

            // Toggle order editor shipping address enabled flag based on
            // whether there vendr checkout is configured to collect a shipping address
            builder.WithNotificationEvent <OrderEditorConfigParsingNotification>()
            .RegisterHandler <VendrCheckoutOrderEditorConfigParsingNotificationHandler>();

            return(builder);
        }
Example #2
0
        public static IBuilder AddVendrInstallPipeline(this IBuilder builder)
        {
            builder.WithPipeline <InstallPipeline, InstallPipelineContext>()
            .Append <CreateVendrCheckoutDataTypesTask>()
            .Append <CreateVendrCheckoutDocumentTypesTask>()
            .Append <CreateVendrCheckoutNodesTask>()
            .Append <ConfigureVendrStoreTask>()
            .Append <CreateZeroValuePaymentMethodTask>();

            return(builder);
        }
        public static IBuilder AddVendrReviewsEventHandlers(this IBuilder builder)
        {
            builder.WithNotificationEvent <ReviewAddedNotification>()
            .RegisterHandler <LogReviewAddedActivity>();

            builder.WithNotificationEvent <StoreActionsRenderingNotification>()
            .RegisterHandler <UpdateReviewStoreActions>();

            builder.WithNotificationEvent <ActivityLogEntriesRenderingNotification>()
            .RegisterHandler <UpdateReviewActivityLogBadge>();

            return(builder);
        }