I installed this module for a client in the UK, however there is no location into which to set the target country. If the country is left out, google automatically sets it to the US and dollars, but I needed the UK and pounds.

I updated the module, and am submitting a patch that worked for me. I am also adding a zip of the file just in case, as I never seem to be able to make patches that work.

The module adds a column to the table in the database (target_country), a select dropdown on the node edit page with the three applicable countries (US, UK and Germany), saves the submitted country to the database, and adds a setting on the settings page that allows a default country to be set so that people not in the US don't have to select the country every single time.

I hope you can include this in the next version of the code so that I don't break my clients site the next time you update the module!! Thank you very much.

CommentFileSizeAuthor
#1 uc_gbase_add_target_country.1.patch14.38 KBjaypan
#1 uc_gbase.zip11.31 KBjaypan

Comments

jaypan’s picture

StatusFileSize
new11.31 KB
new14.38 KB

Hmm. My files didn't seem to attach properly. I'll try again.

dannyjohnson1’s picture

Ta for this, worked like a charm.

Used on site http://www.roadsignsdirect.co.uk.

Danny

danharper’s picture

Title: **Solved** » Cannot set country

I have tried this module, but I receive this error when trying to add a product.

user warning: Column count doesn't match value count at row 1 query: INSERT INTO uc_gbase (nid, gid, submit_type, product_name, product_type, product_description, product_condition, payment_method, target_country, images) VALUES ('593', '11189105411610482435', '1', 'Kenda Kinetics 2.10', 'Sporting Goods > Outdoor Recreation > Cycling > Bicycle Parts > Bicycle Tires & Tubes', 'Full knobbly tread with front and rear specific patterns\r\nHigh traction tread design\r\nRolls remarkably well for a big knob tyre', '0', 'Visa$MasterCard$', 'GB') in /home/pushecou/public_html/cycle/sites/all/modules/ubercart/contrib/uc_gbase/uc_gbase.module on line 485.

I assume this is when the module is trying to write the information into the UC gbase table, I can see that it doesn't seem to write anything in the image field at the end.

Although it does actually post to Google Base just doesn't save the info.

Happens whether or not I submit an image.

Cheers Dan

danharper’s picture

Title: Cannot set country » **Solved**

Seems the sql was missing a placeholder for one of the values
Before
VALUES ('%d', '%s', '%d', '%s', '%s', '%s', '%d', '%s', '%s')",
After
VALUES ('%d', '%s', '%d', '%s', '%s', '%s', '%d', '%s', '%s', '%s')",

Thanks for the updated module it works great in the UK now.

Dan

jaypan’s picture

Setting the title back to the original, as **Solved** is both not descriptive, and also not true, as the module has not been fixed.

sunshinefun’s picture

Thanks Jay!
Just installed on Super Cheap Software
Did the zip override rather than patch and it took one attempt, all working!
Very impressive, you've saved me hours!!!
Thanks
Jen

compujohnny’s picture

Status: Active » Fixed

This issue should be fixed in the latest dev version

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.