Skip to main content
If a buyer has forgotten their password, the shop sends them an email with a link they can use to set a new one. There is one special feature: several customer accounts can belong to a single email address. The recipient must then be able to tell which account is meant and receive a separate link for each one. This is exactly what the SP- tags are for. They loop over all accounts for this address, describe each one and generate the matching link for each account. Guide: Forgot password
All tags on this page apply exclusively in the HTML mail template of the “Forgot password” function. Which template is used is defined in the SetPasswordMail section of the shop configuration.

How many accounts belong to the address

Three tags answer this question before getting into the details.
SP-SingleData applies if exactly one account is in the list. This is also the case when the buyer wants to reset the password for a single account from the overview of their multiple accounts. SP-SingleDataFromMultipleAccount distinguishes which of the two cases applies.
The previous documentation requires placing SP-SingleDataFromMultipleAccount within SP-SingleData. The shop system does not require this; the tag works anywhere in the mail template. Nesting still makes sense, though, because outside the single-account case it does not answer a meaningful question.

The loop over the accounts

All details about a single account are within the SP-Data loop.
The loop is required even in the single-account case. SP-SetPasswordLink and all account details are invalid tags outside the SP-Data loop, even within SP-SingleData. Therefore, write the account details once in the loop and control the surrounding text via SP-SingleData.
SP-Data exists only as a single tag and as a loop, not as a bracketing. For the case distinction, use SP-SingleData.

The account details

All details except the link also work as a bracketing, namely when the value is filled. This is useful because company, customer number and last login are not available for every account.
SP-SubAccountID exists in the shop system but is not described in the previous documentation. With multiple accounts, this identifier is often the only feature by which the recipient can tell the accounts apart if name and company are the same.
The email goes to an address that may be used by several people. Therefore, only output as many details as are needed to tell the accounts apart. Customer number and sub-account identifier are usually sufficient; the last login is already information about the account holder’s behaviour.
SP-SetPasswordLink is exclusively a single tag. Each iteration of the loop generates its own link that belongs to exactly this account.
Reference: MA- (multiple accounts)

Distinguishing by subshop

In a shop network, a multiple account is not necessarily allowed to log in to every subshop. SP-SubShopPermission() checks this for each account.
The tag requires exactly one parameter, namely a single subshop. An asterisk as a wildcard is rejected, as is an empty parameter or multiple values. In all three cases, the tag is invalid. The previous documentation does not state this.
SP-SubShopPermission() exists only as a bracketing and only within the SP-Data loop.

Tags at a glance

All tags apply exclusively in the mail template of the “Forgot password” function. SP-Data, SP-SingleData and SP-SingleDataFromMultipleAccount stand freely there, all others within the SP-Data loop. If there is no password reset process, all tags output nothing.
  • Guide: Forgot password
  • Guide: Login and registration
  • Reference: MA- (multiple accounts)
  • Reference: SetPasswordMail section in the shop configuration