Magento Forum

Google Shopping broke yesterday
 
Greybeard
Jr. Member
 
Total Posts:  11
Joined:  2011-07-07
 

The Google Shopping API has been working fine for the last 3 months.

Currently is fine with deleting or refreshing item.

But has stopped working this week for adding new items.

It starts the process, and 1 product gets to Google, but this isnot reflected within Magento with the product not listed ion the list of items on Google, and I get the following error.

Fatal error: Call to a member function getText() on a non-object in /app/code/core/Mage/GoogleShopping/Model/Service/Item.php on line 64

Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
relic
Jr. Member
 
Total Posts:  1
Joined:  2011-09-28
 

Hi,

One of our clients had the same issue, yesterday as well.
But it occured when product synced with Shopping API was edited.
From what we found, it seems google stopped returning `published` from it’s PUT request (not sure about post).

We fixed in by setting $published to date(), if $entry->getPublished() return null in that file.

Hope that helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tommorris
Jr. Member
 
Total Posts:  3
Joined:  2010-11-28
 

Thank you relic.  Thank pointed me in the right direction.  Your fix also addresses errors like:

Warning: include(Mage/GoogleShopping/Model/Attribute/Brand.php)

or any other models that seem to be missing in the Attribute folder (but aren\’t). 

Quick fix was to change this:

$published = $this->convertContentDateToTimestamp($entry->getPublished()->getText());

To:

$published = date();

on line 64 of app/code/core/Mage/GoogleShopping/Model/Service/Item.php

Obviously I don\’t recommend changing core code but in this case I am hoping the next release of the Google Content API overwrites my changes with a real fix smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
askthemissus
Jr. Member
 
Total Posts:  3
Joined:  2011-05-26
 

Thanks tommorris,

this worked for me! The only thing i did differently was make a local copy of item.php rather than editing the core file.

http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/how_to_create_a_local_copy_of_app_code_core_mage

 
Magento Community Magento Community
Magento Community
Magento Community
 
ElectricAvenue
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2012-02-01
 

worked for me!

Thanks a lot!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Xtreme Outdoors
Jr. Member
 
Total Posts:  4
Joined:  2012-07-09
United Kingdom
 

Thanks for the above fix info tommorris.

I have exactly the same issue, but when I amended the code on line 64 of item.php to $published = date(); the problem persisted. The log still shows an error message after applying the change, however it is slightly different - see below:

Error in httpd error_log before applying change:

PHP Fatal error:  Call to a member function getText() on a non-object in /var/www/html/app/code/core/Mage/GoogleShopping/Model/Service/Item.php on line 64

Error in httpd error_log after applying above mentioned change:

PHP Fatal error:  Call to a member function setStoreId() on a non-object in /var/www/html/app/code/core/Mage/GoogleShopping/Model/Item.php on line 65

If anybody has any thoughts on the above, it would be hugely appreciated as Google Shopping going down on a live site is a real pain!

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
copperlab
Jr. Member
 
Total Posts:  19
Joined:  2009-02-05
 

Thanks for this fix.

I am having another problem which I believe is related.  When the extension broke I kept of trying to add 1 product to the feed.  It would hang in magento and show the item with availability: out of stock on google.com/merchants.  Now that the extension is fixed I am still seeing that first item as out of stock.  I have tried deleting it and adding to the feed multiple times.  But always shows out of stock.  Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Xtreme Outdoors
Jr. Member
 
Total Posts:  4
Joined:  2012-07-09
United Kingdom
 

UPDATE: I have managed to get the fix recommended by tommorris and relic applied and my Google Shopping API is now working again grin

My first attempt failed, but this was nothing to do with the fix. To get this fix working I did the following:

- Cleanly uninstalled the Google Shopping Extension.

- Reinstalled the Google shopping extension (If you are on Magento 1.6, do not install version 1.7 of the Google Shopping extension. Although it will let you install it and the extension page kind of infers it is compatible with Magento 1.6, it is definitely not. This was another problem I ran into along the way).

- Made the change recommended above by setting ‘$published = date();’ in Item.php.

- Flushed the Magento cache.

Thanks a lot to tommorris and relic and I hope the above information is helpful.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mauricioprado00
Member
 
Avatar
Total Posts:  63
Joined:  2009-03-11
Argentina
 

I think this recommendation it’s wrong.

you should not do this:

$published date();

because you will get this error:

PHP Warning:  date() expects at least 1 parameter

Instead, you should provide a date that fits the return format of convertContentDateToTimestamp, as you can see in the documentation:

/**
     * Convert Google Content date format to unix timestamp
     * Ex. 2008-12-08T16:57:23Z -> 2008-12-08 16:57:23
     *
     * @param string Google Content datetime
     * @return int
     */

the date should be called this way:

$published date('Y-m-d H:i:s');
 
Magento Community Magento Community
Magento Community
Magento Community
 
BigDune
Jr. Member
 
Total Posts:  22
Joined:  2010-04-21
 

Anyone having trouble with Magento 1.6 and the Google Content API extension, we’ve written an article on a comprehensive solution here:

Magento 1.6 and Google Shopping Problems

Hope it helps some of you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
buenagoich59
Jr. Member
 
Total Posts:  1
Joined:  2013-09-17
 

Hi,

I use Advanced Product Feeds http://mirasvit.com/magento-extensions/advanced-product-feeds-generator.html

This extension allows the flexibility to manage data for the search and shopping engines. This is very handy.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Adiln
Jr. Member
 
Total Posts:  14
Joined:  2012-03-20
 

After following your instructions, I was finally able to send both Configurable Products and Simple Associated Products to Google Shopping. However I am now running into another issue. The Configurable Product shows up as “out of stock” on google.

I’ve made sure to add both attributes “item_group_id” and “availability” to magento and them out to the Google Content Attribute “Custom Attribute, No Mapping”, since the drop down menu does not show those attributes.

So in Google, The Simple Products show “In Stock” while the Configurable Ones show “Out of Stock”.

Please help
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
GoMageTeam
Guru
 
Avatar
Total Posts:  356
Joined:  2013-01-13
Warsaw, Poland
 

Hello,

GoMage Feed Pro - Feed Manager for Magento allows you to provide information about products from your online store to search engines like Google Product Search (Google Base), Yahoo! Store, eBay, Amazon.com, ChannelAdvisor and other sites that collect and show information about your products.
You can find out more information here: GoMage Feed Pro

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top