Created
December 1, 2018 11:59
-
-
Save Sitecoreclimber/08aa1910644343950cb9fe3a60753e6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Extensions.DependencyInjection; | |
using System.Reflection; | |
namespace Plugin.Demo.ExtendCommerceView | |
{ | |
using Sitecore.Commerce.Core; | |
using Sitecore.Commerce.EntityViews; | |
using Sitecore.Framework.Configuration; | |
using Sitecore.Framework.Pipelines.Definitions.Extensions; | |
/// <summary> | |
/// The configure sitecore class. This allows a Plugin to wire up new Pipelines or to change existing ones. | |
/// </summary> | |
public class ConfigureSitecore : IConfigureSitecore | |
{ | |
/// <summary> | |
/// The configure services constructor. | |
/// </summary> | |
/// <param name="services"> | |
/// The services. | |
/// </param> | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
var assembly = Assembly.GetExecutingAssembly(); | |
services.RegisterAllPipelineBlocks(assembly); | |
services.Sitecore().Pipelines(config => config | |
.ConfigurePipeline<IFormatEntityViewPipeline>(d => | |
{ | |
d.Add<PopulateSellableItemImages>().After<PopulateEntityViewActionsBlock>(); | |
}) | |
); | |
services.RegisterAllCommands(assembly); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment