1. kensingfield
  2. RO CSVI
  3. Thursday, 30 March 2023
  4.  Subscribe via email
Hello together,

i try to use CSVI to export Google Merchant feeds. The exports works fine, but i have two problems:

Problem 1: Addtional images
In my old Google Merchant Extension (which isn't devoloped further) was it possible to export additional product photos, so that the xml file contains rows like:

<g:additional_image_link>https://www.xxxxxxx.com/image1.jpg</g:additional_image_link>
<g:additional_image_link>https://www.xxxxxxx.com/image2.jpg</g:additional_image_link>


Is there a was to do this with CSVI?

Problem 2: Shipping cost from custom field
The shipping costs for Google are saved in an custom field. So i would like to export this value to the shipping costs. I have problems to set it up, that it appears like that in the xml file:

<g:shipping>
<g:country>CH</g:country>
<g:service>Versandkosten</g:service>
<g:price>Value_from_customfield</g:price>
</g:shipping>


Is there a way to get this structure?

Thanks for any help.

best regards

Björn
Accepted Answer Pending Moderation
Hello,
Is there a was to do this with CSVI?

In Google export template on Options tab set Number of pictures to the number of additional images you need and save the template. Add picture_url field as template field. See attached screenshot. You can see extra images exported as <g:additional_image_link>

Is there a way to get this structure?

Prices values comes from VirtueMart itself. If you want to customise this to get custom field value then you need to write custom code to change this behaviour. You can then set this as override for export.
Attachments (2)
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
Tharuna, thanks for your quick reply!

The picture export works now like a charm.

With the export of the shipping price i got still my problems, because i really dont know, what i have to change in the custom export file. The shipping price in manually set for the feed via a custom field.

Isn't there an option to create a "g:shipping" group or something like that under the tab "fields" -> "group fields" and include these 3 fields into a group?
templatefields to group in gshipping.png

so that it looks like:

<g:shipping>
<g:country>CH</g:country>
<g:service>Versandkosten</g:service>
<g:price>86.40 CHF</g:price>
</g:shipping>


best regards

Björn
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
With the export of the shipping price i got still my problems, because i really dont know, what i have to change in the custom export file. The shipping price in manually set for the feed via a custom field.

You need to hardcode these options in override file. To do that go to file plugins/csviaddon/virtuemart/com_virtuemart/model/export/google.php around line number 2412 find and replace line


$value = $this->countryCode . ':' . $title . ':' . $this->formatNumber($prices[0]) . ' ' . $currency_code_3;


to along with $this->formatNumber($prices[0]) replaced with value from custom field. You may need to write a SQL query to read the custom field value.


$value = 'CH: Versandkosten' . ':' . $this->formatNumber($prices[0]) . ' ' . $currency_code_3;


Save the file with a different name and set this file as override as explained in above linked document. Run export and check.

Isn't there an option to create a "g:shipping" group or something like that under the tab "fields" -> "group fields" and include these 3 fields into a group?

Group fields is to group the data on export and not used for grouping the fields.
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
  • Page :
  • 1


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