SSL Pproblem with prompts to display secure and non-secure content on pages that contain product ima

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
I have configured the SSL successfully, but it shows the Error message every time when page lades having Product images. What should I do now.
13 年 前
You need to check header for "http" or "https".
If it is "https" then made logic in PictureManager.GetPictureUrl in GetProductVariantImageUrl in ordersummery.ascx.cs, such that it return url with https. It is simple.
13 年 前
ketan.pipaliya wrote:
You need to check header for "http" or "https".
If it is "https" then made logic in PictureManager.GetPictureUrl in GetProductVariantImageUrl in ordersummery.ascx.cs, such that it return url with https. It is simple.


OK, would you be more specific? I have the same concern I look ordersummery.ascx.cs, but I do not know how to or where to insert the https. Will you please give use an example? My customer will freak out it that certificate are flagging a warning because the images?
This is a very Important topic
13 年 前
public string GetProductVariantImageUrl(int ProductVariantID)
        {
            string pictureUrl = String.Empty;
            ProductVariant productVariant = ProductManager.GetProductVariantByID(ProductVariantID);
            Picture productVariantPicture = productVariant.Picture;

            pictureUrl = PictureManager.GetPictureUrl(productVariantPicture, 149, 152, false);

            if (String.IsNullOrEmpty(pictureUrl))
            {
                Product product = productVariant.Product;
                ProductPictureCollection productPictures = product.ProductPictures;
                if (productPictures.Count > 0)
                {
                    pictureUrl = PictureManager.GetPictureUrl(productPictures[0].PictureID, 149, 152);
                    if (Request.Url.Scheme == "http")
                    {
                        pictureUrl = PictureManager.GetPictureUrl(productPictures[0].PictureID, 149, 152);
                    }
                    else
                    {
                        pictureUrl = PictureManager.GetPictureUrlForSSL(productPictures[0].PictureID, 149, 152);
                    }
                }
                else
                {
                    
                    if (Request.Url.Scheme == "http")
                    {
                        pictureUrl = PictureManager.GetDefaultPictureUrl(149, 152);
                    }
                    else
                    {
                        pictureUrl = PictureManager.GetDefaultPictureUrlForSSL(149, 152);
                    }
                }
            }
            return pictureUrl;
        }


GetDefaultPictureUrlForSSL is functions which returns image path with https.
13 年 前
Thanks ! ketan.pipaliya I see now the different of what you did. I didn't add the "For" in the SSL. I appreciate the example.
13 年 前
Hi ketan.pipaliya,

Which version you are using, because ther is no method of "GetPictureUrlForSSL" available in PictureManager. My problem is still there.

Thanks for your interest.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.