Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: Set all customers to registered

  1. #1
    medsupply is offline Senior Member
    Join Date
    Jul 2011
    Posts
    99

    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
    Skriver is offline Senior Member
    Join Date
    Apr 2012
    Posts
    188

    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
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    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
    Skriver is offline Senior Member
    Join Date
    Apr 2012
    Posts
    188

    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
    medsupply is offline Senior Member
    Join Date
    Jul 2011
    Posts
    99

    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!