Problem with many product pics

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 năm cách đây
I just set up a product in the store where it was many pictures to the product. When the pictuures reach the end of the page to the right it continues. I think it should start a new row. I have tried to fix the css but it fails. Anyone how can help me?
12 năm cách đây
Can you link your page where it's happening?
12 năm cách đây
No, I'm sorry. It's local.
12 năm cách đây
Tough to troubleshoot without seeing but here are some things that might help.

1. How many pictures cause the problem.

2. Have you changed the thumbnail size from the default?  If yes, what size do you use?
12 năm cách đây
Hi,

here you find the resolution to the problem:
https://www.nopcommerce.com/boards/t/13548/solved-images-stretching-across-product-page.aspx
12 năm cách đây
You could also try; /Presentation/Nop.Web/Views/Catalog/_ProductDetailsPictures.cshtml: Line 16 replace old Image Table code with below;

Please note: data-gallery="lightbox-p" is a reference to updated slimbox2 file found in codeplex Change set:73df59e95500 which is an update post NopCom v2.5. You could use rel="lightbox-p" instead or remove the hyper link altogether. Change the number 6 to the number of images to want NopCom to display before starting a new line. You could replace the number 6 with a reference to a setting string in the DB to allow you to alter it within admin.

/* CODE START */

    @if (Model.PictureModels.Count > 1)
    {  
        //If first image in collection i.e. feature image hide from thumbnail collection, but include in lighbox collection
        <a href="@Model.PictureModels.ElementAt(0).FullSizeImageUrl" data-gallery="lightbox-p" title="@Model.Name" style="visibility:hidden;"></a>

        <table style="margin-top: 10px;">
            <tr>
                @for (int i = 0; i < Model.PictureModels.Count(); i++)
                {
                    var picture = Model.PictureModels.ElementAt(i);
                    
                        if (i != 0)
                        {
                            //If NOT first image in collection i.e. feature image  
                            //Output thumbnail collection, which may be clicked to open in a lightbox collection
                            <td>
                                <a href="@picture.FullSizeImageUrl" data-gallery="lightbox-p" title="@Model.Name">
                                <img src="@picture.ImageUrl" alt="@picture.AlternateText" title="@picture.Title" /></a>
                            </td>
                        }
                    
                        //Start new row after every 6th image in collection %(modulus) NOT last image or First Image
                        if (i % 6 == 0 && i != (Model.PictureModels.Count() - 1) && i != 0)
                        {
                            @Html.Raw("</tr><tr>")
                        }
                }
            </tr>
        </table>
    }

/* CODE END */
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.