Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Нужна помощь с фото товара


Recommended Posts

Проблема в том, что Гугл не видит оригинальные фото, а видит только ресайзы. Оригинальные фото на 100% уникальные. Сделаны фотографом в студии. IPTC и EXIF метаданные приписаны. И очень хорошо было бы показать эти фото Гуглу.  Для этого и существуют  “src” и “scrset”

 

 

Задача такая

Нужно в src=  вывести самое лучшее фото (оригинал), именно его всегда индексирует Гуглбот.

srcset= оставить ресайз и это будет отображать браузер.

Сколько это может стоить?

 

Сечас так

<img decoding="async" src="https://site.com/image/cache/catalog/chanterelles-tigres5-1200x1200.jpg" alt="«Лисички/тигри» 180*200 складной K03 ПРЕМИУМ оригинал" title="«Лисички/тигри» 180*200 складной K03 ПРЕМИУМ оригинал" data-thumb="https://site.com/image/cache/catalog/chanterelles-tigres5-1200x1200.jpg" data-full="https://site.com/image/cache/catalog/chanterelles-tigres5-1200x1200.jpg" class="product-page__image-main-img img-responsive" width="1200" height="1200">

Тема Unishop2

<img decoding="async" src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" data-thumb="{{ thumb }}" data-full="{{ popup }}" width="{{ thumb_width }}" height="{{ thumb_height }}" class="product-page__image-main-img img-responsive" >

 

Edited by 1212121213
Link to comment
Share on other sites


для сторінки товару візьміть код нижче, створіть файл original_product_image.ocmod.xml, код у файл, файл у папку system, оновити кеш модифікаторів

 

<modification>
	<name><![CDATA[Original Product Image]]></name>
	<code>original_product_image</code>
	<version>1.0.0</version>
	<author>Pavel Kravchenko</author>
	<link>https://opencartforum.com/profile/711752-paulkravchenko/</link>
	
	<file path="catalog/controller/product/product.php">
		<operation>
			<search><![CDATA[$data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_thumb_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_thumb_height'));]]></search>
			<add position="after"><![CDATA[
				$data['image'] = HTTPS_SERVER . 'image/' . $product_info['image'];
			]]></add>
		</operation>
	</file>
	<file path="catalog/view/theme/*/template/product/product.twig">
		<operation>
			<search><![CDATA[<img decoding="async" src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" data-thumb="{{ thumb }}" data-full="{{ popup }}" width="{{ thumb_width }}" height="{{ thumb_height }}" class="product-page__image-main-img img-responsive" >]]></search>
			<add position="replace"><![CDATA[<img decoding="async" src="{{ image }}" srcset="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" data-thumb="{{ thumb }}" data-full="{{ popup }}" width="{{ thumb_width }}" height="{{ thumb_height }}" class="product-page__image-main-img img-responsive" >]]></add>
		</operation>
	</file>
</modification>

 

  • +1 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.