Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to Google Content #4

Closed
jitendrasaini opened this issue Feb 17, 2015 · 17 comments
Closed

Add to Google Content #4

jitendrasaini opened this issue Feb 17, 2015 · 17 comments

Comments

@jitendrasaini
Copy link

Hi,

When i go to catalog > Google Content API v2 > manage Items, choose some items from the "Available Products", select "Add to Google Content" from Actions dropdown and click "Submit", then the Submit button just faded with some processing icon and after few seconds, the page get refreshed but the chosen items have not added to the "Google Content Items".

Please advise!

@schnere
Copy link
Contributor

schnere commented Feb 17, 2015

Hi,

after the page reloads you should see a message like "Latest Message: Product synchronization with Google Shopping completed" under the menu.
In your case I would expect "Errors happened while adding products to Google Shopping." .
Click on "Go to notifications" on the right side to see the error details.

@jitendrasaini
Copy link
Author

Yes, i got this notification -

Errors happened while adding products to Google Shopping.

A required attribute is missing. Internal reason: Insufficient product identifiers: Missing two out of three attributes [GTIN, brand, mpn] See 'identifier_exists' for product 'JJ Cole Bundle Me Hat - Cream' (in 'Default Store View' store)

@schnere
Copy link
Contributor

schnere commented Feb 17, 2015

Okay, I'd suggest to set the following mapping for the attribute set:

Brand = Manufacturer (or add a product attribute for brand)
MPN = SKU
GTIN = EAN or GTIN (you might have to add a product attribute for EAN/GTIN)

Add at least two of them to be able to successfully sync.
The message is from Google, beacause ist mandatory to have two out of three of them...

@jitendrasaini
Copy link
Author

OK..it means that the product i am choosing does not have two out of three attributes (Brand, MPN, GTIN)

But if i select the product which has the two out of the above three attributes, the page get refreshed with a message "Google Shopping synchronization is running" and after a second, this message got removed but the selected product is still there in "Available Products".

Please advise!

@schnere
Copy link
Contributor

schnere commented Feb 17, 2015

Then you might have another error in the notifications?

@jitendrasaini
Copy link
Author

I am not getting any error in the notifications. What may be the reason?

@schnere
Copy link
Contributor

schnere commented Feb 17, 2015

Are there any errors in var/log/system.log ?

@jitendrasaini
Copy link
Author

Yes, I can see some warnings there in var/log/system.log

2015-02-17T09:34:46+00:00 ERR (3): Warning: include(Google/Config.php) [function.include]: failed to open stream: No such file or directory in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include(Google/Config.php) [function.include]: failed to open stream: No such file or directory in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include() [function.include]: Failed opening 'Google/Config.php' for inclusion (include_path='XXXXXX/app/code/local:XXXXXX/app/code/community:XXXXXX/app/code/core:XXXXXX/lib:.:/usr/lib/php:/usr/local/lib/php') in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include(Google/Auth/OAuth2.php) [function.include]: failed to open stream: No such file or directory in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include(Google/Auth/OAuth2.php) [function.include]: failed to open stream: No such file or directory in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include() [function.include]: Failed opening 'Google/Auth/OAuth2.php' for inclusion (include_path='XXXXXX/app/code/local:XXXXXX/app/code/community:XXXXXX/app/code/core:XXXXXX/lib:.:/usr/lib/php:/usr/local/lib/php') in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include(Google/Auth/Abstract.php) [function.include]: failed to open stream: No such file or directory in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include(Google/Auth/Abstract.php) [function.include]: failed to open stream: No such file or directory in XXXXXX/lib/Varien/Autoload.php on line 94

2015-02-17T09:34:46+00:00 ERR (3): Warning: include() [function.include]: Failed opening 'Google/Auth/Abstract.php' for inclusion (include_path='XXXXXX/app/code/local:XXXXXX/app/code/community:XXXXXX/app/code/core:XXXXXX/lib:.:/usr/lib/php:/usr/local/lib/php') in XXXXXX/lib/Varien/Autoload.php on line 94

