Example #1
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         int      categoryId = AbleCommerce.Code.PageHelper.GetCategoryId();
         Category category   = EntityLoader.Load <Category>(categoryId);
         if (category != null)
         {
             CaptionLabel.Text       = category.Name;
             EditLink.NavigateUrl    = (EditLink.NavigateUrl + ("?CategoryId=" + categoryId.ToString()));
             PreviewLink.NavigateUrl = UrlGenerator.GetBrowseUrl(categoryId, categoryId, CatalogNodeType.Category, category.Name);
             if (categoryId == 0)
             {
                 AddCategory.Text = "Category";
             }
             AddCategory.NavigateUrl = (AddCategory.NavigateUrl + ("?CategoryId=" + categoryId.ToString()));
             AddProduct.NavigateUrl  = (AddProduct.NavigateUrl + ("?CategoryId=" + categoryId.ToString()));
             AddWebpage.NavigateUrl  = (AddWebpage.NavigateUrl + ("?CategoryId=" + categoryId.ToString()));
             AddLink.NavigateUrl     = (AddLink.NavigateUrl + ("?CategoryId=" + categoryId.ToString()));
             AbleCommerce.Code.PageHelper.SetDefaultButton(SearchPhrase, SearchButton.ClientID);
         }
         else
         {
             throw new CommerceBuilder.Exceptions.InvalidCategoryException();
         }
     }
 }
 protected void Page_PreRender(Object sender, EventArgs e)
 {
     if (_Webpage != null)
     {
         //PREVIEW LINK CAN CHANGE DUE TO CHANGE IN CUSTOM URL, WHICH CAN'T BE DETECTED BY PAGE_LOAD EVENT
         Preview.NavigateUrl = UrlGenerator.GetBrowseUrl(AbleCommerce.Code.PageHelper.GetCategoryId(), _WebPageId, CatalogNodeType.Webpage, _Webpage.Name);
     }
 }
Example #3
0
        protected string GetPreviewUrl(object dataItem, object dataItemId, object dataItemName)
        {
            CatalogNodeType nodeType      = (CatalogNodeType)dataItem;
            int             catalogNodeId = (int)dataItemId;
            string          nodeName      = (string)dataItemName;
            string          url           = UrlGenerator.GetBrowseUrl(catalogNodeId, nodeType, nodeName);

            return(Page.ResolveUrl(url));
        }
Example #4
0
 protected void BindCategoryHeader()
 {
     CategoryName.Text = CurrentCategory.Name;
     if (CurrentCategory.Id != 0)
     {
         ViewCategory.Visible     = true;
         EditCategory.Visible     = true;
         ViewCategory.NavigateUrl = UrlGenerator.GetBrowseUrl(CurrentCategory.Id, CurrentCategory.Name);
         EditCategory.NavigateUrl = "EditCategory.aspx?CategoryId=" + CurrentCategory.Id;
     }
     else
     {
         ViewCategory.Visible = false;
         EditCategory.Visible = false;
     }
     SortCategoryButton.NavigateUrl = string.Format(SortCategoryButton.NavigateUrl, CurrentCategory.Id);
 }
Example #5
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            int categoryId = AbleCommerce.Code.PageHelper.GetCategoryId();

            if (categoryId > 0)
            {
                CancelButton.NavigateUrl  = "Browse.aspx?CategoryId=" + categoryId.ToString();
                CancelButton2.NavigateUrl = "Browse.aspx?CategoryId=" + categoryId.ToString();
            }
            else
            {
                CancelButton.NavigateUrl  = "~/Admin/Website/ContentPages/Default.aspx";
                CancelButton2.NavigateUrl = "~/Admin/Website/ContentPages/Default.aspx";
            }

            PreviewButton.NavigateUrl  = UrlGenerator.GetBrowseUrl(_WebpageId, CatalogNodeType.Webpage, _Webpage.Name);
            PreviewButton2.NavigateUrl = UrlGenerator.GetBrowseUrl(_WebpageId, CatalogNodeType.Webpage, _Webpage.Name);
        }
        private void PopulateWebpageUrls(List <SiteMapUrl> siteMapItems, SiteMapOptions options)
        {
            Store store = AbleContext.Current.Store;

            if (store == null)
            {
                return;
            }
            string url;

            foreach (Webpage wp in store.Webpages)
            {
                if (wp.WebpageType == WebpageType.Content && wp.Visibility == CatalogVisibility.Public)
                {
                    url = UrlGenerator.GetBrowseUrl(wp.Id, CatalogNodeType.Webpage, wp.Name);
                    siteMapItems.Add(new SiteMapUrl(GetAbsoluteUrl(url), options.DefaultChangeFrequency, options.DefaultUrlPriority));
                }
            }
        }
        private void PopulateProductUrls(List <SiteMapUrl> siteMapItems, SiteMapOptions options)
        {
            Store store = AbleContext.Current.Store;

            if (store == null)
            {
                return;
            }
            string url;

            foreach (Product prod in store.Products)
            {
                if (prod.Visibility == CatalogVisibility.Public)
                {
                    url = UrlGenerator.GetBrowseUrl(prod.Id, CatalogNodeType.Product, prod.Name);
                    siteMapItems.Add(new SiteMapUrl(GetAbsoluteUrl(url), options.DefaultChangeFrequency, options.DefaultUrlPriority));
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     _LinkId = AbleCommerce.Code.PageHelper.GetLinkId();
     _Link   = LinkDataSource.Load(_LinkId);
     if (_Link != null)
     {
         string durl = "~/Admin/Catalog/EditLink.aspx?LinkId={0}";
         durl = string.Format(durl, _LinkId);
         string murl = "~/Admin/Catalog/EditLinkCategories.aspx?LinkId={0}";
         murl = string.Format(murl, _LinkId);
         LinkDetails.NavigateUrl      = durl;
         ManageCategories.NavigateUrl = murl;
         string confirmationJS = String.Format("return confirm('Are you sure you want to delete \\'{0}\\'?');", _Link.Name);
         DeleteLink.Attributes.Add("onclick", confirmationJS);
         Preview.NavigateUrl = UrlGenerator.GetBrowseUrl(AbleCommerce.Code.PageHelper.GetCategoryId(), _LinkId, CatalogNodeType.Link, _Link.Name);
         HighlightMenu();
     }
     else
     {
         this.Controls.Clear();
     }
 }
 protected void Page_PreRender(object sender, EventArgs e)
 {
     PreviewButton.NavigateUrl  = UrlGenerator.GetBrowseUrl(_LinkId, CatalogNodeType.Link, _Link.Name);
     PreviewButton2.NavigateUrl = UrlGenerator.GetBrowseUrl(_LinkId, CatalogNodeType.Link, _Link.Name);
 }
Example #10
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            int     productId = AbleCommerce.Code.PageHelper.GetProductId();
            Product product   = ProductDataSource.Load(productId);

            if (product != null)
            {
                NameValueCollection menuLinks = new NameValueCollection();
                menuLinks.Add("Product", "EditProduct.aspx");
                menuLinks.Add("Images", "Assets/Images.aspx");
                menuLinks.Add("Options", "Variants/Options.aspx");
                menuLinks.Add("Digital Goods", "DigitalGoods/DigitalGoods.aspx");
                menuLinks.Add("Kitting", "Kits/EditKit.aspx");
                menuLinks.Add("Volume Pricing", "EditVolumePricing.aspx");
                //menuLinks.Add("Discounts", "ProductDiscounts.aspx");
                menuLinks.Add("Specials", "Specials/Default.aspx");
                menuLinks.Add("Similar Products", "EditSimilarProducts.aspx");
                menuLinks.Add("Upsell", "EditProductAccessories.aspx");
                menuLinks.Add("Categories", "EditProductCategories.aspx");
                menuLinks.Add("Templates", "EditProductTemplate.aspx");
                menuLinks.Add("Subscriptions", "EditSubscription.aspx");

                string suffix     = "?ProductId=" + product.Id.ToString();
                int    categoryId = AlwaysConvert.ToInt(Request.QueryString["CategoryId"]);
                if (categoryId > 0)
                {
                    suffix += "&CategoryId=" + categoryId.ToString();
                }
                string        activeMenu = GetActiveMenu(Request.Url);
                StringBuilder menu       = new StringBuilder();
                menu.AppendLine("<div class=\"secondaryMenu\">");
                menu.AppendLine("<ul>");
                foreach (string key in menuLinks.AllKeys)
                {
                    if (key == activeMenu)
                    {
                        menu.Append("<li class=\"active\">");
                    }
                    else
                    {
                        menu.Append("<li>");
                    }
                    menu.AppendLine("<a href=\"" + Page.ResolveUrl("~/Admin/Products/" + menuLinks[key]) + suffix + "\">" + key + "</a></li>");
                }

                // preview link can never be active
                string pUrl = UrlGenerator.GetBrowseUrl(categoryId, productId, CatalogNodeType.Product, product.Name);
                if (pUrl.StartsWith("~/"))
                {
                    pUrl = ResolveClientUrl(pUrl);
                }

                menu.AppendLine("<li><a href=\"" + pUrl + "\" target=\"_blank\">Preview</a></li>");

                menu.AppendLine("</ul>");
                menu.AppendLine("</div>");
                MenuContent.Text = menu.ToString();
            }
            else
            {
                // no order, do not display menu
                this.Controls.Clear();
            }
        }
Example #11
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            if (_OrderItem != null)
            {
                Product product = _OrderItem.Product;
                if (product != null)
                {
                    string productName = _OrderItem.Name;
                    if (!string.IsNullOrEmpty(_OrderItem.VariantName))
                    {
                        string variantName = string.Format(" ({0})", _OrderItem.VariantName);
                        if (!productName.Contains(variantName))
                        {
                            productName += variantName;
                        }
                    }
                    if (this.LinkProducts)
                    {
                        ProductLink.NavigateUrl = UrlGenerator.GetBrowseUrl(product.Id, CatalogNodeType.Product, productName);
                        if (EnableFriendlyFormat)
                        {
                            ProductLink.Text = string.Format("{0} of {1}(<span class='price'>{2}</span>)", _OrderItem.Quantity, productName, _OrderItem.Price.LSCurrencyFormat("ulc"));
                        }
                        else
                        {
                            ProductLink.Text = productName;
                        }
                        ProductName.Visible = false;
                    }
                    else
                    {
                        if (EnableFriendlyFormat)
                        {
                            ProductName.Text = string.Format("{0} of {1}(<span class='price'>{2}</span>)", _OrderItem.Quantity, productName, _OrderItem.Price.LSCurrencyFormat("ulc"));
                        }
                        else
                        {
                            ProductName.Text = productName;
                        }
                        ProductLink.Visible = false;
                    }
                    //SHOW INPUTS
                    if (_OrderItem.Inputs.Count > 0)
                    {
                        InputList.DataSource = _OrderItem.Inputs;
                        InputList.DataBind();
                    }
                    else
                    {
                        InputList.Visible = false;
                    }
                    //SHOW KIT PRODUCTS IF AVAILABLE, AND THE PRODUCT DOES NOT USE ITEMIZED DISPLAY
                    if (!string.IsNullOrEmpty(_OrderItem.KitList) && !_OrderItem.ItemizeChildProducts)
                    {
                        IList <OrderItem> kitProductList = GetKitProducts(_OrderItem);
                        if (kitProductList.Count > 0)
                        {
                            KitProductPanel.Visible       = true;
                            KitProductRepeater.DataSource = kitProductList;
                            KitProductRepeater.DataBind();
                        }
                    }
                    //SET THE KIT MEMBER LABEL
                    if (_OrderItem.OrderItemType == OrderItemType.Product && _OrderItem.IsChildItem)
                    {
                        OrderItem parentItem = _OrderItem.GetParentItem(true);
                        if (parentItem.ItemizeChildProducts ||
                            _OrderItem.Id != parentItem.Id)
                        {
                            //SET THE WISHLIST NAME
                            KitMemberLabel.Visible = true;
                            KitMemberLabel.Text    = string.Format(KitMemberLabel.Text, parentItem.Name);
                        }
                    }
                    //SET THE WISHLIST LABEL
                    WishlistLabel.Visible = (_OrderItem.WishlistItem != null);
                    if (WishlistLabel.Visible)
                    {
                        //SET THE WISHLIST NAME
                        WishlistLabel.Text = string.Format(WishlistLabel.Text, GetWishlistName(_OrderItem.WishlistItem.Wishlist));
                    }
                    //SET THE SHIPS TO PANEL
                    Order         basket   = _OrderItem.Order;
                    OrderShipment shipment = _OrderItem.OrderShipment;
                    ShipsToPanel.Visible = this.ShowShipTo;
                    if (ShipsToPanel.Visible)
                    {
                        ShipsTo.Text = shipment.ShipToFullName;
                    }
                    //SHOW GIFT WRAP
                    GiftWrapPanel.Visible = (_OrderItem.WrapStyle != null);
                    if (GiftWrapPanel.Visible)
                    {
                        GiftWrap.Text         = _OrderItem.WrapStyle.Name;
                        GiftWrapPrice.Visible = (_OrderItem.WrapStyle.Price != 0);
                        GiftWrapPrice.Text    = string.Format("&nbsp;({0})", _OrderItem.WrapStyle.Price.LSCurrencyFormat("ulc"));
                    }
                    //SHOW GIFT MESSAGE
                    GiftMessagePanel.Visible = (!string.IsNullOrEmpty(_OrderItem.GiftMessage));
                    if (GiftMessagePanel.Visible)
                    {
                        GiftMessage.Text = _OrderItem.GiftMessage;
                    }
                    //SHOW ASSETS
                    List <AbleCommerce.Code.ProductAssetWrapper> assets = AbleCommerce.Code.ProductHelper.GetAssets(this.Page, _OrderItem.Product, _OrderItem.OptionList, _OrderItem.KitList, "~/Members/MyOrder.aspx?OrderNumber=" + _OrderItem.Order.OrderNumber.ToString());
                    AssetsPanel.Visible = (this.ShowAssets && assets.Count > 0);
                    if (AssetsPanel.Visible)
                    {
                        AssetLinkList.DataSource = assets;
                        AssetLinkList.DataBind();
                    }

                    //SHOW SUBSCRIPTIONS
                    if (this.ShowSubscription)
                    {
                        SubscriptionPlan sp = _OrderItem.Product.SubscriptionPlan;
                        if (sp != null && _OrderItem.IsSubscription && _OrderItem.Frequency > 0)
                        {
                            // GET THE RECURRING PAYMENT MESSAGE FOR THIS PRODUCT
                            RecurringPaymentMessage.Text = ProductHelper.GetRecurringPaymentMessage(_OrderItem);
                            SubscriptionPanel.Visible    = true;
                        }
                    }
                }
                else
                {
                    ProductLink.Visible       = false;
                    ProductName.Text          = _OrderItem.Name;
                    InputList.Visible         = false;
                    KitProductPanel.Visible   = false;
                    WishlistLabel.Visible     = false;
                    ShipsToPanel.Visible      = false;
                    GiftWrapPanel.Visible     = false;
                    GiftMessagePanel.Visible  = false;
                    AssetsPanel.Visible       = false;
                    SubscriptionPanel.Visible = false;
                }
            }
            else
            {
                //NO ITEM TO DISPLAY
                this.Controls.Clear();
            }
        }
 protected void Page_PreRender(object sender, EventArgs e)
 {
     PreviewButton.NavigateUrl  = UrlGenerator.GetBrowseUrl(_Category.Id, _Category.Name);
     PreviewButton1.NavigateUrl = PreviewButton.NavigateUrl;
 }
