You have no items in your shopping cart.

Friday, November 1, 2024 3:00:08 AM

Place text & images above & below product picture when "listing" product in a category

Posted: 7 years ago

#5418 Quote

kh

Posted: 7 years ago

#5418 Quote
Google does not like text within a product image.  I would like to use Content Manager to show additional text above & below product image when show product list within category.  Example below has text as part of image.  I would like to break it out of image.



Posted: 7 years ago

#5419 Quote

kh

Posted: 7 years ago

#5419 Quote
https://mebulbs.biz/a/cd/full-power-4  is example.  Image did not show up in first post.

Posted: 7 years ago

#5423 Quote

Support

Posted: 7 years ago

#5423 Quote
I'll see and answer you after 10 minutes.

Posted: 7 years ago

#5424 Quote

Support

Posted: 7 years ago

#5424 Quote
What nopcommerce version do you use?
We plan to add new feature in this plugin and we want to know about the minimum release number...

Posted: 7 years ago

#5425 Quote

kh

Posted: 7 years ago

#5425 Quote
Currently on 3.7

Posted: 7 years ago

#5426 Quote

Support

Posted: 7 years ago

#5426 Quote
Ok.


You should add new lines in the file WidgetZones.xml.
  <WidgetZone>productdetails_before_one_picture</WidgetZone>
  <WidgetZone>productdetails_after_one_picture</WidgetZone>


Open the file _ProductDetailsPictures.cshtml
and add the next lines:

        @Html.Widget("productdetails_before_one_picture", Model.Id)
....
        @Html.Widget("productdetails_after_one_picture", Model.Id)


Example

    <div class="picture">
        @Html.Widget("productdetails_before_one_picture", Model.Id)
        @if (Model.DefaultPictureZoomEnabled)
        {
            <a href="@Model.DefaultPictureModel.FullSizeImageUrl" title="@Model.DefaultPictureModel.Title" id="main-product-img-lightbox-anchor-@Model.Id">
                <img alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title" itemprop="image" id="main-product-img-@Model.Id" />
            </a>
            <script type="text/javascript">
                $(document).ready(function () {
                    $('#main-product-img-lightbox-anchor-@Model.Id').magnificPopup(
                    {
                        type: 'image',
                        removalDelay: 300,
                        gallery: {
                            enabled: true,
                            tPrev: '@T("Media.MagnificPopup.Previous")',
                            tNext: '@T("Media.MagnificPopup.Next")',
                            tCounter: '@T("Media.MagnificPopup.Counter")'
                        },
                        tClose: '@T("Media.MagnificPopup.Close")',
                        tLoading: '@T("Media.MagnificPopup.Loading")'
                    });
                });
            </script>
        }
        else
        {
            <img alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title" itemprop="image" id="main-product-img-@Model.Id" />
        }
        @Html.Widget("productdetails_after_one_picture", Model.Id)
    </div>

Posted: 7 years ago

#5427 Quote

Support

Posted: 7 years ago

#5427 Quote
Use CSS for styling.

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved