Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers

Initialize Pipeline

The initialize pipeline is run once every time application starts up, which means you can use it to hook in code that you want to execute right after the application are started and before a user visits the Ucommerce-backoffice.

In the sample app project we have an example where the initialize pipeline is use to run a custom pipeline, which creates and maintains a product definition.

You hook into the pipeline by creating a custom pipeline task and register it in the Ucommerce configuration.

Here is an example on how to implement a custom pipeline task for the initialize pipeline.

    	public class CustomPipelineTask : IPipelineTask<InitializeArgs>
    		public PipelineExecutionResult Execute(InitializeArgs subject)
    			throw new NotImplementedException();

Here is an example on how to use partial components to add a custom pipeline task to the initialize pipeline.

    		<!-- Adds the custom pipeline task to the Initialize pipeline -->
    		<partial-component id="Initialize">
    						<item insert="last">${MyCustomPipelineTask}</item>
    		<!-- Configuration of your custom pipeline task -->
    		<component id="MyCustomPipelineTask"
    				service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.Pipelines.Initialization.InitializeArgs, UCommerce.Pipelines]], UCommerce"
    				type="MyNamespace.MyClassName, MyAssembly" />