Jump to content

Resolved - Export users and address


grafis
 Share

Recommended Posts

This should be the SQL statement to get a recordset of your customers. Once you have the record set, you can have the database manager (phpMyAdmin, for example) export it to an XML or CSV file.

SELECT
C.title,C.first_name,C.last_name,C.phone,C.email,
A.billing,A.description,A.title,A.company_name,A.first_name,A.last_name,
A.line1,A.line2,A.town,GZ.name,A.postcode,GC.iso3
FROM CubeCart_customer C
LEFT JOIN CubeCart_addressbook A ON C.customer_id = A.customer_id
JOIN CubeCart_geo_zone GZ ON A.state = GZ.id
JOIN CubeCart_geo_country GC ON A.country = GC.numcode;
Link to comment
Share on other sites

Please state how many records are in the CubeCart_customer table.

 

It may be the case where, in the address book table, the state column holds the name of the state rather than the more recent id number of the state. In that case, try this:

SELECT
C.title,C.first_name,C.last_name,C.phone,C.email,
A.billing,A.description,A.title,A.company_name,A.first_name,A.last_name,
A.line1,A.line2,A.town,A.state,GZ.name,A.postcode,GC.iso3
FROM CubeCart_customer C
LEFT JOIN CubeCart_addressbook A ON C.customer_id = A.customer_id
LEFT JOIN CubeCart_geo_zone GZ ON A.state = GZ.id
JOIN CubeCart_geo_country GC ON A.country = GC.numcode;
Link to comment
Share on other sites

The diff I believe is the CubeCart 5's new address book system - you can register but no address is required. The owners for this site want to send out print catalogs so addy's are very important to them. Customer doesn't have to put in an address when they register, there's no email notice when the customer registers, and you can't export Customer information or addresses... Thanks big time for the query, it's helped on a major issue for this little shop.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...