Ejemplo n.º 1
0
        public StoreLiquidResult GetProductsDetailPage(Product product, PageDesign pageDesign, ProductCategory category)
        {
            if (product == null)
            {
                throw new Exception("Product is NULL");
            }
            if (pageDesign == null)
            {
                throw new Exception("pageDesign is NULL");
            }

            if (category == null)
            {
                throw new Exception("ProductCategory is NULL");
            }


            var s = new ProductLiquid(product, category, ImageWidth, ImageHeight);

            var anonymousObject = LiquidAnonymousObject.GetProductAnonymousObject(s);

            var indexPageOutput = LiquidEngineHelper.RenderPage(pageDesign, anonymousObject);



            var dic = new Dictionary <String, String>();

            dic.Add(StoreConstants.PageOutput, indexPageOutput);


            var result = new StoreLiquidResult();

            result.PageDesingName       = pageDesign.Name;
            result.LiquidRenderedResult = dic;
            result.DetailLink           = s.DetailLink;
            return(result);
        }