-
Google Product Search Feeder II [Support Thread]
This is the support thread for the to-be-released shortly Google Product Search Feeder II (aka GPSF-2) plugin.
The plugin has been tested on zc156b through zc158a on PHP versions 7.0 through 8.2 and replaces
- Google Merchant Center Feeder: https://www.zen-cart.com/downloads.php?do=file&id=1375
- Google Froogle: https://www.zen-cart.com/downloads.php?do=file&id=319
I'll post the download link once it's available.
-
Re: Google Product Search Feeder II [Support Thread]
Thank you for making this available @lat9!
-
Re: Google Product Search Feeder II [Support Thread]
-
Re: Google Product Search Feeder II [Support Thread]
ZC v1.5.8a
PHP 8.0
GPSF v1.0.0
New install, not converting from a previous version.
Admin > Tools > Google Product Search Feeder II
Generate Feed gives 'Request failed, Gone (410).'
If I remove the currency_code portion from the GET request URL
HTML Code:
mydomain.co.uk/gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0¤cy_code=GBP&language_id=1
to
Code:
mydomain.co.uk/gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0&language_id=1
The feed is successfully generated, with the currency included together with the price:
HTML Code:
<g:price>2.75 GBP</g:price>
I gather that this is correct from Google's point of view and wonder if the '¤cy_code=GBP' in the GET request is actually needed.
I might have overthought all of this and there may exist a simple solution.
Edit: this is on a local dev server (WAMP) with self-signed SSL
-
Re: Google Product Search Feeder II [Support Thread]
Any logs generated? If the $_GET['currency_code'] is set, the processing looks for that in the currencies class.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
Any logs generated? If the $_GET['currency_code'] is set, the processing looks for that in the currencies class.
No logs, I'll delve deeper.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
simon1066
No logs, I'll delve deeper.
Some plonker(me) had added a currency redirect to 410 in .htaccess - when its contents were brought in from another site. All's working now.
-
Re: Google Product Search Feeder II [Support Thread]
These PHP extension classes are new to me, but as I wanted to create a custom product_type (I used 666 as a test) for category 66 I used this code in a new classes file (includes/classes/gpsf/gpsfKb.php):
PHP Code:
<?php
/**
*/
class gpsfKb extends gpsfBase
{
public function getProductsAttributes(string $products_id, array $product, array $categories_list, $cPath = '66', array $custom_fields): array
{
$extension_custom_fields = ['product_type' => '666',];
return $extension_custom_fields;
}
}
This works in that it adds the product_type to the feed,
Code:
<g:product_type>666</g:product_type>
<g:product_type><![CDATA[Gift Vouchers]]></g:product_type>
I would appreciate some guidance on the code changes needed to replace the already generated product_type rather than add a new one.
I think that this plugin's 'site-specific additions to a product feed' is going to be a stretch for most non-coders, like me, so hopefully this example will get the ball rolling.
-
Re: Google Product Search Feeder II [Support Thread]
Actually, what I've done hasn't worked as it adds the '666' to all products. Back to the drawing board.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
simon1066
These PHP extension classes are new to me, but as I wanted to create a custom product_type (I used 666 as a test) for category 66 I used this code in a new classes file (includes/classes/gpsf/gpsfKb.php):
PHP Code:
<?php
/**
*/
class gpsfKb extends gpsfBase
{
public function getProductsAttributes(string $products_id, array $product, array $categories_list, $cPath = '66', array $custom_fields): array
{
$extension_custom_fields = ['product_type' => '666',];
return $extension_custom_fields;
}
}
This works in that it adds the product_type to the feed,
Code:
<g:product_type>666</g:product_type>
<g:product_type><=!=[=C=D=A=T=A=[Gift Vouchers]=]=></g:product_type>
I would appreciate some guidance on the code changes needed to
replace the already generated product_type rather than add a new one.
I think that this plugin's '
site-specific additions to a product feed' is going to be a stretch for most non-coders, like me, so hopefully this example will get the ball rolling.
At this point, the gpsfFeedGenerator class doesn't acknowledge an override for the product_type, using either a fixed value or a selection from the product's master-category's name 'tree'. I've created a change-request (https://github.com/lat9/gpsf/issues/11) on the GPSF GitHub repository.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
simon1066
Actually, what I've done hasn't worked as it adds the '666' to all products. Back to the drawing board.
Right, you'd need to check the incoming $products_id value and possibly the $product/$categories_list/$cPath arrays to see if the current product 'qualifies' for the change.
For what I think you're trying to do:
PHP Code:
public function getProductsAttributes(string $products_id, array $product, array $categories_list, array $cPath, array $custom_fields): array
{
if (!in_array(66, $cPath)) {
return [];
}
$extension_custom_fields = ['product_type' => '666',];
return $extension_custom_fields;
}
That checks to see if categories-id 66 is present in the current product's category-tree, returning the 'product_type' override if so; otherwise, no override is supplied.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
Right, you'd need to check the incoming $products_id value and possibly the $product/$categories_list/$cPath arrays to see if the current product 'qualifies' for the change.
For what I think you're trying to do:
PHP Code:
public function getProductsAttributes(string $products_id, array $product, array $categories_list, array $cPath, array $custom_fields): array
{
if (!in_array(66, $cPath)) {
return [];
}
$extension_custom_fields = ['product_type' => '666',];
return $extension_custom_fields;
}
That checks to see if categories-id 66 is present in the current product's category-tree, returning the 'product_type' override if so; otherwise, no override is supplied.
That's great, thanks so much for the pointer/correction.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
At this point, the
gpsfFeedGenerator class doesn't acknowledge an override for the product_type, using either a fixed value or a selection from the product's master-category's name 'tree'. I've created a change-request (
https://github.com/lat9/gpsf/issues/11) on the GPSF GitHub repository.
Understood.
-
Re: Google Product Search Feeder II [Support Thread]
Cindy - Excited to try this one out! I just put it on our site but I'm seeing the following debug error on ALL the products:
Code:
Array
(
[20361] => # SELFIE by Simon R. Stefan & Alex Pandrea - Trick: title cannot be empty
[25185] => #Augmented (Gimmick and Online Instructions) by Luca Volpe and Renato Cotini - Trick: title cannot be empty
[21745] => #How by Magic from Holland and Ferry de Riemer - Trick: title cannot be empty
[35629] => $1.00 Prop Bill (1 bill/$1.00 value) - Realistic Fake Money: title cannot be empty
[35623] => $10.00 Prop Bill (1 bill/$10.00 value) - Realistic Fake Money: title cannot be empty
[24025] => $100 bill Silk 36 inch by Magic by Gosh - Trick: title cannot be empty
[12237] => $100 Bill Switch - Booklet + Gimmick by Royal Magic: title cannot be empty
.....
.....
Any idea what I should be looking at to resolve this?
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
Jeff_Mash
Cindy - Excited to try this one out! I just put it on our site but I'm seeing the following debug error on ALL the products:
Code:
Array
(
[20361] => # SELFIE by Simon R. Stefan & Alex Pandrea - Trick: title cannot be empty
[25185] => #Augmented (Gimmick and Online Instructions) by Luca Volpe and Renato Cotini - Trick: title cannot be empty
[21745] => #How by Magic from Holland and Ferry de Riemer - Trick: title cannot be empty
[35629] => $1.00 Prop Bill (1 bill/$1.00 value) - Realistic Fake Money: title cannot be empty
[35623] => $10.00 Prop Bill (1 bill/$10.00 value) - Realistic Fake Money: title cannot be empty
[24025] => $100 bill Silk 36 inch by Magic by Gosh - Trick: title cannot be empty
[12237] => $100 Bill Switch - Booklet + Gimmick by Royal Magic: title cannot be empty
.....
.....
Any idea what I should be looking at to resolve this?
Are you using products' meta-tag titles as the g:title? The value's either a product's name (which, for above isn't empty) or the metatags_title.
I might see the issue, darn it. /includes/classes/gpsfFeedGenerator.php, line 280, change from
if (GPSF_META_TITLE === 'true' && $product['metatags_title'] !== '') {
to
if (GPSF_META_TITLE === 'true' && !empty($product['metatags_title'])) {
... and let me know if that corrects the issue. That darn metatags_title can be null.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
Are you using products' meta-tag titles as the g:title? The value's either a product's name (which, for above isn't empty) or the metatags_title.
I might see the issue, darn it. /includes/classes/gpsfFeedGenerator.php, line 280, change from
if (GPSF_META_TITLE === 'true' && $product['metatags_title'] !== '') {
to
if (GPSF_META_TITLE === 'true' && !empty($product['metatags_title'])) {
... and let me know if that corrects the issue. That darn metatags_title can be null.
BINGO! That fixed the issue!
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
Jeff_Mash
BINGO! That fixed the issue!
Thanks for the validation; I'll get a GitHub issue logged.
GitHub issue: https://github.com/lat9/gpsf/issues/12
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
At this point, the
gpsfFeedGenerator class doesn't acknowledge an override for the product_type, using either a fixed value or a selection from the product's master-category's name 'tree'. I've created a change-request (
https://github.com/lat9/gpsf/issues/11) on the GPSF GitHub repository.
Your code examples were a great help in enabling me to set up category changes, brand addition and title changes through the use of extensions. However, I jumped the gun a bit in that I didn't fully understand the workings of Google Merchant Center before posting. I now cannot see a need to manipulate the product_type so don't spend time on the Github change, on my account.
-
Re: Google Product Search Feeder II [Support Thread]
hey guys, super happy to have found this module after realising mine is almost ready to fail me completely. Thankyou lat9 for updating this :)
I've just downloaded the zip file and wanted to quickly ask if there is anything that needed updating before i proceed? I assume the github version has been updated to resolve the few issues identified in the thread already?
-
Re: Google Product Search Feeder II [Support Thread]
Other than the meta-tags' title issue; all others are included in the v1.0.0 version.
-
Re: Google Product Search Feeder II [Support Thread]
perfect thankyou :) I can't wait to give it a whirl!
-
Re: Google Product Search Feeder II [Support Thread]
is this a solution for the sitemap mod no longer pinging Google?
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
dbltoe
is this a solution for the sitemap mod no longer pinging Google?
Huh? I don't understand how the product-search feed has anything to do with the sitemap xml plugin.
-
Re: Google Product Search Feeder II [Support Thread]
Didn't figure it did but asked just in case.
-
Re: Google Product Search Feeder II [Support Thread]
I really appreciate you saving this plugin, it's such a valuable thing.
I did find an issue with Google shopping. The feed generate weight like
1 lb
1 kg
However, google has this set in their dahs as a default only now. So I removed the call for the units from gpsfFeedGenerator.php to give the format google wants
<g:shipping_weight>1</g:shipping_weight>
Waiting to see if this solves my errors
https://support.google.com/merchants...12157544?hl=en
-
Re: Google Product Search Feeder II [Support Thread]
@mprough, that's funny, since the Google documentation still references the need for the unit-name on the shipping-weight attribute: https://support.google.com/merchants...162390460&rd=1
-
1 Attachment(s)
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
Yep, but that's not what's playing out. Now it seems to be set in the dash
Attachment 20469
-
Re: Google Product Search Feeder II [Support Thread]
Right, that's the shipping cost, not the weight.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
Right, that's the shipping cost, not the weight.
When the units are needed for shipping, it sets the Google shopping dash to that unit by default. Maybe, however, it wasn't the fact that the unit was there but the format
it was
<g:shipping_weight>1 lb</g:shipping_weight>
but the syntax in the docs (https://support.google.com/merchants/answer/6324455) show
<g:shipping_weight>1lb</g:shipping_weight>
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
mprough
When the units are needed for shipping, it sets the Google shopping dash to that unit by default. Maybe, however, it wasn't the fact that the unit was there but the format
it was
<g:shipping_weight>1 lb</g:shipping_weight>
but the syntax in the docs (
https://support.google.com/merchants/answer/6324455) show
<g:shipping_weight>1lb</g:shipping_weight>
The syntax may be an issue.
But here (https://support.google.com/merchants...12157544?hl=en) you see
Shipping costs are defined using the account-level shipping settings, or adding the shipping [shipping] attribute for each product.
I assume, when you use the shipping units to define the costs for your shipping venue then perhaps the lb, kg etc are not needed in the feed. Maybe, the unit needs to be switchable. I will keep an eye on these listings & let you know what happens.
-
Re: Google Product Search Feeder II [Support Thread]
If I was using zen 1.58 and was using numinix product fields to fetch the images correctly too run a product feed of mixed images (self hosted and off site) and then upgraded zencart and ditched numinix product fields, would this possibly be why my gpsf2 fully skips almost every off site image??
I can see the issues and cause but i'm unsure how to proceed or if id need to tweak gpsf2 also to get the results i need?
Here's my current train of thought...
I am thinking if i can successfully reintegrate npf into my 1.58a I could then change the following....
Code:
includes/classes/gpsfFeedGenerator.php
Line # 114 : $this->feedParameters['type'] = 'documents';
/includes/languages/english/extra_definitions/lang.document_general.php
too include my extra definitions...
Code:
Line #3 : 'BOX_HEADING_DOCUMENT_CATEGORIES' => 'Documents',
as follows....
Code:
/home/u554521074/domains/crazygamer.uk/public_html/includes/classes/gpsfFeedGenerator.php
Line # 114 : $this->feedParameters['type'] = 'documents', 'Documents';
/home/u554521074/domains/crazygamer.uk/public_html/includes/languages/english/extra_definitions/lang.document_general.php
which would allow me too ensure these details are passed too it in the codeboxes below?
Somehow I actually have the additional fields showing on my crazygamer site but not on my other site i posted about the other day.. ironically one site has what the other should have whilst the other is failing to presently load in the admin panel, it seems npf may be needed but possibly not installed but the remnants which add the product fields i need are still there or now standard fields included in a Zen cart setup since 1.58??
I notice I have gtin which was "v_gtin" on my old site which is no longer showing up on my crazygamer site so i assume my admin panel is down on my project because i have everything in place but the extra fields?? My upgrade seemed to have missed a few important tasks once everything seemed to be working ok. I also have a javascript reflow error on my home page and all seem to be related issues.
I have the following at present appearing on my live stores product listing page.... but i believe i originally had an images_url field also
Code:
Products Shipping Weight:
0
Category Code:
Condition:
Event Date:
Event Location:
Event Name:
Event Time:
Ticket Type:
Sort Order:
but i believe i originally had an images_url field which would allow the older gsf to merrily include that info. I'm not entirely sure how i still have some of the extra fields as i did not do the upgrade but if i can find out i resolve all my issues possibly?
-
Re: Google Product Search Feeder II [Support Thread]
https://freeimage.host/i/JEkhUOP ok, i've figured out the issue i am having solely revolves around this setting to pre-append images with a url. I unfortunately only need it for one category as the rest are hosted locally. Is there a quick fix to this, say a line i can edit to tell it only to apply that setting to the one category otherwise to treat it as a store image. I am aware this is kind of site specific at present but i don't think I will be the only store owner that has a mixture of urls and images in the image field??
My image urls are fed direct to the image field for the computing section and it only accepts those items if i prepend but then declines all the rest. It is possibly the one thing that is stopping me saying the upgrade to 1.58 was a success of sorts.
-
Re: Google Product Search Feeder II [Support Thread]
v1.0.1 of GPSF-2 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2379
This is a BUGFIX release; for a full list of changes, see this link: https://github.com/lat9/gpsf/issues?...stone%3Av1.0.1
-
3 Attachment(s)
Re: Google Product Search Feeder II [Support Thread]
Hi everyone. I'm new here and don't know much about working on websites. I started my store 2 years ago and I've been slowly learning. I just added the Google Product Search Feeder to my store "Cedar Grove Herbs" yesterday afternoon @ https://www.cedargroveherbs.com and get a request failed error (404) when I try to generate a feed. Can someone help? I'm using zencart v1.5.8
Attachment 20490
I looked up the code and see that it's a server error, and I actually noticed this problem hours earlier because I recently had a new theme installed on a subdirectory www.cedargroveherbs.com/new and I tried to install Easy Populate 4.0.36.ZC. yesterday. After I installed most of the files, but before I added the .htaccess file, I checked my admin and saw it was in the tools category and configuration category, and then I logged out to add the .htaccess file and when I logged back in I saw the 404 error when I clicked on easy populate. I cleared my cache and my admin login page and admin page looked like this:
Attachment 20491
Attachment 20492
It sounds like I have alot going on, but slowly but surely I'm sure this will get corrected. I deleted the easy populate files so I can try again after I get my login and admin page back to normal. Both websites look normal. I put the old .htaccess files back in my public_html folders. As I said, I'm new but I'm sure someone here can help me get my admin page back to normal on my subdirectory website and help me get my google Product Search feeder working right. Thanks for listening!
Btw - I did contact my server host, justhost.com and they had me restart my router and then they tinkered and said they fixed the 404 error and I should have better results in 2 hours. Well, that time has come and gone and I see no change. So I guess I need confirmation from you guys that first I need to tackle the server problem, because that's the main problem, and then I can start dealing with the other issues - like getting my admin login and admin page back to looking normal.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
Fenomenal7
Hi everyone. I'm new here and don't know much about working on websites. I started my store 2 years ago and I've been slowly learning. I just added the Google Product Search Feeder to my store "Cedar Grove Herbs" yesterday afternoon @
https://www.cedargroveherbs.com and get a request failed error (404) when I try to generate a feed. Can someone help? I'm using zencart v1.5.8
Attachment 20490
I looked up the code and see that it's a server error, and I actually noticed this problem hours earlier because I recently had a new theme installed on a subdirectory
www.cedargroveherbs.com/new and I tried to install Easy Populate 4.0.36.ZC. yesterday. After I installed most of the files, but before I added the .htaccess file, I checked my admin and saw it was in the tools category and configuration category, and then I logged out to add the .htaccess file and when I logged back in I saw the 404 error when I clicked on easy populate. I cleared my cache and my admin login page and admin page looked like this:
Attachment 20491
Attachment 20492
It sounds like I have alot going on, but slowly but surely I'm sure this will get corrected. I deleted the easy populate files so I can try again after I get my login and admin page back to normal. Both websites look normal. I put the old .htaccess files back in my public_html folders. As I said, I'm new but I'm sure someone here can help me get my admin page back to normal on my subdirectory website and help me get my google Product Search feeder working right. Thanks for listening!
Btw - I did contact my server host, justhost.com and they had me restart my router and then they tinkered and said they fixed the 404 error and I should have better results in 2 hours. Well, that time has come and gone and I see no change. So I guess I need confirmation from you guys that first I need to tackle the server problem, because that's the main problem, and then I can start dealing with the other issues - like getting my admin login and admin page back to looking normal.
I think it is most likely an installation mistake on the /new
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
mprough
I think it is most likely an installation mistake on the /new
Maybe. I'm just confused because the 404 on the /new didn't show up until I cleared my cache on my laptop. After that, my admin login screen and admin page looked as I showed in my screenshot. I deleted the easypopulate files from the /new after that, and my admin login screen and admin page still looked as I showed in the screenshot so I figured it was a server problem. And the 404 when I try to generate a google product feed on my root store. Thank you for responding!
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
Fenomenal7
Maybe. I'm just confused because the 404 on the /new didn't show up until I cleared my cache on my laptop. After that, my admin login screen and admin page looked as I showed in my screenshot. I deleted the easypopulate files from the /new after that, and my admin login screen and admin page still looked as I showed in the screenshot so I figured it was a server problem. And the 404 when I try to generate a google product feed on my root store. Thank you for responding!
Because when you cleared your cache it cleared your session. I easy populate installed on the live site?
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
mprough
Because when you cleared your cache it cleared your session. I easy populate installed on the live site?
Yes it it - and it works just fine on the live site. Just used it yesterday.
-
Re: Google Product Search Feeder II [Support Thread]
I didn't install it on the live site - someone else did. I'm trying my hand at working on the /new so I installed easy pop myself on there. It did appear on the tools and configurations after I installed. I went to look before adding the .htaccess file. After I added the .htaccess file for easypop that's when things changed. I deleted all files and added the .htaccess file that was there previously when all looked right and yet my admin login and admin page still looks as show. :(
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
Fenomenal7
Hi everyone. I'm new here and don't know much about working on websites. I started my store 2 years ago and I've been slowly learning. I just added the Google Product Search Feeder to my store "Cedar Grove Herbs" yesterday afternoon @
https://www.cedargroveherbs.com and get a request failed error (404) when I try to generate a feed. Can someone help? I'm using zencart v1.5.8
Attachment 20490
I'm guessing that the 404 error (File Not Found) is because you didn't copy the root-directory file gpsf_main_controller.php. That file should reside in the same directory as the site's ipn_main_handler.php file.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
I'm guessing that the 404 error (File Not Found) is because you didn't copy the root-directory file gpsf_main_controller.php. That file should reside in the same directory as the site's ipn_main_handler.php file.
Yes!!! That worked! Thank you so much :)
Now I will go to a thread for admin log in and admin page to get that issue fixed on my /new subdirectory.
-
Re: Google Product Search Feeder II [Support Thread]
Thanks for this. I'm all uploaded, it's all visible in my admin. However, I'm totally confused about the cron job bit... I have no idea what it means, or where I'm supposed to paste it. Googling has confused me more, so some guidance would be helpful.
I'm on 1.5.8, and I use CPanel for my server. :-)
-
Re: Google Product Search Feeder II [Support Thread]
>I'm totally confused about the cron job bit
You configure Merchant Center to fetch the file you have created at regular intervals.
To auto-create that file at regular intervals you add a Cron job on your server which is just a command that runs at some specified time. It will be in your cPanel options.
-
Re: Google Product Search Feeder II [Support Thread]
v1.0.2 of Google Product Search Feeder II is available for download: https://www.zen-cart.com/downloads.php?do=file&id=2379
This release contains changes associated with these GitHub issues:
#14: Correct PHP Fatal error when a product's availability date is in the future.
#37: Correct performance issue on sites with a large number of categories.
-
1 Attachment(s)
Re: Google Product Search Feeder II [Support Thread]
Greetings!
I would like to remove the shipping label field source from my GPSF because it's stopping me from being able to utilize the shipping I have set up in my google merchant account, as I want them to show the shipping amount from USPS from their side. Is it possible for me to remove the code for that?
If not, how do I set up my GPSF to show the shipping amount reflected on my website from the USPS shipping module? (www.cedargroveherbs.com) because when I select shipping method by weight and say for instance the product weights .4 lbs, it will say shipping is like 4 cents on google merchant.
Attachment 20575
-
Re: Google Product Search Feeder II [Support Thread]
-
Re: Google Product Search Feeder II [Support Thread]
Seeing the following errors being logged using gpsf v1.02 and ZC 2.0.0
[20-May-2024 19:32:52 Europe/London] Request URI: /gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0¤cy_code=GBP&l anguage=en, IP address: xx.xxx.xxx.xx, Language id 1
#0 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(717): zen_debug_error_handler()
#1 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(291): gpsfFeedGenerator->getCategoryInfo()
#2 /home/nclocks/public_html/gpsf_main_controller.php(167): gpsfFeedGenerator->generateProductsFeed()
--> PHP Warning: Undefined array key 0 in /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php on line 717.
[20-May-2024 19:32:52 Europe/London] PHP Fatal error: Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, null given in /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php:717
Stack trace:
#0 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(717): array_reverse(NULL)
#1 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(291): gpsfFeedGenerator->getCategoryInfo('1049')
#2 /home/nclocks/public_html/gpsf_main_controller.php(167): gpsfFeedGenerator->generateProductsFeed(Resource id #496, '', '')
#3 {main}
thrown in /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php on line 717
[20-May-2024 19:32:52 Europe/London] Request URI: /gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0¤cy_code=GBP&l anguage=en, IP address: xx.xxx.xxx.xx
--> PHP Fatal error: Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, null given in /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php:717
Stack trace:
#0 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(717): array_reverse(NULL)
#1 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(291): gpsfFeedGenerator->getCategoryInfo('1049')
#2 /home/nclocks/public_html/gpsf_main_controller.php(167): gpsfFeedGenerator->generateProductsFeed(Resource id #496, '', '')
#3 {main}
thrown in /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php on line 717.
[20-May-2024 19:32:52 Europe/London] Request URI: /gpsf_main_controller.php?key=&feed=fy_un_tp&limit=0&offset=0¤cy_code=GBP&l anguage=en, IP address: xx.xxx.xxx.xx
--> PHP Fatal error: Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, null given in /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php:717
Stack trace:
#0 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(717): array_reverse(NULL)
#1 /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php(291): gpsfFeedGenerator->getCategoryInfo('1049')
#2 /home/nclocks/public_html/gpsf_main_controller.php(167): gpsfFeedGenerator->generateProductsFeed(Resource id #496, '', '')
#3 {main}
thrown in /home/nclocks/public_html/includes/classes/gpsfFeedGenerator.php on line 717.
Is this a known issue?
-
Re: Google Product Search Feeder II [Support Thread]
Haven't seen that before, but it sure "sounds like" the master_categories_id of 1049 doesn't exist in the categories table.
-
Re: Google Product Search Feeder II [Support Thread]
Oddly, there is no category id 1049 in the database, but there is a product with master_categories_id set as 1049.
I have confirmed that ZC admin reports master_categories_id 1049 as invalid.
Do you have any idea why ZC 1.5.7c never picked this up during feed generation but ZC 2.0.0 does?
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
strelitzia
Oddly, there is no category id 1049 in the database, but there is a product with master_categories_id set as 1049.
I have confirmed that ZC admin reports master_categories_id 1049 as invalid.
Do you have any idea why ZC 1.5.7c never picked this up during feed generation but ZC 2.0.0 does?
No clue, but you can backtrace the code prior to includes/classes/gpsfFeedGenerator.php(717) to see the function that's called to determine a product's category tree and compare between zc157c and zc200 to see what change(s) might have been made.
-
Re: Google Product Search Feeder II [Support Thread]
v1.0.3 of Google Product Search Feeder II is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2379
This release corrects issue #39 (Correct PHP Warnings when a product is missing some of its 'joined' database records)
-
Re: Google Product Search Feeder II [Support Thread]
v1.0.4 of Google Product Search Feed II is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2379
This release contains changes associated with the following GitHub issues:
#40: Multiple GPSF extensions result in a PHP Fatal error.
#41: getProductsTitle extension method is never called.
#42: zc_plugins can't provide GPSF extensions.
-
Re: Google Product Search Feeder II [Support Thread]
thanks so much for updating this! I did one of the updates years ago and know well the issues!
But a question. Turns out google is a bit picky about weight and it requires a shipping weight. Not a product weight. The mod lists it as product weight. I've asked for clarification to see if they want both product and shipping weights. I hope not.
So it looks like this line in the gpsfFeedGenerator.php file:
PHP Code:
if (GPSF_WEIGHT === 'true' && $product['products_weight'] > 0) {
$this->xmlWriter->writeElement('g:product_weight', $product['products_weight'] . ' ' . GPSF_UNITS);
}
If you change the g:product_weight to g:shipping_weight, that will fix the feed assuming they don't have to have both weights. If it does, duplicating that line with the change in one and not the other will suffice.
My main purpose here to find out who else has run into this and and they have fixed it to google's satisfaction.
-
Re: Google Product Search Feeder II [Support Thread]
I just changed g:product_weight to g:shipping_weight and it seems to have been happy
-
Re: Google Product Search Feeder II [Support Thread]
From the Google documentation: https://support.google.com/merchants...98720655404-NA
... it looks like the g:shipping_weight is needed if you're specifying the shipping costs via the Merchant Center.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
See this GitHub issue for change-tracking: https://github.com/lat9/gpsf/issues/45
-
Re: Google Product Search Feeder II [Support Thread]
i seem to have ran into a hiccup, currently using v1.00 and all was running fine until a few days ago when i got a google protection from lost products alert, seems out of the blue my gpsf has started an arbitrary limit of 2725 maximum products. Symptom is max products field set to 0 for unlimited, and i get the following displayed on my gpsf2 feed generation page upon visiting it...
Code:
Max memory (memory_limit):4800M
Maximum input time:360
Max execution time (in seconds):12000
Maximum number of products in feed:2,725
i have tried to upgrade to v 1.3 but that resulted in a database and file restore due to an undefined GPSF_LANGUAGE which i tried to define as en only if not already defined to get the error that it was already defined :/
today i find that i have had another error message too for an undefined GPSF_LANGUAGE and had to define it as 'en' to be able to generate a feed oddly too...
Code:
[21-Nov-2024 00:00:03 UTC] PHP Fatal error: Uncaught Error: Undefined constant "GPSF_LANGUAGE" in /gpsf_main_controller.php:76
Stack trace:
#0 {main}
thrown in /gpsf_main_controller.php on line 76
[21-Nov-2024 00:00:03 UTC] Request URI: /gpsf_main_controller.php?feed=fy_un_tp&key=keyremoved, IP address: removed
--> PHP Fatal error: Uncaught Error: Undefined constant "GPSF_LANGUAGE" in /gpsf_main_controller.php:76
Stack trace:
#0 {main}
thrown in /gpsf_main_controller.php on line 76.
my small edit to skip an image for providing url if already a url is working fine still, otherwise it is a standard set of files. Anything that would cause the limit to kick in outside of the max product setting perhaps? i thought along the lines of file size limit which gzip did not resolve (if it was the cause) and also ruled out a hiccup with perhaps pc parts imported via ep4 having similar but not identical names by disabling the "remove duplicates from feed" option, but it still stayed at the same figure of items
-
Re: Google Product Search Feeder II [Support Thread]
GPSF_LANGUAGE is removed when you upgrade to a current version of GPSF. It appears that you forgot to copy the upgraded version of /gpsf_main_controller.php -- that goes into the root of your site's file system.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
lat9
GPSF_LANGUAGE is removed when you upgrade to a current version of GPSF. It appears that you forgot to copy the upgraded version of /gpsf_main_controller.php -- that goes into the root of your site's file system.
I thought I had missed a file but after triple checking I had no choice but to revert to last know good setup. Still limited at 2725 feed items and just discovered that Google is seeing alot of my urls as soft 404's:yuck:
-
2 Attachment(s)
Re: Google Product Search Feeder II [Support Thread]
Hello All.
I installed the latest version on zc 1.5.8 on PHP Version: 8.2.26. Everything seems to be working just fine, but true to form... google has a problem with the data.
In the xml feed file each product's weight and shipping weight are represented accurately. This data also appears on the product details page in google merchant center. But on the dashboard it's showing that all 100 products are missing the shipping_weight.
Attachment 20820
Attachment 20821
Every item in the feed file contains both of the following
<g: product_weight>3 lb</g: product_weight>
<g:shipping_weight>3 lb</g:shipping_weight>
I am seeing <![CDATA in the g:title, g:brand, g: product_type and g:description. Not sure if that should be there or not.
Thanks a bunch,
John
-
Re: Google Product Search Feeder II [Support Thread]
I'm not a user of the Google Merchant Center's hosted console, so can't help there. If the data's being sent but Google isn't happy, I'll suggest doing a web-search for the symptom. If you've run across it, it's likely that someone else has too.
-
Re: Google Product Search Feeder II [Support Thread]
Ok. So the issue is resolved. A user in the google merchant center forum caught this....
shipping weight is not a sub attribute of shipping.
Instead of:
<g:shipping>
<g:country>US</g:country>
<g:price>9.95 USD</g:price>
<g:shipping_weight>
it should be:
<g:shipping>
<g:country>US</g:country>
<g:price>9.95 USD</g:price>
</g:shipping>
<g:shipping_weight>3 lb</g:shipping_weight>
So I move a line in the classes/gpsFeedGenerator.php
Moved
if (GPSF_WEIGHT === 'true' && $product['products_weight'] > 0) {
$this->xmlWriter->writeElement('g:shipping_weight', $product['products_weight'] . ' ' . GPSF_UNITS);
}
to just after
$this->xmlWriter->endElement(); //- END g:shipping
All product that had been "missing shipping weight" are now no longer missing shipping weight.
Thank you,
John
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
bumba000
Ok. So the issue is resolved. A user in the google merchant center forum caught this....
shipping weight is not a sub attribute of shipping.
Instead of:
<g:shipping>
<g:country>US</g:country>
<g:price>9.95 USD</g:price>
<g:shipping_weight>
it should be:
<g:shipping>
<g:country>US</g:country>
<g:price>9.95 USD</g:price>
</g:shipping>
<g:shipping_weight>3 lb</g:shipping_weight>
So I move a line in the classes/gpsFeedGenerator.php
Moved
if (GPSF_WEIGHT === 'true' && $product['products_weight'] > 0) {
$this->xmlWriter->writeElement('g:shipping_weight', $product['products_weight'] . ' ' . GPSF_UNITS);
}
to just after
$this->xmlWriter->endElement(); //- END g:shipping
All product that had been "missing shipping weight" are now no longer missing shipping weight.
Thank you,
John
Thanks for the investigation and correction; I'll get that fixed in v1.0.5. Here's the GitHub issue for tracking: https://github.com/lat9/gpsf/issues/46
-
Re: Google Product Search Feeder II [Support Thread]
Hey Lat9,
No problem. I really didn't want anything to do with uploading products to google but ... I had been doing some price checking in google serps and found they have all of our products (organic results) with a 7-day return period. So I set out on a mission to correct this and found the only way is to updated shipping and returns in merchant center even if you don't already have a merchant center account. But the only way to change your sites return policy is to have a product feed loaded there.
If you think something else is causing the 7-day return period showing in organic google serps please let me know. I have no structured data.. nothing other than now the merchant upload.
Thanks again,
John
-
Re: Google Product Search Feeder II [Support Thread]
Just to follow up. Rearranging a bit of code worked to resolve the "missing shipping weight" issue, and setting shipping and return policy in google merchant center did reflect in the organic serps.
-
Re: Google Product Search Feeder II [Support Thread]
I finally managed to get to zencart 2.10 , I noticed out of 6500 items, it gives a 500 error but no log in folder. I can do 3000 . I Did increase resources on server, and it reflected on the page what I had set. Though on v1.58 version it could do a full batch. As an aside, I do notice when I go store manager and clear logs, then optimise databes, it does a 500 error too. But never done that on prior versions. I thought maybe related as nobody has chimed in about it on this thread about it? I am on same server as with 1.58a. Thanks in advance.
-
Re: Google Product Search Feeder II [Support Thread]
Sorry in advance if it seems spammy.
But what is the advantage in comparison to the successor "Merchant Center Next" for which you don't need to do anything?
No feeds, no cron jobs, no server issues - just a super easy setup at merchant center next.
Google crawls itself daily which works pretty well.
-
Re: Google Product Search Feeder II [Support Thread]
Quote:
Originally Posted by
Shop Suey
Sorry in advance if it seems spammy.
But what is the advantage in comparison to the successor "Merchant Center Next" for which you don't need to do anything?
No feeds, no cron jobs, no server issues - just a super easy setup at merchant center next.
Google crawls itself daily which works pretty well.
I'm not a Merchant Center user, so I've got no access to view the options of the Merchant Center Next tool.
One thing that GPSF2 provides is a means to restrict the products a site publishes to its product-search-feed.
-
Re: Google Product Search Feeder II [Support Thread]
One thing i noticed for quite some time is that Google "finds" additional products on my behalf on my merchant centre. When in merchant centre on the feeds page it shows a products uploaded by me count of a few thousand and an additional products found by Google count of around 340 items as a clearly displayed metric. Maybe they have subtly upgraded the merchant centre accounts and started auto crawling regardless?