Ejemplo n.º 1
0
        public virtual async Task <ProductCompare> Process(CommerceContext commerceContext, string cartId, string catalogName, string productId, string variantId)
        {
            using (CommandActivity.Start(commerceContext, this))
            {
                var productCompareComponent = await GetProductCompareComponent(commerceContext, cartId);

                var arg = new AddProductToCompareArgument(productCompareComponent, catalogName, productId, variantId);
                return(await _addToProductComparePipeline.Run(arg, new CommercePipelineExecutionContextOptions(commerceContext)));
            }
        }
        public virtual async Task <ProductComparison> Process(CommerceContext commerceContext, string cartId, string catalogName, string productId, string variantId)
        {
            using (CommandActivity.Start(commerceContext, this))
            {
                var getProductCompareCommand = Command <GetProductCompareCommand>();
                var productComparison        = await getProductCompareCommand.Process(commerceContext, cartId).ConfigureAwait(false);

                var arg = new AddToProductCompareArgument(productComparison, catalogName, productId, variantId);
                return(await _addToProductComparePipeline.Run(arg, new CommercePipelineExecutionContextOptions(commerceContext)).ConfigureAwait(false));
            }
        }