Skip to main content
The subscription module sends four emails: two announcements before the next subscription order and two error messages to the merchant. The tags with the prefix E-SUBS_ apply exclusively in the templates of these emails. You enter all four in the shop configuration shop.config in the Subscription section, each in its own subsection. Guide: Subscription module · Reference: Subscription section · Materials: Subscription module materials
Subscription management in the customer account is a different matter. It works with the tags of the prefix SUBS-, not with the E-SUBS_ tags on this page.
The parameter Days in the two announcement emails determines how many days before the order the email is sent. With a short delivery interval, too long a lead time can cause the announcement to arrive before the previous delivery.

The loop over the subscriptions

Two loops are available. Which one fits depends on who receives the email.
Grouping by product is intended for the merchant announcement. The merchant wants to know how much of which item is going out soon, not which customer ordered what. The buyer, on the other hand, gets their own subscriptions listed individually.
The two loops cannot be nested inside each other. If {@E-SUBS_DataByProduct} is placed inside {@E-SUBS_Data}, the inner area stays empty. Choose one of the two for each email.
E-SUBS_DataByProduct can also be used as an area tag. The area applies if there are any grouped subscriptions at all, and keeps the table header and heading out of an otherwise empty email.

The subscription details

All of the following tags are placed inside the loop and refer to the subscription currently being iterated.
These tags are single tags only. The old documentation also lists most of them as area tags and shows examples following the pattern {E-SUBS_Data_PR_Name}…{/E-SUBS_Data_PR_Name}. This bracketing does not work; the tag remains unresolved in the email. Do not check for empty values in the template; instead, rely on the details of an existing subscription being present.
Product name and price reflect the state of the last order or the last change to the subscription, not today’s catalogue price. In the announcement to the buyer, this is the more honest information because it shows what was last charged. Point out in the text that the price may change before delivery.
E-SUBS_Data_PR_quantitydecimal is not in the old documentation. The tag outputs the number of decimal places with which the quantity is managed, which is necessary for items sold by weight or length.

Points in time

With E-SUBS_Data_nextorder, only the date part is meaningful. The time in it results from the batch run and says nothing about the time of delivery. Therefore, only output the date to the buyer.
All four points in time come as timestamps. For readable output, format them in the template, for example with the date formatting tags.

The state of a subscription

The four states are mutually exclusive. A subscription is either active, new, paused or triggered, never two at once. A chain of positive area tags therefore covers all cases; nesting is not necessary.
For E-SUBS_Data_state_code, the old documentation lists the values 0 for “not affected”, 1 for “changed”, 2 for “paused” and 3 for “resumed”. This list does not belong to this tag but describes the change types of subscription management. The numeric value here corresponds to the four states listed above. Use the four state_is… area tags, which are unambiguous, and do not rely on the numeric value.

Checking whether a product is subscribed

Both tags check the entire subscription list, not just the subscription currently being iterated. They are therefore placed outside the loop and are suitable for addressing a specific product in an email.

The two error emails

E-SUBS_ErrorCode only applies in the template for OrderErrorMail. E-SUBS_ErrorMsg is available in all subscription templates.
Both error emails go to the merchant and name the customer account and product. Send them to an internal address and not to a mailbox that third parties can view.
The notification about permanently disabled subscriptions is only sent if a secret for deeplink emails is configured for the shop. If it is missing, nothing is sent and only an entry appears in the log. The same applies if the recipient address, sender address, subject or template is missing, or if the template is empty.

The tags at a glance

All tags on this page are permitted in the four email templates of the subscription module. The Data_ tags each within one of the two loops, E-SUBS_ErrorCode only in the template for OrderErrorMail.
  • Guide: Subscription module
  • Reference: Subscription section
  • Reference: SUBS- (subscription management in the customer account)
  • Materials: Subscription module materials