Remove image and product name from product pages.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 anni tempo fa
Being new to the software, I'm a little confused on how to remove the product image and product name from the product pages.   I commented out everything in the BindData function of ProductInfo.aspx.cs except FullDescription and everything still shows.

        protected void BindData()
        {
            Product product = ProductManager.GetProductByID(ProductID);
            if (product != null)
            {
                //lProductName.Text = Server.HtmlEncode(product.Name);
                //lShortDescription.Text = product.ShortDescription;
                lFullDescription.Text = product.FullDescription;

                //ProductPictureCollection productPictures = product.ProductPictures;
                //if (productPictures.Count > 1)
                //{
                //    defaultImage.ImageUrl = PictureManager.GetPictureUrl(productPictures[0].PictureID, SettingManager.GetSettingValueInteger("Media.Product.DetailImageSize", 300));
                //    defaultImage.ToolTip = String.Format(GetLocaleResourceString("Media.Product.ImageAlternateTextFormat"), product.Name);
                //    defaultImage.AlternateText = String.Format(GetLocaleResourceString("Media.Product.ImageAlternateTextFormat"), product.Name);
                //    lvProductPictures.DataSource = productPictures;
                //    lvProductPictures.DataBind();
                //}
                //else if (productPictures.Count == 1)
                //{
                //    defaultImage.ImageUrl = PictureManager.GetPictureUrl(productPictures[0].PictureID, SettingManager.GetSettingValueInteger("Media.Product.DetailImageSize", 300));
                //    defaultImage.ToolTip = String.Format(GetLocaleResourceString("Media.Product.ImageAlternateTextFormat"), product.Name);
                //    defaultImage.AlternateText = String.Format(GetLocaleResourceString("Media.Product.ImageAlternateTextFormat"), product.Name);
                //    lvProductPictures.Visible = false;
                //}
                //else
                //{
                //    defaultImage.ImageUrl = PictureManager.GetDefaultPictureUrl(SettingManager.GetSettingValueInteger("Media.Product.DetailImageSize", 300));
                //    lvProductPictures.Visible = false;
                //}
            }
            else
                this.Visible = false;
        }
14 anni tempo fa
Anybody?
14 anni tempo fa
Rather than commenting them out I would recommend removing them from both the ascx control and references from the code behind. This is a much cleaner approach.

Just make sure you have recompiled your project after making these changes.

Hope this helps.
Ben
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.