@schnere
Copy link
Contributor

schnere commented Feb 17, 2015

These warnings can be ignored.
You have set a mapping for the product type you tried to add to Google Content?
Did you check if the item is actually listed in Google Merchant Center?

@jitendrasaini
Copy link
Author

No, actually i just realized that the error which i discussed above was generated by the old google API v1. Sorry for that !!

This was the error -
A required attribute is missing. Internal reason: Insufficient product identifiers: Missing two out of three attributes [GTIN, brand, mpn] See 'identifier_exists' for product 'JJ Cole Bundle Me Hat - Cream' (in 'Default Store View' store)

But, In case of using Google Content API v2, no notifications are generating. If i get the above error using API v2, i will set the mapping for the product. But in current situation, when i select any of the product, i am not getting any notification/error and the product is still available in "Available Products".

Please advice!

@schnere
Copy link
Contributor

schnere commented Feb 17, 2015

You might have got an uncaught exception. This would cause the flag to not unlock.
If the flag is locked you would be redirected to Manage Items page without a message.

To unlock the Flag temporary add $flag->unlock(); after line 110 in app/code/community/BlueVisionTec/GoogleShoppingApi/controllers/Adminhtml/ItemsController.php:

        $flag = $this->_getFlag();
        $flag->unlock(); // remove this after fixing your error...
        if ($flag->isLocked()) {
            return;
        }

@jitendrasaini
Copy link
Author

I added this code and tried again. I got the following notification this time.

Errors happened while adding products to Google Shopping.

The product "Tiny Love Pack and Play Take Along Mobile " hasn't been added to Google Content.
Error calling POST https://www.googleapis.com/content/v2/102158216/products: (400) [item] auth/frontend/not_claimed for AffiliateNetwork,DisplayAds,Shopping,ShoppingApi: Website URL not claimed

Do i need to set Website URL some where in Google Merchant Center? If yes, then please guide.

@schnere
Copy link
Contributor

schnere commented Feb 17, 2015

Yes, you have to claim it in Merchant Center -> Settings -> General -> About your business

There you have to set the website like http://www.example.com . Then the website must be verified with one of the given options. After that you will be able to claim it.

If you have more than one Domain you will have to either create multiple merchant accounts or ask for a Multi Merchant account...

@jitendrasaini
Copy link
Author

OK.. i understand. Let me explain my case more clearly. I was working on the dev environment of my website like http://mywebsite.com/dev/ and have used the google API credentials generated by my test google account. That is why i was getting the "Website URL not claimed" error.

But on the live site http://mywebsite.com/, i used the credentials generated by my client's google account and when we are trying to add products to google content, we are getting the following error.

Errors happened while adding products to Google Shopping.
The product "Product ABC" hasn't been added to Google Content.
Error calling POST https://www.googleapis.com/content/v2/XXXXXX/products: (401) User cannot access account XXXXXX

Please advice!

@jitendrasaini
Copy link
Author

Hi,

I am having issues with the configurable products. When i try to add configurable products to Google Content, i am getting the following error -

The product "Product ABC" hasn't been added to Google Content.
Error calling POST https://www.googleapis.com/content/v2/XXXXXXXX/products: (400) [identifier_exists] validation/missing_required for Shopping,ShoppingApi: Insufficient product identifiers: Missing two out of three attributes [GTIN, brand, mpn]

I have already added SKU and Manufacturer for this product and have already done the mapping like below -

SKU - MPN
Manufacturer - Brand

Please advice! Thanks in advance.

@schnere
Copy link
Contributor

schnere commented Feb 24, 2015

Hi,

is the Manufacturer also set in the configurable product?

@jitendrasaini
Copy link
Author

Yes, it seems that the problem was related with the manufacturer field for configurable products.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants