Results 1 to 9 of 9

Problems importing oscommerce customer database into oscmax

This is a discussion on Problems importing oscommerce customer database into oscmax within the Bugs and Problems forums, part of the osCmax V2.5 Forums category; I downloaded the old oscommerce customer database into excel format, added the extra columns so it matched the oscmax format, ...

      
  1. #1
    Member
    Join Date
    Jul 2011
    Posts
    95
    Rep Power
    3


    Default Problems importing oscommerce customer database into oscmax

    I downloaded the old oscommerce customer database into excel format, added the extra columns so it matched the oscmax format, converted it to sql and imported it with no problems. I received the following error when going to the Customers/customers in the admin.


    1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    SELECT DISTINCT customers_id, customers_notes_id, customers_notes_message, customers_notes_editor, customers_notes_date FROM customers_notes WHERE customers_id =

    Where is the customers_notes_id, customers_notes_message, etc coming from? There are no columns with the word notes in them. I then took just one new entry, making sure it matched exactly with the original oscmax entries and still get the same error. Putting the original oscmax customers database back in solved the problem. How can I get the oscommerce customers database into the new oscmax customers database?

    Thanks,

    Dan

  2. #2
    Member
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    78
    Rep Power
    21


    Default Re: Problems importing oscommerce customer database into oscmax

    That query is actually getting the colums from the customer_notes table. The problem is that customers_id is not being specified in the query.

    I have never used osCommerce so have no idea about the databse structure or what needs to be done to get it working in oscmax.

    Just thought I'd post and let you know the problem with that so you dont spend too much time chasing your tail . It is probably a problem with the data you have imported.

  3. #3
    Member
    Join Date
    Jul 2011
    Posts
    95
    Rep Power
    3


    Default Re: Problems importing oscommerce customer database into oscmax

    The oscommerce db has columns named the same but was missing purchased_without_account, guest_account, customers_group_name`, `customers_group_id`, `customers_group_ra`, `customers_payment_allowed`, `customers_shipment_allowed`, `customers_paypal_payerid`, `customers_paypal_ec. I added these into the entries so that the tables matched up.

    this is one of the entries I tried to import.


    INSERT INTO `customers` (`customers_id`, `purchased_without_account`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`, `customers_newsletter_type`, `guest_account`, `customers_login`, `customers_group_name`, `customers_group_id`, `customers_group_ra`, `customers_payment_allowed`, `customers_shipment_allowed`, `customers_paypal_payerid`, `customers_paypal_ec`) VALUES

    (712,0,'','Ruth','smith','0000-00-00 00:00:00','ruth.burnside@gmail.com',886,'555555555 5','','188a0348cdf187764f987d4eddea43:be','0','htm l',0,NULL,'Retail',0,0,'','',NULL, 0);

    It follows the same structure as the original oscmax db, but the customer ID starts at 712. I tried also to start the customer ID with the next available number but that did not work either.

    Any ideas?

    Dan

  4. #4
    Member
    Join Date
    Jul 2011
    Posts
    95
    Rep Power
    3


    Default Re: Problems importing oscommerce customer database into oscmax

    Perhaps the problem is that the customers_id is auto-increment. the oscommerce database already has customer id numbers. I tried just putting an ' ' in place of the customer ID but that just put a 0 in place, did not work. How do I get around this?

    Dan

  5. #5
    New Member
    Join Date
    Aug 2012
    Posts
    27
    Rep Power
    0


    Default Re: Problems importing oscommerce customer database into oscmax

    There are 3 tables required for customers to show in the osCmax admin. Tables: address_book, customers, customers_info

    You must retain all the original ID variables, it does not matter that they are auto-increment.

    Here's a bit more info in this thread, with more to come as well: Oscommerce v2.2 RC@ to Oscmax 2.5.1

  6. #6
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,121
    Rep Power
    55


    Default Re: Problems importing oscommerce customer database into oscmax

    markcm is absolutely right ... In order to import customers from osCommerce you will need to put another record in the table in called customers_info with corresponding entries to the customers table ... it holds all sorts of useful stuff needed about the customer.

    Simply apply for your example:

    INSERT INTO customers_info VALUES (712, 'NULL','0','2012-09-10 18:00:00','NULL', '0');

    For each customer_id you have loaded from your old store.

    Regards,
    pgmarshall
    _______________________________

  7. #7
    New Member
    Join Date
    Aug 2012
    Location
    Indonesia
    Posts
    22
    Rep Power
    0


    Default Re: Problems importing oscommerce customer database into oscmax

    Quote Originally Posted by markcm View Post
    There are 3 tables required for customers to show in the osCmax admin. Tables: address_book, customers, customers_info

    You must retain all the original ID variables, it does not matter that they are auto-increment.

    Here's a bit more info in this thread, with more to come as well: Oscommerce v2.2 RC@ to Oscmax 2.5.1
    Thanks. This works for me. I have similar problem as I was importing from oscommerce 2.2 into oscmax 2.5.2. I only import the address_book and customers, without customer_info. And getting the similar error with DanDan. I imported the customer_info and that's all going well. Thanks

  8. #8
    Senior Member blackhawk's Avatar
    Join Date
    Aug 2009
    Location
    Indianapolis, IN
    Posts
    675
    Blog Entries
    1
    Rep Power
    28


    Default Re: Problems importing oscommerce customer database into oscmax

    PG does these same steps apply for importing customers into another oscmax store, after we have exported customers from another oscmax admin store? Exporting seems real easy from oscmax, but trying to import them still seems like a mystery...

    bh

  9. #9
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    3,121
    Rep Power
    55


    Default Re: Problems importing oscommerce customer database into oscmax

    Any customers in the system will need a corresponding entry in customer_info otherwise nasty things will happen.

    Regards.
    pgmarshall
    _______________________________

Similar Threads

  1. [Admin Issue] Importing old database from old oscommerce store
    By ozdunker in forum Bugs and Problems
    Replies: 7
    Last Post: 06-26-2011, 06:52 AM
  2. Moving from OSC2.2MS2 to OSCMax problems with database
    By dinki in forum osCmax v2 Installation issues
    Replies: 6
    Last Post: 10-03-2006, 09:44 AM
  3. Importing database from another oscommerce site...
    By aussiejay in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 06-11-2006, 05:10 PM
  4. Installed and upgrading from osc 2 database needs importing
    By gamefreak7 in forum osCmax v2 Installation issues
    Replies: 4
    Last Post: 07-17-2005, 10:31 AM
  5. Importing Database and installing contribution
    By kashifk in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 08-31-2004, 05:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •