Closed (outdated)
Project:
User Import
Version:
6.x-2.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Feb 2010 at 23:30 UTC
Updated:
18 Jun 2019 at 09:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
megachrizI also came across this problem. I even needed to import two addresses at once. I had made a module for myself with which you can import two addresses at once. It has also experimental Extra Fields Pane integration (supports 6.x-2.x-dev only). Maybe someone can build this module out so it would get more options on addresses import.
Comment #2
biscuit.tech commentedI'm looking to do the same thing - can you explain a little about what process I should follow to use your userimp module?
Thanks!
Comment #3
megachrizHi biscuit.tech,
To import addresses into Ubercart Addresses, you need to have the address data in separate columns in your CSV-file, for example you can have this columns in your CSV:
- first name
- last name
- street
- postal code
- city
- phone
With the module 'userimp_uc_addresses' activated, you can select for each column to which field of UC Addresses it belongs. If you have only one address per CSV row, you should select only fields prefixed with 'UC Addresses (1)'. If you have two addresses per row, you will need to select fields prefixed with 'UC Addresses (2)' for columns belonging to the second address. The module does not support three or more addresses in one row.
Attached is an example on how you could set the field matches.
Comment #4
biscuit.tech commentedThanks, I got it. It worked perfectly as soon as I realized I could select uc_"field" I was homefree.
It would be awesome to get this into the official module directory so it could be found easier.
Comment #5
jday commentedThanks for contributing this gem MegaChriz! It's a fantastic add-on!
Comment #6
jday commentedJust added extra address fields with uc_extra_fields_pane and then when trying to import users I got this error:
Fatal error: Cannot use object of type ucxf_addressfield as array in
/usr/local/www/..../sites/all/modules/userimp_uc_addresses/u
serimp_uc_addresses.module on line 57
I just commented out the UCXF section (54-60) for now as we aren't importing that information, but thought I'd post this anyway in case you find yourself with lots of spare time to work on this cool module.
Comment #7
megachrizYeah, things changed a lot in Extra Fields Pane since the time I posted the module in this thread. I see if I can find time to update it.
By the way, I have been working on an Ubercart Addresses extension module for Feeds. I can't publish this module yet, because it's intended to become an extension for the second major version of Ubercart Addresses for Drupal 6 (6.x-2.x). I'm still working, together with freixas, on this version of Ubercart Addresses (and we're not far enough to publish it on Drupal already).
Comment #8
pdesai commented@MegaChriz: How can we import say five addresses that are on separate rows but associated to one user account?
Comment #9
megachriz@pdesai
Do you have the user ID's on each row? The module posted in #1 was created to import one or two addresses together with other user data.
If you have the user ID's, I guess the easiest way to import addresses at this moment is to import them directly into the uc_addresses table (although no addresses will be marked as default addresses in this case).
Comment #10
pdesai commentedEach row has a user ID (company) which is a numerical number. That numerical number gets repeated if there are more than one contact/address for each user ID (company). Currently if we import it creates for example, company with numerical user ID of 200 for the first contact as 200 and second contact as 200 2 and third as 200 3. But we want to make it so that instead of creating a new user ID - it adds the contact.
Example CSV:
username,company,contact_first,contact_last,contact_address_1,contact_address2,contact_city,contact_state,contact_zip
200,test,first,last,123 main st,suite 100,city,state,12345
200,test,first_2,last_2,123 main st,suite 100,city,state,12345
200,test,first_3,last_3,123 main st,suite 100,city,state,12345
Comment #11
megachriz@pdesai
I'm sorry, but the module posted in #1 is not designed to import addresses like this. It's only an add-on for the user import module (thus for importing users together with one or two addresses). I suggest you to import the addresses directly into the database, for example via phpMyAdmin.
The alternative is wait until Ubercart Addresses 6.x-2.x is released, then I will release an address import module that works with the Feeds module.
Comment #12
pdesai commentedHow long until you release the module?
Comment #13
pdesai commented@MegaChriz: We are using your module to only import only two addresses per user but now when we use the admin account to create an order for those imported users - I am not able to select their imported addresses. This is a bug. Can you help with this issue?
Comment #14
megachrizSorry for missing your questions. There is a lot of work left for the Ubercart Addresses 6.x-2.x version and because my time to work on it is limited I would say it would take at least 2 months before the first alpha-release. An alpha-release would be enough to release the extension for feeds, though.
The issue you have with not being able to select addresses when creating an order has nothing to do with the module here, it's an Ubercart Addresses issue. You can find a workaround for that here: #396342: addresses in admin orders interface
Comment #15
eric gu commentedI've ported MegaChriz's module to Drupal 7.
I haven't tested it thoroughly; anyway, it works in my recent project. Hope it can help somebody with the same need.
Comment #16
megachrizHi Eric Gu,
I have not looked at your port yet, but I think it will be worthwile to say that Ubercart Addresses 7.x-1.x now has integration with Feeds, meaning it is already possible to import addresses from CSV files with the module itself + Feeds (due to Feeds great architecture, addresses may come from other sources as well, it is not limited to just CSV files).
Ubercart Addresses 7.x-1.x has Feeds integration since 7.x-1.0-beta1. The 6.x versions do *not* have Feeds integration.
Comment #17
gurunathan commentedHi All,
I have enabled Ubercart addresses module.
Now I want to import users via CSV file by using Feeds module.
Ubercart addresses allows to import addresses via CSV file.
But I want to import both the user and user's address by using a single CSV file.
Is it possible?
Comment #18
gisleDrupal 6 is not supported anymore and it looks like Feeds is the preferred import method. Closing as outdated.