Jump to content

[MODULE] Google Base new BETA version


Paul C
 Share

Recommended Posts

Hi Paul.

Just tried the latest versions (both master and beta) and got a simple

Failed to load category id= 0

when trying to generate the feed.

 

A bit of peering at the source and a quick sql query:

 select * from ps_product where id_category_default = 0;

and I found an orphan product!

 

Might be worth a bit of extra information in the error message about which product is causing an issue ...

Share this post


Link to post
Share on other sites

Peppe83 - It might be because you only have 839 ACTIVE products.......I have 4700 products in db but only 4200 are active and that's what I get in my feed......

 

sorry but I do not think it's my case. I have 1028 products in the catalog and 40 are disabled.

I just did a test, I created a new product, updated feed and this new product is not in the list...

Share this post


Link to post
Share on other sites

Hi Fenix,

 

That was due to adding a feature to display the prices including or excluding tax depending on the store setting. It worked for 1.5 but broke in 1.4. Have fixed in trunk.

 

I get this error.

 

Fatal error: Call to undefined method Group::getcurrent() in /var/www/vhosts/xxxx.xxx/httpdocs/modules/googlebase/googlebase.php on line 418

 

 

PS 1.4.7.0

Share this post


Link to post
Share on other sites

thanks for this great script!

I was missing the tags (adwords_labels) in the feed :mellow:

 

$Tags = Tag::getProductTags($product['id_product']);
$i = 0;

if($Tags[(int)$this->id_lang]){
foreach ($Tags[(int)$this->id_lang] as $TagsName) {
			 $item_data .= $this->_xmlElement('g:adwords_labels', $Tags[(int)$this->id_lang][$i]);

 if(++$i > 9) break; // max 9, more tags  not supported by google?
 }
}

Edited by petrovv (see edit history)

Share this post


Link to post
Share on other sites

Hi silly question time......is there a size limit on this? It worked beautifully with approx 4000 products but now I've got 5500 when I click Generate XML file it justs gives me a white screen.....or is this more to do with php settings and it timing out?

 

Any help greatly appreciated

 

Keep up the good work

Share this post


Link to post
Share on other sites

Hi Paul, great to see you working on this again

 

Could you give me a clue on how to add shipping weight as Google needs that in the UK

 

Also how to add Google Category. I am happy to hard code that in so that all products are the same category

 

Cheers

Share this post


Link to post
Share on other sites

Hi Paul, great to see you working on this again

 

Could you give me a clue on how to add shipping weight as Google needs that in the UK

 

Also how to add Google Category. I am happy to hard code that in so that all products are the same category

 

Cheers

 

Hi haylau,

something like this?

 

if (isset($product['weight'])){
$weight = $product['weight']." kg";
$weight = "<g:country>UK</g:country>\n <g:shipping_weight>".$weight."</g:shipping_weight>\n";
$item_data .= $this->_xmlElement('g:shipping', $weight);
}

 

 

Also how to add Google Category:

the category indicated on the product, according to the product taxonomy from Google.

the taxonomy is mostly different in your shop than google. that is tricky :)

You can:

$item_data .= $this->_xmlElement('g:google_product_category',$this->getPath($product['id_category_default']));

Edited by petrovv (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

Hi to all,

 

I have just installed the googlebase-master module but I don't understand how to use the cron file to automate the export task.

 

When I browse through the link shown in the module interface "ww.mydomain.xx/modules/googlebase/googlebase-cron.php?token=0759efc880&module=googlebase" I have a blank page.

 

Please, tell me how to use it.

 

Thanks and regards

Salvatore

Share this post


Link to post
Share on other sites

Sorry for my english :D

load the folder via FTP, check the permissions 777 to all files, install the module, I click on the xml file and generates a blank page ....... ...... I update the page and still nothing, always white , I go back, I kind but the xml file is empty, 0 bytes.

ps version 1.5.2

Please, help me

Alberto

Share this post


Link to post
Share on other sites

Hello,

 

I use 0.0.8.1 version and works fine in prestashop 1.5.3.1 but in the XML feed you not view friendly url:

 

Example:

 

 

 

 

<link>

</link>

<g:image_link>

<g:additional_image_link>

<g:condition>new</g:condition>

<g:availability>available for order</g:availability>

<g:price>109.99 EUR</g:price>

<g:brand>Molten</g:brand>

</item>

 

How change this? In sitemap module change the code for solve this problem with a forum hack.

 

Sorry for my bad english.

Share this post


Link to post
Share on other sites

Hi there Totti. I've added it in the latest main (trunk) branch update HOWEVER in the following branch: https://github.com/p...ebase/tree/beta I have a version that is 1.5.3 specific and it implements "combinations". This is where the product references may start to give problems (although even the method I've used for supplier reference potentially causes problems where there is more than one supplier of the same product in a store). The stock management functionality in 1.5 has actually made this easier in some respects and harder in others...

 

I am using 1.5.3 and when i installed it I get the error

( ! ) Notice: Trying to get property of non-object in C:\wamp\www\mysite\modules\googlebase\googlebase.php on line 693

 

This is line 693

$this->_html .= '<option value="'.$id.'"'.($this->currency == $id ? ' selected="selected"' : '').' > '.$currency->iso_code.' </option>';

 

The problem is with "iso_code."

 

Cheers steve

Edited by stevell (see edit history)

Share this post


Link to post
Share on other sites

I have a client running PrestaShop on the dreaded GoDaddy shared hosting plan. I am almost positive I know the problem with the Google Merchant plugin is his server limitations (due to the blank error page upon clicking "Generate XML Feed File").

 

What can I do? I'm stuck and have sold him on the need for this program and now I can't deliver.

 

[bETA]Google Base Products Feed {compat=15}

 

Any ideas? I know this is a free plugin and I am so thankful that you created it. Thank you for the help you have given on the forums, I just need a little more guidance.

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Hi! I upload .xml file in test mode on Googlebase and have errors:

Missing tax information

Error:

 

Missing tax information

 

Processed Item:

 

Attribute Name Attribute Value id pcen-8 title Canon PGI-5Bk Compatible Black Ink Cartridge (With Chip) description Compatible with Canon PIXMA iP3300 / iP3500 / iP4200 / iP4300 / iP4500 / iP5200 / iP5200R / MP500 / MP510 / MP520 / MP530 / MP600 / MP610 / MP800 / MP800R / MP810 / MP830 / MP950 / MP960 / MP970 / MX700 / MX850. product type Home > Ink Cartridges > Canon Cartridges link http://aladdin-store.net/index.php?id_product=8&controller=product image link http://aladdin-store.net/27/canon-pgi-5bk-compatible-black-ink-cartridge-with-chip.jpg condition new availability available for order price 5.99 USD brand Canon gtin 013803051209 tax

 

Missing recommended attribute: google product category

 

Error:

 

Missing recommended attribute: google product category

 

Processed Item:

 

Attribute Name Attribute Value id pcen-8 title Canon PGI-5Bk Compatible Black Ink Cartridge (With Chip) description Compatible with Canon PIXMA iP3300 / iP3500 / iP4200 / iP4300 / iP4500 / iP5200 / iP5200R / MP500 / MP510 / MP520 / MP530 / MP600 / MP610 / MP800 / MP800R / MP810 / MP830 / MP950 / MP960 / MP970 / MX700 / MX850. product type Home > Ink Cartridges > Canon Cartridges link http://aladdin-store.net/index.php?id_product=8&controller=product image link http://aladdin-store.net/27/canon-pgi-5bk-compatible-black-ink-cartridge-with-chip.jpg condition new availability available for order price 5.99 USD brand Canon gtin 013803051209

google product category

 

 

Missing recommended attribute: mpn

 

Error:

 

Missing recommended attribute: mpn

 

Processed Item:

 

Attribute Name Attribute Value id pcen-8 title Canon PGI-5Bk Compatible Black Ink Cartridge (With Chip) description Compatible with Canon PIXMA iP3300 / iP3500 / iP4200 / iP4300 / iP4500 / iP5200 / iP5200R / MP500 / MP510 / MP520 / MP530 / MP600 / MP610 / MP800 / MP800R / MP810 / MP830 / MP950 / MP960 / MP970 / MX700 / MX850. product type Home > Ink Cartridges > Canon Cartridges link http://aladdin-store.net/index.php?id_product=8&controller=product image link http://aladdin-store.net/27/canon-pgi-5bk-compatible-black-ink-cartridge-with-chip.jpg condition new availability available for order price 5.99 USD brand Canon gtin 013803051209 mpn

 

Any idea how to fix those attributes ???? Please. Thanks everyone for any help!

Share this post


Link to post
Share on other sites

Hi haylau,

something like this?

 

if (isset($product['weight'])){
$weight = $product['weight']." kg";
$weight = "<g:country>UK</g:country>\n <g:shipping_weight>".$weight."</g:shipping_weight>\n";
$item_data .= $this->_xmlElement('g:shipping', $weight);
}

 

 

Also how to add Google Category:

the category indicated on the product, according to the product taxonomy from Google.

the taxonomy is mostly different in your shop than google. that is tricky :)

You can:

$item_data .= $this->_xmlElement('g:google_product_category',$this->getPath($product['id_category_default']));

 

Hi,

 

At the moment google shopping is displaying my products with "Free Shipping", I have added a Shipping method under settings in the google merchant dashboard area, however it is still appearing as free shipping. I see your sugguested code tweak, would this solve my problem. Also where in googlebase.php do I enter that bit of code.

 

Any help would be very much appreciated.

 

Nick

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Does anyone know how I can add the shipping cost to the price,

 

For example, a prodcut is priced at £20.00 and the shipping is £4.99, the price in google shopping is £24.99.

 

I dont know if this can be done by product weight as I have a shipping fees based on weight,

 

However I just wouldnt mind just putting a flat rate down to get me by.

 

Does anyone know where in the code I can have the product price + £4.99 to when I upload the xml document to google it has the total price including shipping. .

 

Any help would be very much appreciated.

 

Many thanks

Nick

Share this post


Link to post
Share on other sites

Hi,

Can anyone help me with this mod. ?

 

The reason I ask this is because of the way google's new PPC shopping system works. When someone searching for an item in Googles search the google shopping results appear to the right of the search results, but do not include shipping fess. I am finding that I am getting the clickthru rate from google PPC however they are not purchsing the product because when they add to cart it then add shipping fees. So what I would like is the price that appears in google shopping is the price they pay.

 

 

Many thanks

Nick

Share this post


Link to post
Share on other sites

Hi,

 

I have just installed this module, and when i generate xml feed i get this error:

 

[PrestaShop] Fatal error in module googlebase:

Call to undefined method Category::hideCategoryPosition()

 

Any ideas how i get round this?

 

Many thanks

 

Ozz

Share this post


Link to post
Share on other sites

I'm on 1.5.4.1 and I'm also getting the error

 

[PrestaShop] Fatal error in module googlebase:

Call to undefined method Category::hideCategoryPosition()

 

I hope that there is a fix to this soon. I'd love to be able to use this mod again.

Share this post


Link to post
Share on other sites

Paul - thanks for your efforts to put this out here!

I also gave this a try. I applied ectrading's referenced fix above for the first error but am now betting this error:

error on line 16 at column 69: EntityRef: expecting ';'

 

Line 16 here:

<link>http://www.whispardesign.com/index.php?id_product=8&controller=product</link>

 

Could friendly urls be causing this?

Edited by Whispar1 (see edit history)

Share this post


Link to post
Share on other sites

Hi,

 

I have gone through my XML file and deleted:

 

&controller=product

 

from each product, and now i have uploaded the file with only warmings.

 

What can i do about this so i dont have to do it again? I only have 20 products now, so not too bad, but my shop is growing!

Share this post


Link to post
Share on other sites

FWIW, Paul does have a specific fix for 1.5.3.1

I have attached the php file here.

 

This works perfectly for me with the exception of friendly url. The link from google wants to go the the non-friendly url which throws up a debug notice:

 

[Debug] This page has moved

Please use the following URL instead: http://www.whisparde...sconce-viscount

 

If the php file could be modified to use the friendly url - everything would work be perfect.

googlebase.php

Share this post


Link to post
Share on other sites

  • 2 weeks later...

hi

 

I get the following error:

[PrestaShop] Fatal error in module googlebase:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 1171008 bytes)

 

how can I fix it?

 

thank you very much

Francesco

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Hello!!!

sorry for my english, i have a problem with the product description, in my shop i have 1500 products and i use only long description, i have chande the code from:

$item_data .= $this->_xmlElement('description','<![CDATA['.$product['description_short'].']]>');

 

to:

 

$item_data .= $this->_xmlElement('description','<![CDATA['.$product['description'].']]>');

 

With the original code the product feed is complete (1500 products) but without description.

With this mod i see the description in my product feed but the feed have only 840 products.

 

i think is a problem of legth and i wont try to truncate the description, what is the code to do this?

 

TY!!!

Share this post


Link to post
Share on other sites

i have a question on how to change the code.

 

 

I have account level exemption.

Account level exemptions for unique product identifiers will no longer be supported after July 15th, 2013 in the US, and September 16th, 2013 in all other target countries. After these dates, non-compliant items might then be disapproved and disappear from Google Shopping.

 

We recently introduced a new attribute named ‘identifier exists’ that allows you to indicate in your feed that items such as custom goods, vintage items, or collectibles have no unique product identifiers. Since you previously received an account exemption from the unique product identifier requirements, you should add the ‘identifier exists’ attribute with a value of ‘FALSE’ for items where no identifier exists.

https://support.google.com/merchants/answer/188494

 

How can i add to the code so it places a false value for each item?

 

i believe this is what i need.

<g:identifier_exists>FALSE</g:identifier_exists>

Edited by mgamer20o0 (see edit history)

Share this post


Link to post
Share on other sites

  • 4 weeks later...

Hello,

 

All is working for me but i have one problem, all accents are not exported in the XML.

 

For example :

http://www.ohmynode.com/accueil/15-greenpink-noeud-papillon.html

"L'été, temps parfait pour taper quelques balles de golfe"

 

Become in XML

http://www.ohmynode.com/fr_eur_googlebase.xml

"L't, temps parfait pour taper quelques balles de golfe"

 

The "é" are missing.

 

I'm in UTF-8_general_ci in my MySQL Database

 

Have you an idea ?

 

Thank you !

Share this post


Link to post
Share on other sites

  • 1 month later...

Hi,

 

Can anyone advise how I can exclude products that are in a certain category, google have currently suspended me because our martial arts website sells training weapons which are not allowed in their terms and conditions.

 

Any help would be very much appreciated.

Many thanks

Nick

Share this post


Link to post
Share on other sites


Hi,

Before updating to 1.5.4.1 everything was fine. After that nothing. Updated to Paul 8.1 version and still nothing not even a blank page, the timer in the title bar start to turn and then stop shortly after and it tell me:
No feed file has been generated at this location yet!

I delete all my product 2500 and reload everything put the references, the supplier and everything I could to no avail.



Any ideas anyone. The site work perfectly.

Edited by jjjoseph (see edit history)

Share this post


Link to post
Share on other sites

Question for Paul: what is the criteria used for "Recommended path" "defaultOutputFile"? it does not use the right domain name for me, if I know I may fix my problem.

 

 

Changed the server, now it show the right path but still no googlebase file.

Edited by jjjoseph (see edit history)

Share this post


Link to post
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 3 weeks later...

Have the same problem. Any solution?

 

Hello,

All is working for me but i have one problem, all accents are not exported in the XML.

For example :
http://www.ohmynode.com/accueil/15-greenpink-noeud-papillon.html
"L'été, temps parfait pour taper quelques balles de golfe"

Become in XML
http://www.ohmynode.com/fr_eur_googlebase.xml
"L't, temps parfait pour taper quelques balles de golfe"

The "é" are missing.

I'm in UTF-8_general_ci in my MySQL Database

Have you an idea ?

Thank you !

Share this post


Link to post
Share on other sites

Hello,

 

first of all thank you for your help. I have installed the module (latest version),  selected Currency - EURO, Language, Italiano, filled in the Feed description and flagged Use Supplier Reference, then I chose None among the options of Unique Product Identifier. 

I clicked on Update Setting an then on Generate XML feed file on the top of the page. 

But this returns this error:

 

[PrestaShop] Fatal error in module googlebase:
Call to undefined method Category::hideCategoryPosition()

 

is this because I have some product without Supplier Reference number, that have Status offline (not visible)? Shall the SRN contain only numbers or also letters?

Thanks in advance, 

Ilaria

Share this post


Link to post
Share on other sites

  • 2 months later...

This is How to fix the error: 

 

[PrestaShop] Fatal error in module googlebase:

Call to undefined method Category::hideCategoryPosition()

 

 

go to modules>>googlebase>>googlebase.php and change:

$category_name = Category::hideCategoryPosition($category->name);

to:

//$category_name = Category::hideCategoryPosition($category->name);

Comment it out.

 

no more errors and works but I am still testing it.

Share this post


Link to post
Share on other sites

  • 4 weeks later...
Hola amigo! 

 

Acabo de terminar mi tienda y ahora tenemos que poner mis productos en google, pero no tengo mucho conocimiento de programación. 

 

La versión de PrestaShop es mi 1.4.8.2 - este módulo funcionará en mi versión de la tienda brasileña? 

 

¿Y cómo lo instalo en mi tablero? 

 

Gracias por tu ayuda!

Share this post


Link to post
Share on other sites

  • 2 months later...

Verified to work in 1.6.0.6 version of Prestashop :).

 

Small Issues:

- Combinations image links are incorrectly. It should use the combinations default front photo and not the the default for the item.

 

Nice module. I like it  ALOT!

 

 

 

Brandon

Edited by sightless (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

I have installed this module in 1.6.0.6 however when attempting to generate my feed file, I get the following error:

 

Call to undefined method Category::hideCategoryPosition()

  • Like 2

Share this post


Link to post
Share on other sites

  • 2 months later...
  • 1 month later...

I have installed this module in 1.6.0.6 however when attempting to generate my feed file, I get the following error:

 

Call to undefined method Category::hideCategoryPosition()

 

+1 to that

 

 

i think its not yet updated for 1.6 version 

Share this post


Link to post
Share on other sites

  • 1 month later...
  • 2 months later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More