How to upadate a Customer per Code ?

Discussion in 'Tips and tricks' started by GermanHero, Mar 1, 2019.

  1. GermanHero

    GermanHero New Member

    Joined:
    Nov 15, 2018
    Messages:
    9
    Likes Received:
    0
    S.E:
    2019-11-15 18:56:17
    L.T:
    Regular
    L.C:
    1
    inside the code i see

    $identity = new CustomerIdentity($customer->email, $customer->password);

    to get a CustimerIdentity ...

    but i now i want to change the $customer->group_id

    for a customer... how to do this ?

    thanks and best regards
     
  2. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    9,942
    Likes Received:
    2,328
    From the above code, you can do:
    PHP:
    $customer->group_id = ...;
    $customer->save(false);
     
  3. GermanHero

    GermanHero New Member

    Joined:
    Nov 15, 2018
    Messages:
    9
    Likes Received:
    0
    S.E:
    2019-11-15 18:56:17
    L.T:
    Regular
    L.C:
    1
    thanks for the info!
     

Share This Page