Hi there,
i have just installed the module and it does not work. I get the following error:

warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in /home/isukcouk/public_html/prime-tv.co.uk/sites/all/modules/uc_gbase/uc_gbase.module on line 132.
Error on Google Base field width: This entry is not of type number. Example: 1,000.00 for one thousand.
Error on Google Base field length: This entry is not of type number. Example: 1,000.00 for one thousand.
Error on Google Base field height: This entry is not of type number. Example: 1,000.00 for one thousand.

It does not submit products to Google.

CommentFileSizeAuthor
#5 geniusweb-fixes.patch2.29 KBmattsteven

Comments

compujohnny’s picture

The module only submits to Google when your products have passed the validation check, the errors you have are returned from Google,

Can you provide a screenshot of the kind of data you have on your product form?

mattsteven’s picture

Same problem here.

On the preceding product page (edit tab of the product) I see this error:

    * warning: Invalid argument supplied for foreach() in /var/www/includes/form.inc on line 1206.
    * warning: Invalid argument supplied for foreach() in /var/www/includes/form.inc on line 1206.

On submitting the form I get this:

    * warning: Invalid argument supplied for foreach() in /var/www/modules/uc_gbase/uc_gbase.module on line 486.
    * warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in /var/www/modules/uc_gbase/uc_gbase.module on line 132.
    * Error on Google Base field width: This entry is not of type number. Example: 1,000.00 for one thousand.
    * Error on Google Base field length: This entry is not of type number. Example: 1,000.00 for one thousand.
    * Error on Google Base field height: This entry is not of type number. Example: 1,000.00 for one thousand.

I tried adding numbers to the "Product information" tab assuming it was getting the l w h dimensions from that. No help.

Also the GBase data is not saved at this point to the database at all.

DrupalYedi’s picture

subscribe

Same problem as #2, Drupal 6.15, Ubercart 6.x-2.2

Kephas’s picture

When I submit a product to google base by editing an existing product,
filled in under ubercart google base integration settings
product name
product type (copy/pasted from product taxonomy link)
new
visa,mastercard, discovercard
image checked

save returnes this

* warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in /homepages/12/d300610884/htdocs/sites/all/modules/uc_gbase/uc_gbase.module on line 132.
* Error on Google Base field width: This entry is not of type number. Example: 1,000.00 for one thousand.
* Error on Google Base field length: This entry is not of type number. Example: 1,000.00 for one thousand.
* Error on Google Base field height: This entry is not of type number. Example: 1,000.00 for one thousand.

also tried adding .00 to end of deminsions (inches) but it didn't help

mattsteven’s picture

StatusFileSize
new2.29 KB

I've fixed a number of the errors that show up in the patch I will attach to this message. At this point it will at least save the content you enter without croaking.

However it appears that the module is not ready to actually submit these to Google Base, is that correct?

The callback for uc_gbase/items ( uc_gbase_get_products ) is unimplemented.

Point me in the right direction on that and I'll see if I can implement it if necessary. Or if you're doing something else that I'm missing, explain what should be happening if you would.

Thanks,
Matt Steven @
http://www.geniusweb.com/

mattsteven’s picture

Drupal's cache layer croaked out so the patch didn't land. Here's a URL to it:

http://www.geniusweb.com/files/uc_gbase_geniuswebfixes.patch

Kephas’s picture

I patched the module and it is uploading the product to merchant center as soon as I clicked save. The dimensions are displaying as zeros and if you go back into the edit tab of the product, the cash box is automatically checked. (Only matters if you don't uncheck before saving.) The condition is showing as used even though I checked new. Also I noticed in the module code that some of the payment options were commented out. I accept some of those options so I look forward to there implementation.

compujohnny’s picture

That is a problem with Google Merchant itself they don't accept these payment methods, they only accept the ones that are not commented

mattsteven’s picture

All of my products are getting disapproved. Anyone else getting that? Might it be due to not sending them a link to it?

giorgio79’s picture

Status: Active » Closed (duplicate)
pwhite’s picture

I can confirm that the patch in #6 has fixed the problem.

rennsix’s picture

I applied the patch in #6 and it looks like 1 hunk failed. However, I don't get anymore errors for includes/form.inc on line 1205


patch unexpectedly ends in middle of line
Hunk #5 FAILED at 537.
1 out of 5 hunks FAILED -- saving rejects to file uc_gbase.module.rej

***************
*** 533,541 ****
    }
  
    $item->add_attribute('weight', $node->weight.' '.$node->weight_units);
-   $item->add_attribute('width', $node->width.' '.$node->length_units);
-   $item->add_attribute('length', $node->length.' '.$node->length_units);
-   $item->add_attribute('height', $node->height.' '.$node->length_units);
  
    $headers = uc_gbase_headers();
  
--- 537,545 ----
    }
  
    $item->add_attribute('weight', $node->weight.' '.$node->weight_units);
+   $item->add_attribute('width', intval($node->width).' '.$node->length_units);
+   $item->add_attribute('length', intval($node->length).' '.$node->length_units);
+   $item->add_attribute('height', intval($node->height).' '.$node->length_units);
  
    $headers = uc_gbase_headers();
didlix’s picture

+1, got the exact same failure.

Veggieryan’s picture

i can confirm the patch in #6 worked but I had to manually cut and paste hunk 5 at line 537

chazz’s picture

Can you integrate this path with 6.x version please

patoshi’s picture

the patch from #6 is verified working.. it stopped showing the error:

Invalid argument supplied for foreach() in /includes/form.inc on line 1200

for me. also it stopped the error after i submitted the page.

problem now is that nothing is showing up in my google base account under MY PRODUCTS. Does it take time to show up? or how can i test to see if its even feeding into google base?

didlix’s picture

I modified the code manually so it looks like this

if ($node->shippable) {
$item->add_attribute('weight', $node->weight.' '.$node->weight_units);
$item->add_attribute('width', intval($node->width).' '.$node->length_units);
$item->add_attribute('length', intval($node->length).' '.$node->length_units);
$item->add_attribute('height', intval($node->height).' '.$node->length_units);
}

$headers = uc_gbase_headers();
$items_feed_url = 'http://www.google.com/base/feeds/items';

but still get this

warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in /var/www/www.xxx.co.uk/public/sites/default/modules/_uc_gbase/uc_gbase.module on line 132.
Error on Google Base field width: This entry is not of type number. Example: 1,000.00 for one thousand.
Error on Google Base field length: This entry is not of type number. Example: 1,000.00 for one thousand.
Error on Google Base field height: This entry is not of type number. Example: 1,000.00 for one thousand.

BroadlineCable’s picture

does anybody have a fix for the "Error on Google Base field height: This entry is not of type number. Example: 1,000.00 for one thousand." Error? I can't get anything to submit.