Guest Posted February 19, 2004 Posted February 19, 2004 I would like to import an existing user database into the customers and address_book databases in osCommerce. My existing (or old) data consists of this: I have a spreadsheet that I have developed to meet the database structure of oscommerce. User ID Gender First Name Last Name Date of Birth Email Address Zip Code City State Country Phone UserName Password (not encrypted) What I don't understand is this: OSCommerce uses 2 databases - customers and address_book. How can I take this individual file and import it into the 2 databases? While doing so I'd also like to encrypt the passwords. My customer who is using OSCommerce is migrating from another shopping cart. It was a MySQL based cart and the data is good. I just don't understand enough to be able to get this data into its proper location within OSC. Any help would be appreciated.
Christian Lescuyer Posted February 19, 2004 Posted February 19, 2004 There are two tables (customers and addresses) because each customer can have many addresses. To import your data, you need to split it in two Excel sheets, linked by a common id. You'll notice address_book has a customers_id field. It should be the same in both tables. So number your lines in Excel (first customer is 1 or 1000, or whatever; next customer is first + 1, etc.) This will be customers_id. Duplicate the column (same numbers). This will be address_book_id. Now duplicate your sheet. One will go into customers, the other on in address book. Delete unwanted columns from each one, but keep the customers_id in both tables. Also, address_book_id will go in both tables (field is named customers_default_address_id in customers). Now import in MySQL. You will have one address per customer. Christian Lescuyer
blokke Posted February 22, 2004 Posted February 22, 2004 I have done this, but wonder what to do with the password column? ....play it again, Sam....
Recommended Posts
Archived
This topic is now archived and is closed to further replies.