Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
namespace Sitecore.Commerce.Plugin.Sample
{
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Sitecore.Commerce.Core;
using Sitecore.Framework.Configuration;
using Sitecore.Framework.Pipelines.Definitions.Extensions;
using Sitecore.Services.Examples.Indexing;
using Sitecore.Commerce.EntityViews;
using Sitecore.Commerce.Plugin.Catalog;
public class ConfigureSitecore : IConfigureSitecore
{
public void ConfigureServices(IServiceCollection services)
{
var assembly = Assembly.GetExecutingAssembly();
services.RegisterAllPipelineBlocks(assembly);
services.Sitecore().Pipelines(config => config
.AddPipeline<IGenerateFacetsPipeline, GenerateFacetsPipeline>(
configure => {configure.Add<FacetsBlock>();})
.ConfigurePipeline<IConfigureServiceApiPipeline>(configure => configure.Add<Services.Examples.Indexing.ConfigureServiceApiBlock>()));
services.Sitecore().Pipelines(config => config
.ConfigurePipeline<IGetEntityViewPipeline>(c => c.Add<GetFacetsViewBlock>().After<GetSellableItemDetailsViewBlock>()));
services.RegisterAllCommands(assembly);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.