Results 1 to 5 of 5

Thread: Set all customers to registered

  1. #1
    Join Date
    Jul 2011
    Posts
    90

    Default Set all customers to registered

    We have some registered customers but now we uploaded a list of additional customers via xml and now we need to set all customers as registered, no matter their current registration value. What would be the sql query to run?

  2. #2
    Join Date
    Apr 2012
    Posts
    168

    Default

    Even the anonymous customers? Are you sure?

    If so then I would try the following but I'd really look at the SQL table first.

    UPDATE Customer
    SET IsRegistered = 1
    WHERE IsRegistered= 0;

    But you need to think about these things

    1.Some orders that come from PayPal allow duplicate email addresses so doing the above may cause their accounts to be locked.
    2.None of the above will have passwords assigned so these will need to be manually entered via admin.

    Can you know just set the new customers you are importing to registered?

  3. #3
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    330

    Default

    To avoid the anonymous customers I would qualify the update with a check on the email address, ie:

    Code:
    UPDATE Customer
    SET IsRegistered = 1
    WHERE IsRegistered= 0
    AND Email <> ''
    I would urge you to do this in a test environment first to make sure you get the expected outcome.
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!

  4. #4
    Join Date
    Apr 2012
    Posts
    168

    Default

    Or you can run the monthly maintenence but not sure if that would purge your new customers as they are not registered.

    The SQL in the post above is what I would go with and agree do it on a test db first!

  5. #5
    Join Date
    Jul 2011
    Posts
    90

    Default

    I purged all anons with the monthly maintenance and then ran the sql. All went as desired. I really appreciate your help! Thanks a lot!

Posting Permissions

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