Re: Google Merchant Center Feeder for ZC v1.5.x
Hi if anyone is on now please can you give me some advice or point me in the right direction. I have installed the latest Google merchant Feeder for v1.5 but I am having problems. One when I try to upload my items only 58 out of 381 is uplaoded. Now when I try to view my feed I get Feed Error Code.
Please help
Re: Google Merchant Center Feeder for ZC v1.5.x
Hi All! I searched here, on the 1.3.x and Numinix forum but can't find an answer (althought the problem has been mention there :( )
Here's my debug:
Code:
[10-May-2012 22:09:37] PHP Warning: fopen(/***/public_html/module_version/google_merchant_center_feeder.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in ***/public_html/includes/classes/google_base.php on line 81
[10-May-2012 22:09:37] PHP Warning: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for /***/public_html/module_version/google_merchant_center_feeder.txt in /***/public_html/includes/classes/google_base.php on line 82
[10-May-2012 22:09:37] PHP Warning: fread(): supplied argument is not a valid stream resource in /***/public_html/includes/classes/google_base.php on line 82
[10-May-2012 22:09:37] PHP Warning: fclose(): supplied argument is not a valid stream resource in /***/public_html/includes/classes/google_base.php on line 83
From what I understand it says that "public_html/module_version/google_merchant_center_feeder.txt" is missing. But this file can not be found in the downloaded package (both ZC and Numinix downloads).
Forgive me if I did not see the answer if it's already somewhere....
Re: Google Merchant Center Feeder for ZC v1.5.x
I am having this problem
Zen 1.50 running 1.13.0
Files were trying to be generated so it just hangs.
So I tried making smaller file. It worked.
Called my Server company. Aparently they say the process took so much resources
that they shut down my cpu usage when it runs.
Someone suggested I optimize my database ( so I did)
When I ran the program again. It gave me an error
Quote:
[22-May-2012 03:27:04 UTC] PHP Warning: fopen(/public_html/module_version/google_merchant_center_feeder.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in /includes/classes/google_base.php on line 81
[22-May-2012 03:27:04 UTC] PHP Warning: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for /public_html/module_version/google_merchant_center_feeder.txt in /public_html/includes/classes/google_base.php on line 82
[22-May-2012 03:27:04 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /public_html/includes/classes/google_base.php on line 82
[22-May-2012 03:27:04 UTC] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /public_html/includes/classes/google_base.php on line 83
[22-May-2012 03:27:04 UTC] PHP Fatal error: 1054:Unknown column 'p.products_condition' in 'field list' :: SELECT distinct(pd.products_name), p.products_id, p.products_model, pd.products_description, p.products_image, p.products_tax_class_id, p.products_price_sorter, p.products_priced_by_attribute, p.products_type, GREATEST(p.products_date_added, IFNULL(p.products_last_modified, 0), IFNULL(p.products_date_available, 0)) AS base_date, p.products_date_available, m.manufacturers_name, p.products_quantity, pt.type_handler, p.products_weight, p.products_condition
FROM products p
LEFT JOIN manufacturers m ON (p.manufacturers_id = m.manufacturers_id)
LEFT JOIN products_description pd ON (p.products_id = pd.products_id)
LEFT JOIN product_types pt ON (p.products_type=pt.type_id)WHERE p.products_status = 1
AND p.products_type <> 3
AND p.product_is_call <> 1
AND p.product_is_free <> 1
AND pd.language_id = 1
AND (
p.products_image IS NOT NULL
OR p.products_image != ''
OR p.products_image != 'no_picture.gif'
)
GROUP BY pd.products_name
ORDER BY p.products_id ASC; in /public_html/includes/classes/db/mysql/query_factory.php on line 101
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
PHP Warning: fopen(/public_html/module_version/google_merchant_center_feeder.txt)
Ok 1st I dont seem to have this file.... Is this included? Or a conflict?
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
milobloom
Ok 1st I dont seem to have this file.... Is this included? Or a conflict?
I have yet to find an answer to that question and I've dealt directly with the people who wrote it.
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
laurelsstitchery
I have yet to find an answer to that question and I've dealt directly with the people who wrote it.
Just a suggestion to all who've reported this error.. Have you tried creating this file, and uploading it to the place where it's expected to be based on the error??? I would think that a simple text file with the version number in it is all that's needed. Because when I do a Google search for "module_version/google_merchant_center_feeder.txt", I was able to see these files on other sites..
Re: Google Merchant Center Feeder for ZC v1.5.x
Quote:
Originally Posted by
DivaVocals
Just a suggestion to all who've reported this error.. Have you tried creating this file, and uploading it to the place where it's expected to be based on the error??? I would think that a simple text file with the version number in it is all that's needed. Because when I do a Google search for "module_version/google_merchant_center_feeder.txt", I was able to see these files on other sites..
Ok I tried doing that. It looks like that error went away.
Now I get this one:
Quote:
[22-May-2012 17:38:12 UTC] PHP Warning: constant() [<a href='function.constant'>function.constant</a>]: Couldn't find constant in /home/XXXX/public_html/XXXXX/includes/functions/admin_access.php on line 39
Re: Google Merchant Center Feeder for ZC v1.5.x
Oh I forgot to add that I do get the same error when trying to run a product feed.
Then I went to the cache folder and saw
[22-May-2012 17:38:12 UTC] PHP Warning: constant() [<a href='function.constant'>function.constant</a>]: Couldn't find constant in /home/XXXX/public_html/XXXXX/includes/functions/admin_access.php on line 39
Bug: Additional Images, 404 errors images googlebot
In 1.13.0 a call was added to a function to add additional images into the feed.
After quite some time seeing 404 errors in my server logs while googlebot was looking for images in the images root instead of subdirectories, I eventually find the problem here.
So, for those of you with additional images (most people I imagine) have a look at your feed to see if the image path is correct for additional images. It should be already correct for the base image.
If you find the additional images link to be pointing to /images/myimage01.jpg instead of /images/mysubdirectory/myimage_01.jpg (deliberate underscore: http://www.zen-cart.com/content.php?100), here is my fix.
Rather than just fix what was broke, I took at look at the whole function and tried to improve it, and add comments for the terminally curious like me.
So, in /classes/google_base.php at the start of the file, replace the entire function:
PHP Code:
function additional_images($products_image) {
if ($products_image != '') {
$images_array = array();
// prepare image name
$products_image_extension = substr($products_image, strrpos($products_image, '.'));
$products_image_base = str_replace($products_image_extension, '', $products_image);
// if in a subdirectory
if (strrpos($products_image, '/')) {
$products_image_match = substr($products_image, strrpos($products_image, '/')+1);
$products_image_match = str_replace($products_image_extension, '', $products_image_match) . '_';
$products_image_base = $products_image_match;
}
$products_image_directory = str_replace($products_image, '', substr($products_image, strrpos($products_image, '/')));
if ($products_image_directory != '') {
$products_image_directory = DIR_WS_IMAGES . str_replace($products_image_directory, '', $products_image) . "/";
} else {
$products_image_directory = DIR_WS_IMAGES;
}
// Check for additional matching images
$file_extension = $products_image_extension;
$products_image_match_array = array();
if ($dir = @dir($products_image_directory)) {
while ($file = $dir->read()) {
if (!is_dir($products_image_directory . $file)) {
if (substr($file, strrpos($file, '.')) == $file_extension) {
if(preg_match("/" . $products_image_base . "/i", $file) == 1) {
if ($file != $products_image) {
if ($products_image_base . str_replace($products_image_base, '', $file) == $file) {
$images_array[] = $this->google_base_image_url($file);
if (count($images_array) >= 8) break;
} else {
// no match
}
}
}
}
}
}
$dir->close();
}
return $images_array;
} else {
// default
return false;
}
}
with this
PHP Code:
function additional_images($products_image) {//eg. image_subdirectory/myimage.jpg
if ($products_image != '') {
$images_array = array();
// prepare image name
$products_image_extension = substr($products_image, strrpos($products_image, '.'));//get the extension
$products_image_base = str_replace($products_image_extension, '', $products_image);//strip extension to get the (optional path and) base filename
$products_image_directory = str_replace(substr($products_image, strrpos($products_image, '/')), '',$products_image);//get the subdirectory path
if (strrpos($products_image_base, '/')) {//is the image in a subdirectory?
$products_image_base = substr($products_image_base, strrpos($products_image, '/')+1).'_';//strip the path and add the underscore: see http://www.zen-cart.com/content.php?100
$products_image_directory = $products_image_directory.'/';
}
$products_image_match_array = array();
if ($dir = @dir(DIR_WS_IMAGES . $products_image_directory)) {
while ($file = $dir->read()) {
if (!is_dir(DIR_WS_IMAGES . $products_image_directory . $file)) {
if ($file != $products_image) {//ignore the primary image
if (preg_match("/" . $products_image_base . "/i", $file) == 1) {//does this filename contain the image base filename?
if ($products_image_base . str_replace($products_image_base, '', $file) == $file) {//does this filename start with image base_?
if (substr($file, strrpos($file, '.')) == $products_image_extension) {//does it have the same extension as the image base?
$file = $products_image_directory.$file;//add subdirectory path to filename for subsequent function call
if (GOOGLE_PRODUCTS_DEBUG == 'true') {echo 'google_base 36:additional image found $file='.$file.'<br />';}//debug
$images_array[] = $this->google_base_image_url($file);//this function needs image_subdirectory/myimage.jpg
if (count($images_array) >= 8) break;//only 10 images allowed by Google
} else {
// no match
}
}
}
}
}
}
$dir->close();
}
return $images_array;
} else {
// default
return false;
}
}
Re: Bug: Additional Images, 404 errors images googlebot
When I manually go in and create the file it is there, then I can download it and manually upload it to Google, but the part where it sends it to Google like it did when I first installed it seems to not work now... when I created the new feed it didn't show up in the list--only the first one I ever did is in the list--and my cron job seems to not be working either... if someone is willing to help me I'll post details (tell me what details you need)