Prints a registration form with which a customer can create a user account in an online store.
Kuvaus
The tag should always be placed inside the HTML form. Two different values can be set as the form's processing address:
- /checkout/: The order hasn't been placed yet, and the customer is still at checkout
- /account/register/: The order has already been placed, which means that form most probably will be printed on the order confirmation page
Send the form to the server as a POST request. You can add multiple form tags to a single form, so that they will be processed as a single request.
Using this tag imposes the following requirements: the customer has provided the customer information or it will be sent to the server in the same request as the registration form.
The tag prints a checkbox that the customer can select to create a user account. The password field is printed under the checkbox. If the customer doesn't select the checkbox, the value of the password field won't be taken into account.
The checkbox for creating a user account is not printed on the checkout order confirmation page. The customer can create an account directly by entering a password.
See an example that shows how the registration form can be added to different pages of the online store.
Syntaksi
{CheckoutRegistrationForm}
Näkyvyys
Toimii näkyvyydessä: globaali
Functions in the following scope:global
Tags with global scope can be used on any template and in any tag.
The tag can be used e.g. on the checkout order confirmation page to enable the customer to create a user account after placing an order in the online store.
Adding the sign up form to online store's pages
The {CheckoutRegistrationForm}
tag prints the customer sign up form. Basically, the tag can be used on any online store page, but most often it is placed on any of the checkout pages, the shopping cart and the order confirmation page.
The tag should always be placed inside the HTML form. The form is sent via a POST
request to the /checkout/ address for processing the information provided by the customer. It can be done in the following way:
<form action="/checkout/" method="post">
{CheckoutBillingAddress(mode: 'form')}
{CheckoutRegistrationForm}
<button type="submit">{%Save}</button>
</form>
In the example, the sign up form is sent together with the customer information form, so that both forms can be processed at the same address by using the same HTTP request.
You can add a form like this to any template or, for instance, to a content field of a content page or a product.
Attribuutit
after/before:
By using the
after
andbefore
attributes you can define content that is output either after or before the tag's output.Allowed values:The HTML and Interface markup
E.g.
before:
'<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'after:
'<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'
If the tag does not produce any content, neither the content of the
after
andbefore
attributes will be output.escape:
Adds an escape character before quotation marks in the output.
The attribute makes it easier to process the tag-produced content when using JavaScript.
Allowed values:true/false. The default value is false.
or:
Defines alternative content that is displayed if the tag itself does not produce any content.
Allowed values:The HTML and Interface markup
E.g.
or:
'Sisältöä ei löytynyt.'