Перейти к содержимому


Исправление передачи изображений товара в Микроразметку товаров из блока С этим товаром смотрят, Сопутствующих товаров


  • Авторизуйтесь для ответа в теме
В этой теме нет ответов

#1 metry

metry

    Активный участник

  • Модераторы
  • 815 сообщений

Отправлено 02 Апрель 2021 - 20:30

Для внесения изменений зайдите в редактор шаблонов-->Товар и найдите:

					<a href="{related_views_goods.URL_MIN_PRICE_NOW | url_amp}"  class="product-img mouseHoverImgCarousel">
					  {% IF related_views_goods.IMAGE_EMPTY %}
					  <img class="lozad" data-src="{ASSETS_IMAGES_PATH}no-photo-medium.png?design=neon" alt="{related_views_goods.NAME}" title="{related_views_goods.NAME}"  itemprop="image">
					  {% ELSE %}
						<img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_views_goods.IMAGE_MEDIUM}" alt="{related_views_goods.NAME}" title="{related_views_goods.NAME}"  itemprop="image">
						{% FOR images %}
						  {% IF related_views_goods.IMAGE_MEDIUM != related_views_goods.images.MEDIUM %}
						  <img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_views_goods.images.MEDIUM}" alt="{related_views_goods.NAME}" title="{related_views_goods.NAME}"  itemprop="image">
						  {% ENDIF %}
						{% ENDFOR %}
					  {% ENDIF %}
					</a>

замените на:


					 <link itemprop="image" href="{related_views_goods.IMAGE_MEDIUM}" />
					<a href="{related_views_goods.URL_MIN_PRICE_NOW | url_amp}"  class="product-img mouseHoverImgCarousel">
					  {% IF related_views_goods.IMAGE_EMPTY %}
					  <img class="lozad" data-src="{ASSETS_IMAGES_PATH}no-photo-medium.png?design=neon" alt="{related_views_goods.NAME}" title="{related_views_goods.NAME}"  >
					  {% ELSE %}
						<img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_views_goods.IMAGE_MEDIUM}" alt="{related_views_goods.NAME}" title="{related_views_goods.NAME}"  >
						{% FOR images %}
						  {% IF related_views_goods.IMAGE_MEDIUM != related_views_goods.images.MEDIUM %}
						  <img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_views_goods.images.MEDIUM}" alt="{related_views_goods.NAME}" title="{related_views_goods.NAME}"  >
						  {% ENDIF %}
						{% ENDFOR %}
					  {% ENDIF %}
					</a>


далее найдите:


					<a href="{related_goods.URL_MIN_PRICE_NOW | url_amp}"  class="product-img mouseHoverImgCarousel">
					  {% IF related_goods.IMAGE_EMPTY %}
					  <img class="lozad" data-src="{ASSETS_IMAGES_PATH}no-photo-medium.png?design=neon" alt="{related_goods.NAME}" title="{related_goods.NAME}"  itemprop="image">
					  {% ELSE %}
						<img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_goods.IMAGE_MEDIUM}" alt="{related_goods.NAME}" title="{related_goods.NAME}"  itemprop="image">
						{% FOR images %}
						  {% IF related_goods.IMAGE_MEDIUM != related_goods.images.MEDIUM %}
						  <img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_goods.images.MEDIUM}" alt="{related_goods.NAME}" title="{related_goods.NAME}"  itemprop="image">
						  {% ENDIF %}
						{% ENDFOR %}
					  {% ENDIF %}
					</a>

замените на:

					 <link itemprop="image" href="{related_goods.IMAGE_MEDIUM}" />
				   
					<a href="{related_goods.URL_MIN_PRICE_NOW | url_amp}"  class="product-img mouseHoverImgCarousel">
					  {% IF related_goods.IMAGE_EMPTY %}
					  <img class="lozad" data-src="{ASSETS_IMAGES_PATH}no-photo-medium.png?design=neon" alt="{related_goods.NAME}" title="{related_goods.NAME}"  >
					  {% ELSE %}
						<img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_goods.IMAGE_MEDIUM}" alt="{related_goods.NAME}" title="{related_goods.NAME}"  >
						{% FOR images %}
						  {% IF related_goods.IMAGE_MEDIUM != related_goods.images.MEDIUM %}
						  <img class="lozad" src="{ASSETS_IMAGES_PATH}loader-min.gif"  data-src="{related_goods.images.MEDIUM}" alt="{related_goods.NAME}" title="{related_goods.NAME}"  >
						  {% ENDIF %}
						{% ENDFOR %}
					  {% ENDIF %}
					</a>





Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных