1. atrus
  2. RO CSVI
  3. Wednesday, 14 November 2018
  4.  Subscribe via email
Hi all,

Have the following issue:

When exporting multiple images for a URL, instead of getting different <image:image> tags for each image of a product, i get a single <image:image> with all the images separated with comma:

<image:image>
<image:loc>
<![CDATA[
https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(1).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(2).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(3).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(4).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(5).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(6).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(7).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(8).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(9).jpg,https://www.quality-tuning.eu/images/stories/virtuemart/product/152517-8-SET-mercedes-amg-e63-style-exhaust-tips-(10).jpg
]]>
</image:loc>
</image:image>

See attached the template for your ref, thanks!

Rgrds,
Chris
Accepted Answer Pending Moderation
Hello Chris,
Yes, that is correct. Multiple images for a product are exported using a comma and not with individual image tag.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Thanks Tharuna,

Is this ok for Google? I think they need multiple image tags per url:

https://support.google.com/webmasters/answer/178636?hl=en

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Chris,
To get multiple node for images, In your export template on File tab set Website field to Google and save the template. If you then run the export, in your XML you should be seeing the first image in <picture_url> node and the rest of the images as individual <g:additional_image_link> node . Let me know if that helps.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Thanks Tharuna, yes but there must be an issue, because it is not using the proper Google tags now, <picture_url>, <g:additional_image_link> etc are not valid for Google sitemaps :)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Chris,
You can change <picture_url> in your template XML layout. For additional images, try creating your own export XML handler in the folder administrator/components/com_csvi/helper/file/export/xml. Duplicate google.php file in the folder and rename the file to say googlecustom.php. Edit the file and change the class name in the file CsviHelperFileExportXmlGoogle to class CsviHelperFileExportXmlGooglecustom, where googlecustom is the name of your new file. Now in the new file at around line 268, change g:additional_image_link to node name you need. Edit your template and on File tab set set Website field to the googlecustom file handler you just created. This should fix your node issue. Let me know how it goes.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Thanks Tharuna,

I am working on it; the only things remaining:

1. Nesting <image:loc> inside <image:image>
e.g.: <image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>

2. Renaming <product_url>

How could i achieve the above? Thank you in advance. See attached my custom file.

Rgrds,
Chris
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Chris,
1. Nesting <image:loc> inside <image:image>
e.g.: <image:image>
<image:loc> http://example.com/image.jpg </image:loc>
</image:image>

Try adding $xml = '<image:image>' before the foreach ($images as $image) and $xml .= '</image:image>' after closing bracket of foreach (after line 270) statement in your Google custom helper file for case 'picture_url': condition at line 245 and see if it works.

2. Renaming <product_url>

You can set Column header for product_url in template fields to the name you need.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!