giantmonkey / gomus-components-doc

https://giantmonkey.github.io/gomus-components-doc/
1 stars 0 forks source link

Docs: UserRegistrationComponent #8

Open Markus-MfN opened 6 years ago

Markus-MfN commented 6 years ago

Related page: UserRegistrationComponent

Is there a way to show a message to the user saying that an email has been sent and he should click on the link to complete the registration process?

douglasward commented 6 years ago

You can use the registration_url property in the actions object to define a redirect url after a successful form submission. This can be used to display a message to the user.

Please close if this answers your question.

Markus-MfN commented 6 years ago

This is what I've written:

<go-user-registration options='{"action": {"mode": "url", "registration_url": "<url to redirect to after registration form has been sent>"}}'> ... </go-user-registration>

Does not work as expected. I'm redirected to <shop test url>.

douglasward commented 6 years ago

Are you sure something else isn't doing the redirection? I just tried with:

<go-user-registration options='{"action": {"mode": "url", "registration_url": "https://google.de"}}'></go-user-registration>

and when I successfully submitted the form, I was redirected to google.

Markus-MfN commented 5 years ago

The redirecting only works if the UserRegistrationComponent is used individually. If it is used in conjunction with the UserComponent, it doesn't. So i added a separate registration page.

To not use registration with the UserComponent I did this on the checkout page where I have the three options login, guest checkout and registration:

<go-user-content>
    <div>
      <h3>Ich habe bereits ein Benutzerkonto.</h3>
      <p>Melden Sie sich einfach an.</p>
      <go-user-login></go-user-login>
    </div>
    <div>
      <h3>Ich habe kein Benutzerkonto.</h3>
      <p>Das Anlegen eines Benutzerkontos dauert weniger als eine Minute.</p>
      <a href="register#" class="button">Registrieren</a>
    </div>
    <div>
      <h3>Als Gast fortfahren</h3>
      <p>Schließen Sie Ihre Bestellung als Gast ab. Es sind persönliche Angaben erforderlich.</p>
      <button go-user-action="guest">Als Gast fortfahren</button>
    </div>
  </go-user-content>