Re: Google Merchant Center Feeder for ZC v1.5.x
"The at most a couple 100 more is with changes in php memory." Overall I can pull about 4500 products before it runs out of memory had similar issues with easy populate 4 for ceon uri I have to do each category due to sql running out of memory versus doing whole catalogue. Can get it to work just can't do full 8000-9000 products. My guess is issue with amount given by host but will try on clean install. Dealing with just host is so much fun. I have 2 feeds right now of about 4500 so can upload to google so not as worried will keep plugging away at it though. I have repaired, optimized sql etc. Currently breaking about same product number now 24311 so is constantly running out at same product. The only table unable to optimize is flexible footer. Otherwise it has all been optimized. I am just happy to at least get a feed at this point so it is working just an extra step :-)
Thanks all
Sandria
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
YarnCharm
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.
Hi,
I have the same issue as you. I am not sure about which googlefroogle.php to change. I changed the one under mystore/catalog/googlefroggle.php but nothing happened so must be a wrong one. Please give me the catalog for both googlefroggle.php and google_base.php. Appreciate all help. Many thanks in advance. /Per
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
pixbo
I have the same issue as you. I am not sure about which googlefroogle.php to change. I changed the one under mystore/catalog/googlefroggle.php but nothing happened so must be a wrong one. Please give me the catalog for both googlefroggle.php and google_base.php. Appreciate all help. Many thanks in advance. /Per
The two files I modified were (as seen from catalog root):
/googlefroogle.php
at lines 380 and 418
/includes/classes/google_base.php
at lines 302 and 350
Do you have an xml feed you can point us to, to verify the problem?
Re: Google Merchant Center Feeder for ZC v1.5.x
I found the files and pasted your code but got this error when running the program: Parse error: syntax error, unexpected ''.'' (T_CONSTANT_ENCAPSED_STRING) on line 380 perhaps I did something wrong?
Failed in posting the xml-file
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
pixbo
I found the files and pasted your code but got this error when running the program: Parse error: syntax error, unexpected ''.'' (T_CONSTANT_ENCAPSED_STRING) on line 380 perhaps I did something wrong?
Failed in posting the xml-file
Extract from my xml-file:
<item>
<title><![CDATA[Sweden WOMAN dressed in Folk Costume Skane - early 1900s un]]></title>
<g:id><![CDATA[10]]></g:id>
<g:price>5.50</g:price>
<g:identifier_exists><![CDATA[False]]></g:identifier_exists>
<g:availability>in stock</g:availability>
<g:shipping_weight>0.006 kg</g:shipping_weight>
<g:condition>used</g:condition>
<g:product_type>Postcards</g:product_type>
<g:expiration_date>2017-10-26</g:expiration_date>
<g:mpn><![CDATA[605]]></g:mpn>
<g:currency>USD</g:currency>
I modified both /googlefroogle.php and /includes/classes/google_base.php as you described. Unfortunately when I run the program I got this error in googlefroogle.php on line 380
”Parse error: syntax error, unexpected ''.'' (T_CONSTANT_ENCAPSED_STRING)”.
I don't understand why I got a syntax error. Perhaps is GOOGLE_PRODUCTS_CURRENCY not working for me. Is there another way to put the currency within the price attribute??
I hope you can help me.
Thanks, Per
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
pixbo
I modified both /googlefroogle.php and /includes/classes/google_base.php as you described. Unfortunately when I run the program I got this error in googlefroogle.php on line 380
”Parse error: syntax error, unexpected ''.'' (T_CONSTANT_ENCAPSED_STRING)”.
I don't understand why I got a syntax error. Perhaps is GOOGLE_PRODUCTS_CURRENCY not working for me. Is there another way to put the currency within the price attribute??
i do not think you modified the scripts exactly as they are written. it looks like you are getting a PHP error, as opposed to a google XML parsing error. the PHP script is dying so it is not outputting the new XML file.
post your modified code sections. perhaps we can see where you went adrift.
best.
Re: Google Merchant Center Feeder for ZC v1.5.x
Thanks for coming back.
Changed to the following:
googlefroogle.php
line 380 $item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '') . ' ' . GOOGLE_PRODUCTS_CURRENCY));
line 431 $shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate . ' ' . GOOGLE_PRODUCTS_CURRENCY));
google-base.php
line 302 $item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '') . ' ' . GOOGLE_PRODUCTS_CURRENCY));
line 350 $shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate . ' ' . GOOGLE_PRODUCTS_CURRENCY));
I did all around again and found an empty space at the end of the line. Now I get the xml-file and currency is in the attribute but got another issue: all amounts are 0.00. Any hint of what to do to fix this?
xml-file
<title><![CDATA[Sweden PEOPLE dressed in Folk Costumes - Hedemora]]></title>
<g:id><![CDATA[6]]></g:id>
<g:price>0.00 USD</g:price>
<g:availability>in stock</g:availability>
<g:shipping_weight>0.006 kg</g:shipping_weight>
Re: Google Merchant Center Feeder for ZC v1.5.x
Unfortunately still problem with my xml-file as all amounts are 0.00 USD . I guess the modifications of the googlefroogle.php are OK but unsure about the google-base.php.
googlefroogle.php changed to
line 380:
[PHP]$item->appendChild($dom->createElement('g:price', number_format($variants_price, 2, '.', '') . ' ' . GOOGLE_PRODUCTS_CURRENCY));/PHP]
line 431:
[PHP]shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate . ' ' . GOOGLE_PRODUCTS_CURRENCY));/PHP]
google_base.php changed to
line 302:
[PHP]$item->appendChild($dom->createElement('g:price', number_format($price, 2, '.', ''). ' ' . GOOGLE_PRODUCTS_CURRENCY));/PHP]
line 350:
[PHP] $shipping->appendChild($dom->createElement('g:price', (float)$shipping_rate . ' ' . GOOGLE_PRODUCTS_CURRENCY));/PHP]
XML-file here: https://swedenstore.biz/feed/swedenstore133_products_en.xml
I would very much appreciate help to solve my problem
Many thanks in advance, Per
Re: Google Merchant Center Feeder for ZC v1.5.x
try and review before posting. i applaud your attempt at the use of BBCODE, but you are missing a '[' for the end PHP tag. it makes it much easier to read if done correctly.
i think you have a problem with your MAP pricing. looking at the code:
PHP Code:
if ($google_base->check_product($products->fields['products_id'])) {
if ($gb_map_enabled && $products->fields['map_enabled'] == '1') {
$price = $products->fields['map_price'];
} else {
$price = $google_base->google_get_products_actual_price($products->fields['products_id']);
}
i think you have MAP pricing enabled (configuration key: GOOGLE_PRODUCTS_MAP_PRICING), and you have NOT entered a MAP price. if those conditions are met, you will get a zero dollar price.
try turning GOOGLE_PRODUCTS_MAP_PRICING to false, rerun the feed and let us know the results.
best.
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
carlwhat
try and review before posting. i applaud your attempt at the use of BBCODE, but you are missing a '[' for the end PHP tag. it makes it much easier to read if done correctly.
i think you have a problem with your MAP pricing. looking at the code:
PHP Code:
if ($google_base->check_product($products->fields['products_id'])) {
if ($gb_map_enabled && $products->fields['map_enabled'] == '1') {
$price = $products->fields['map_price'];
} else {
$price = $google_base->google_get_products_actual_price($products->fields['products_id']);
}
i think you have MAP pricing enabled (configuration key: GOOGLE_PRODUCTS_MAP_PRICING), and you have NOT entered a MAP price. if those conditions are met, you will get a zero dollar price.
try turning GOOGLE_PRODUCTS_MAP_PRICING to false, rerun the feed and let us know the results.
best.
The Enable Map Pricing in feeder configuration and was (as it has been all times) set to false when producing the xml-files. The googlefroogle.php, google_base.php and feeder configuration I used are here. Could the Map pricing still be the issue?
Thanks, Per