public SingleProductViewModel(Product p, MerchantTribeApplication mtapp)
        {
            var profiler = MiniProfiler.Current;

            using (profiler.Step("Price Product " + p.ProductName))
            {
                this.UserPrice = mtapp.PriceProduct(p, mtapp.CurrentCustomer, null, mtapp.CurrentlyActiveSales);
            }
            this.IsFirstItem = false;
            this.IsLastItem = false;
            this.Item = p;
            using (profiler.Step("Image Url Product" + p.ProductName))
            {
                this.ImageUrl = MerchantTribe.Commerce.Storage.DiskStorage.ProductImageUrlSmall(
                    mtapp,
                    p.Bvin,
                    p.ImageFileSmall,
                    mtapp.IsCurrentRequestSecure());
            }
            using (profiler.Step("Product Link " + p.ProductName))
            {
                this.ProductLink = UrlRewriter.BuildUrlForProduct(p,
                                                mtapp.CurrentRequestContext.RoutingContext,
                                                string.Empty);
            }
        }
 public SingleProductViewModel(Product p, MerchantTribeApplication mtapp)
 {
     this.UserPrice = mtapp.PriceProduct(p, mtapp.CurrentCustomer, null);
     this.IsFirstItem = false;
     this.IsLastItem = false;
     this.Item = p;
     this.ImageUrl = MerchantTribe.Commerce.Storage.DiskStorage.ProductImageUrlSmall(
         mtapp,
         p.Bvin,
         p.ImageFileSmall,
         mtapp.CurrentRequestContext.RoutingContext.HttpContext.Request.IsSecureConnection);
     this.ProductLink = UrlRewriter.BuildUrlForProduct(p,
                                     mtapp.CurrentRequestContext.RoutingContext,
                                     string.Empty);
 }