Example #13
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            BasketItem basketItem = BasketItemDataSource.Load(this.BasketItemId);

            if (basketItem != null)
            {
                Product product = basketItem.Product;
                if (product != null)
                {
                    //OUTPUT THE PRODUCT NAME
                    string productName = basketItem.Name;
                    if (basketItem.ProductVariant != null)
                    {
                        string variantName = string.Format(" ({0})", basketItem.ProductVariant.VariantName);
                        if (!productName.EndsWith(variantName))
                        {
                            productName += variantName;
                        }
                    }
                    if (this.LinkProducts && product.Visibility != CatalogVisibility.Private)
                    {
                        //OUTPUT NAME AS LINK
                        string url = UrlGenerator.GetBrowseUrl(product.Id, CatalogNodeType.Product, product.Name);
                        if (!string.IsNullOrEmpty(basketItem.KitList) && !string.IsNullOrEmpty(basketItem.OptionList))
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}&Kits={2}&Options={3}\">{4}</a>", Page.ResolveUrl(url), basketItem.Id, basketItem.KitList, basketItem.OptionList.Replace(",0", string.Empty), productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                        else if (!string.IsNullOrEmpty(basketItem.KitList) && string.IsNullOrEmpty(basketItem.OptionList))
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}&Kits={2}\">{3}</a>", Page.ResolveUrl(url), basketItem.Id, basketItem.KitList, productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                        else if (string.IsNullOrEmpty(basketItem.KitList) && !string.IsNullOrEmpty(basketItem.OptionList))
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}&Options={2}\">{3}</a>", Page.ResolveUrl(url), basketItem.Id, basketItem.OptionList.Replace(",0", string.Empty), productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                        else
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}\">{2}</a>", Page.ResolveUrl(url), basketItem.Id, productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                    }
                    else
                    {
                        //OUTPUT NAME
                        phProductName.Controls.Add(new LiteralControl(productName));
                    }

                    if (EnableFriendlyFormat)
                    {
                        phProductName.Controls.AddAt(0, new LiteralControl(string.Format("{0} of ", basketItem.Quantity)));
                        phProductName.Controls.Add(new LiteralControl(string.Format("<span class='price'>({0})</span>", basketItem.Price.LSCurrencyFormat("ulc"))));
                    }

                    //SHOW INPUTS
                    IList <BasketItemInput> inputs = GetCustomerInputs(basketItem);
                    if (inputs.Count > 0)
                    {
                        InputList.DataSource = inputs;
                        InputList.DataBind();
                    }
                    else
                    {
                        InputList.Visible = false;
                    }
                    //SHOW KIT PRODUCTS IF AVAILABLE, AND THE PRODUCT DOES NOT USE ITEMIZED DISPLAY OR FORCE KIT DISPLAY IS ON
                    if (!string.IsNullOrEmpty(basketItem.KitList) && basketItem.Product != null &&
                        basketItem.Product.Kit != null && (!basketItem.Product.Kit.ItemizeDisplay || this.ForceKitDisplay))
                    {
                        IList <BasketItem> kitProductList = GetKitProducts(basketItem, this.IgnoreKitShipment);
                        if (kitProductList.Count > 0)
                        {
                            KitProductPanel.Visible       = true;
                            KitProductRepeater.DataSource = kitProductList;
                            KitProductRepeater.DataBind();
                        }
                    }
                    //SET THE KIT MEMBER LABEL
                    if (basketItem.OrderItemType == OrderItemType.Product && basketItem.IsChildItem)
                    {
                        BasketItem parentItem = basketItem.GetParentItem(true);
                        if (parentItem != null)
                        {
                            if ((parentItem.Product != null && basketItem.Product.Kit != null && parentItem.Product.Kit.ItemizeDisplay) ||
                                basketItem.ShipmentId != parentItem.ShipmentId)
                            {
                                //SET THE WISHLIST NAME
                                KitMemberLabel.Visible = true;
                                KitMemberLabel.Text    = string.Format(KitMemberLabel.Text, parentItem.Name);
                            }
                        }
                    }
                    //SET THE WISHLIST LABEL
                    WishlistLabel.Visible = (basketItem.WishlistItem != null);
                    if (WishlistLabel.Visible)
                    {
                        //SET THE WISHLIST NAME
                        WishlistLabel.Text = string.Format(WishlistLabel.Text, GetWishlistName(basketItem.WishlistItem.Wishlist));
                    }
                    //SET THE SHIPS TO PANEL
                    Basket         basket   = basketItem.Basket;
                    BasketShipment shipment = basketItem.Shipment;
                    Address        address  = (shipment == null) ? null : shipment.Address;
                    ShipsToPanel.Visible = (this.ShowShipTo && (address != null) && (!string.IsNullOrEmpty(address.FullName)));
                    if (ShipsToPanel.Visible)
                    {
                        ShipsTo.Text = address.FullName;
                    }
                    //SHOW GIFT WRAP
                    GiftWrapPanel.Visible = (basketItem.WrapStyle != null);
                    if (GiftWrapPanel.Visible)
                    {
                        GiftWrap.Text         = basketItem.WrapStyle.Name;
                        GiftWrapPrice.Visible = (basketItem.WrapStyle.Price != 0);
                        GiftWrapPrice.Text    = string.Format("&nbsp;({0})", basketItem.WrapStyle.Price.LSCurrencyFormat("ulc"));
                    }
                    //SHOW GIFT MESSAGE
                    GiftMessagePanel.Visible = (!string.IsNullOrEmpty(basketItem.GiftMessage));
                    if (GiftMessagePanel.Visible)
                    {
                        GiftMessage.Text = basketItem.GiftMessage;
                    }
                    //SHOW ASSETS
                    List <AbleCommerce.Code.ProductAssetWrapper> assets = AbleCommerce.Code.ProductHelper.GetAssets(this.Page, basketItem.Product, basketItem.OptionList, basketItem.KitList, "javascript:window.close()");
                    AssetsPanel.Visible = (this.ShowAssets && assets.Count > 0);
                    if (AssetsPanel.Visible)
                    {
                        AssetLinkList.DataSource = assets;
                        AssetLinkList.DataBind();
                    }
                    //SHOW SUBSCRIPTIONS
                    if (this.ShowSubscription)
                    {
                        SubscriptionPlan sp = basketItem.Product.SubscriptionPlan;
                        if (sp != null && basketItem.IsSubscription && basketItem.Frequency > 0)
                        {
                            // GET THE RECURRING PAYMENT MESSAGE FOR THIS PRODUCT
                            RecurringPaymentMessage.Text = AbleCommerce.Code.ProductHelper.GetRecurringPaymentMessage(basketItem);
                            SubscriptionPanel.Visible    = true;
                        }
                    }
                }
                else
                {
                    //OUTPUT NAME
                    phProductName.Controls.Add(new LiteralControl(basketItem.Name));
                    InputList.Visible         = false;
                    KitProductPanel.Visible   = false;
                    WishlistLabel.Visible     = false;
                    ShipsToPanel.Visible      = false;
                    GiftWrapPanel.Visible     = false;
                    GiftMessagePanel.Visible  = false;
                    AssetsPanel.Visible       = false;
                    SubscriptionPanel.Visible = false;
                }
            }
            else
            {
                //NO ITEM TO DISPLAY
                this.Controls.Clear();
            }
        }
