Jump to content

Customer code generator for everyone after register


Nuris

Recommended Posts

Hello everyone! 

Do somebody know how can be solved problem with customen personal ID? I want to give my all registered customer their personal ID, which they can see on their profile, but can't find anything to make this. By the way I am not a code guy, so hope somebody can help me to explain good)

For example:

I register on my website as Name ==> Nuris, After I confirm register, syste give me my Personal Code, so can see my in my account information like:

Your customer code is: SE3DF7CN (auto generated and forever).

 

Thank you very much!

stock-photo-world-wide-cargo-transport-concept-d-rendering-505323895.jpg

Link to comment
Share on other sites

->It is not possible without any customisation, you need to use a hook to create new "Customer Personal ID" during the registration or you can use the customer ID generated by the Prestashop.

->Then you can use another hook to display the data on the Informtaion page.

For creating new customer personal ID, use the below Hook

public function hookActionCustomerAccountAdd($params)
    {

                   //This hook execute during new customer registration

     }

For displaying the data on the Information page, KIndly use the below Hook

public function hookDisplayCustomerIdentityForm()
    {

                  //This hook execute on the My Information page

     }

We hope that the abobve information helps you.

  • Like 1
Link to comment
Share on other sites

On 12/7/2022 at 8:14 PM, Knowband Plugins said:
public function hookActionCustomerAccountAdd($params)

Hi again! I found out where to insert new hook. theme.yml.  But don't really understood how to insert and where to insert. Can you please show me how  to make it and screenshot? Thank you very much!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...