Exemplo n.º 1
0
        /// <summary>
        /// Registers an event specifying that the category page has been visited.
        /// </summary>
        /// <param name="storefront">The storefront.</param>
        /// <param name="categoryName">The category name.</param>
        /// <param name="catalogName">The catalog name.</param>
        /// <returns>
        /// A <see cref="VisitedCategoryPageResult" /> specifying the result of the service request.
        /// </returns>
        public VisitedCategoryPageResult VisitedCategoryPage([NotNull] CommerceStorefront storefront, [NotNull] string categoryName, string catalogName)
        {
            Assert.ArgumentNotNull(storefront, "storefront");

            var request = new VisitedCategoryPageRequest(storefront.ShopName, categoryName);
            request.CatalogName = catalogName;
            return this.CatalogServiceProvider.VisitedCategoryPage(request);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Visiteds the category page.
        /// </summary>
        /// <param name="storefront">The storefront.</param>
        /// <returns>
        /// The manager response
        /// </returns>
        public virtual ManagerResponse<VisitedCategoryPageResult, bool> VisitedCategoryPage([NotNull] CommerceStorefront storefront)
        {
            Assert.ArgumentNotNull(storefront, "storefront");

            var request = new VisitedCategoryPageRequest(storefront.ShopName, CatalogUrlManager.ExtractItemIdFromCurrentUrl())
            {
                CatalogName = CatalogUrlManager.ExtractCatalogNameFromCurrentUrl()
            };

            var result = this.CatalogServiceProvider.VisitedCategoryPage(request);
            if (!result.Success)
            {
                Helpers.LogSystemMessages(result.SystemMessages, result);
            }

            return new ManagerResponse<VisitedCategoryPageResult, bool>(result, result.Success);
        }
Exemplo n.º 3
0
 public virtual VisitedCategoryPageResult VisitedCategoryPage([NotNull] VisitedCategoryPageRequest request)
 {
     return(this.RunPipeline <VisitedCategoryPageRequest, VisitedCategoryPageResult>(StorefrontConstants.PipelineNames.VisitedCategoryPage, request));
 }