I just recently upgraded to 1.5.5e fresh install and added Merchant Center Feeder 1.14.5.
I immediately encountered a problem with Google reporting the following two errors:
"Unsupported currency in attribute: price" and "Missing required attribute: price"
On inspection of the xml output file, I found the following elements (as example) in each item:
Code:
<g:price>8.80</g:price>
<g:currency>USD</g:currency>
Then checking Google's help on the product data attributes for price:
https://support.google.com/merchants/answer/6324371
I came to the conclusion that it looks like for xml, that the currency should really be included within the price attribute.
I made the following changes to resolve it at line 380 and line 431 in googlefroogle.php :
line 380 changed from:
PHP Code:
$item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '')));
to:
PHP Code:
$item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '') . ' ' . GOOGLE_PRODUCTS_CURRENCY));
and
line 431 change from
PHP Code:
$shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate));
to:
PHP Code:
$shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate . ' ' . GOOGLE_PRODUCTS_CURRENCY));
And I made changes similarly at lines 302 and 350 in google_base.php.
I also ended up setting "Show Default Currency" to false in the Google Merchant Center Feed configuration to turn off the <g:currency> field that doesn't seem to be parsing anyway (but it also eliminated the ¤cy=USD from the URL which is unnecessary on our site, that may not be the case for others.)
In case anyone ran into the same thing, that seems to have taken care of the issue for me.
Bookmarks