protected override IEnumerable <ID> GetProductsItemIdList()
        {
            CustomGetRecommendedProductsArgs productsPipelineArgs = this.GetRecommendedProductsPipelineArgs();

            CorePipeline.Run("commerce.getRecommendedProducts", productsPipelineArgs);
            return(productsPipelineArgs.RecommendedProductsIdList);
        }
        protected virtual CustomGetRecommendedProductsArgs GetRecommendedProductsPipelineArgs(
            CustomGetRecommendedProductsArgs args = null)
        {
            CustomGetRecommendedProductsArgs recommendedProductsArgs = args ?? new CustomGetRecommendedProductsArgs();
            Rendering rendering = RenderingContext.CurrentOrNull.ValueOrDefault(context => context.Rendering);

            recommendedProductsArgs.ProductsQuery = rendering?.Item.Fields["Products query"]?.Value;
            recommendedProductsArgs.MaxNumberOfRecommendedProducts = MainUtil.GetInt(rendering?.Item.Fields["Max number of recommended products"]?.Value, 4);
            recommendedProductsArgs.RelationshipFieldName          = rendering?.Item.Fields["Related products fields name"]?.Value;
            recommendedProductsArgs.Tag = rendering.Parameters["Tag"];
            return(recommendedProductsArgs);
        }