Example #14
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            _BasketItem = BasketItemDataSource.Load(BasketItemId);
            if (_BasketItem != null)
            {
                Product product = _BasketItem.Product;
                if (product != null)
                {
                    //OUTPUT THE PRODUCT NAME
                    string productName = product.Name;
                    if (_BasketItem.ProductVariant != null)
                    {
                        productName += string.Format(" ({0})", _BasketItem.ProductVariant.VariantName);
                    }
                    if (this.LinkProducts)
                    {
                        //OUTPUT NAME AS LINK
                        string url = UrlGenerator.GetBrowseUrl(product.Id, CatalogNodeType.Product, product.Name);
                        if (!string.IsNullOrEmpty(_BasketItem.KitList) && !string.IsNullOrEmpty(_BasketItem.OptionList))
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}&Kits={2}&Options={3} \">{4}</a>", Page.ResolveUrl(url), _BasketItem.Id, _BasketItem.KitList, _BasketItem.OptionList.Replace(",0", string.Empty), productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                        else if (!string.IsNullOrEmpty(_BasketItem.KitList) && string.IsNullOrEmpty(_BasketItem.OptionList))
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}&Kits={2}\">{3}</a>", Page.ResolveUrl(url), _BasketItem.Id, _BasketItem.KitList, productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                        else if (string.IsNullOrEmpty(_BasketItem.KitList) && !string.IsNullOrEmpty(_BasketItem.OptionList))
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}&Options={2}\">{3}</a>", Page.ResolveUrl(url), _BasketItem.Id, _BasketItem.OptionList.Replace(",0", string.Empty), productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                        else
                        {
                            string link = string.Format("<a href=\"{0}?ItemId={1}\">{2}</a>", Page.ResolveUrl(url), _BasketItem.Id, productName);
                            phProductName.Controls.Add(new LiteralControl(link));
                        }
                    }
                    else
                    {
                        //OUTPUT NAME
                        phProductName.Controls.Add(new LiteralControl(productName));
                    }
                    //SHOW INPUTS
                    IList <BasketItemInput> inputs = GetCustomerInputs();
                    if (inputs.Count > 0)
                    {
                        InputList.DataSource = inputs;
                        InputList.DataBind();
                    }
                    else
                    {
                        InputList.Visible = false;
                    }
                    //SHOW KIT PRODUCTS
                    IList <BasketItem> kitProductList = GetKitProducts(_BasketItem);
                    KitProductPanel.Visible = (kitProductList.Count > 0 && _BasketItem.Product.Kit != null && !_BasketItem.Product.Kit.ItemizeDisplay);
                    if (KitProductPanel.Visible)
                    {
                        KitProductRepeater.DataSource = kitProductList;
                        KitProductRepeater.DataBind();
                    }
                    //SET THE WISHLIST LABEL
                    WishlistLabel.Visible = (_BasketItem.WishlistItem != null);
                    if (WishlistLabel.Visible)
                    {
                        //SET THE WISHLIST NAME
                        WishlistLabel.Text = string.Format(WishlistLabel.Text, GetWishlistName(_BasketItem.WishlistItem.Wishlist));
                    }
                    //SET THE SHIPS TO PANEL
                    Basket basket = _BasketItem.Basket;

                    //SHOW ASSETS
                    List <AbleCommerce.Code.ProductAssetWrapper> assets = AbleCommerce.Code.ProductHelper.GetAssets(this.Page, _BasketItem.Product, _BasketItem.OptionList, _BasketItem.KitList, "javascript:window.close()");
                    AssetsPanel.Visible = (this.ShowAssets && assets.Count > 0);
                    if (AssetsPanel.Visible)
                    {
                        AssetLinkList.DataSource = assets;
                        AssetLinkList.DataBind();
                    }
                    //SHOW SUBSCRIPTIONS
                    SubscriptionPlan sp = _BasketItem.Product.SubscriptionPlan;
                    SubscriptionPanel.Visible = (this.ShowSubscription && _BasketItem.IsSubscription);
                    if (SubscriptionPanel.Visible)
                    {
                        InitialPayment.Visible = (sp.RecurringChargeSpecified);
                        if (InitialPayment.Visible)
                        {
                            InitialPayment.Text = string.Format(InitialPayment.Text, _BasketItem.Price.LSCurrencyFormat("ulc"));
                        }
                        string period;
                        if (_BasketItem.Frequency > 1)
                        {
                            period = _BasketItem.Frequency + " " + _BasketItem.FrequencyUnit.ToString().ToLowerInvariant() + "s";
                        }
                        else
                        {
                            period = _BasketItem.FrequencyUnit.ToString().ToLowerInvariant();
                        }
                        int numPayments = (sp.RecurringChargeSpecified ? sp.NumberOfPayments - 1 : sp.NumberOfPayments);
                        if (sp.NumberOfPayments == 0)
                        {
                            RecurringPayment.Text = string.Format("Recurring Payment: {0}, every {1} until canceled", sp.CalculateRecurringCharge(_BasketItem.Price).LSCurrencyFormat("ulc"), period);
                        }
                        else
                        {
                            RecurringPayment.Text = string.Format(RecurringPayment.Text, numPayments, sp.CalculateRecurringCharge(_BasketItem.Price).LSCurrencyFormat("ulc"), period);
                        }
                    }
                }
                else
                {
                    //OUTPUT NAME
                    phProductName.Controls.Add(new LiteralControl(_BasketItem.Name));
                    InputList.Visible         = false;
                    KitProductPanel.Visible   = false;
                    WishlistLabel.Visible     = false;
                    AssetsPanel.Visible       = false;
                    SubscriptionPanel.Visible = false;
                }
            }
            else
            {
                //NO ITEM TO DISPLAY
                this.Controls.Clear();
            }
        }