I would be nice to be able to import addresses via Feeds...

Comments

Ooxo’s picture

agreed

tema’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new4.85 KB

It appears to be easy. Tested.

Ooxo’s picture

Brilliant it works like a charm, many thanks Tema

gausarts’s picture

Would love to see this committed. Thanks

muschpusch’s picture

+1 for committing this

twistor’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.89 KB

Added multi-value support and descriptions.

rickmanelius’s picture

Testing #6. The fields appear to import and display, but are not appearing on the edit screen... will keep testing and see if it's a goof on my end.
I haven't tested #2 yet.

rickmanelius’s picture

Both of these patches (#2/#6) definitely get the data in. But when you go to node/[nid]/edit, there is nothing there. If you edit again with new data, it works from that point on. Trying to figure out what the disconnect is... I'm using Drupal 7.2 and the 7.x-1.0-alpha2 for address field.

rickmanelius’s picture

StatusFileSize
new1.89 KB

It appears that these patches are in fact working as expected, but there is another bug that's preventing using the node edit form in general.
#1094138: Create a watchdog error message when an address field value is saved without a country.

PS. The patch in #6 has a dpm() call that will need to be commented out. Otherwise it works as expected, with the above linked bug to be fixed later.

I've attached another version of the patch with dpm commented out.

rickmanelius’s picture

Status: Needs review » Reviewed & tested by the community

Problem found. Patch #6 worked perfectly, you just have to specify a country. Otherwise, these values don't get properly loaded by the node/edit form even though they are clearly in the back end.

So to recap. I merely commented out the dpm line in #6. I've tested and proven that I can import title, first, last, street, city, country, state, zip and it works beautifully.

Marking this reviewed by community and hoping for an accepted patch into the main module.

damien tournoud’s picture

Status: Reviewed & tested by the community » Fixed

Committed a patch based on this. I just moved the hooks to a separate addressfield.feeds.inc file and removed reference to the XML columns that are now gone.

Bevan’s picture

Status: Fixed » Needs work

The files are not being exposed to Feeds. Using latest Dev release (which contains addressfield.feeds.inc) the address fields are not exposed as Feeds targets. Using 1.0-beta1 with the patch from comment #9, the address fields are exposed.

I think Feeds does not take responsibility for including MODULE.feeds.inc files. Whose responsibility is it to include them?

Bevan’s picture

I noticed that addressfield.feeds.inc is included when actually running an import, but not when building source-to-target-maps.

johnv’s picture

Status: Needs work » Needs review
StatusFileSize
new439 bytes

Bevan, can you try this?

damien tournoud’s picture

If anything, this sounds like a bug in Feeds. I'm not going to commit anything specific to feeds to the .module.

damien tournoud’s picture

Status: Needs review » Fixed

Support for "feeds hooks to be located in modulename.feeds.inc" has been added to feeds in 7.x-2.x-alpha4 (see #381131b). If it doesn't work as expected, please open an issue in the Feeds queue.

13rac1’s picture

Link for "feeds hooks to be located in modulename.feeds.inc" is http://drupal.org/node/1203240

13rac1’s picture

Issue opened in the Feeds queue, includes patch to correct: http://drupal.org/node/1224836

Status: Fixed » Closed (fixed)

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

franz’s picture

Just a notice here. Don't use module_exists() there, it's not needed since it's a workaround patch, and if addressfield is bootstraped before feeds, it doesn't work.

star-szr’s picture

Importing works with Feeds 7.x-2.x-dev, they have patched the modulename.feeds.inc issue.

johnv’s picture

Title: Mapper for Feeds importers » Feeds mapper for Address Field

better title

dgastudio’s picture

i have found only one problem...

to import, i have to country code instead of country name.

i mean, instead of SPAIN i have to use SP.

johnv’s picture

@kervi, Can you use "Feeds Tamper" to change the countries beforehand?

dgastudio’s picture