2.2

PrintShop Web Administrator Guide | 127
6 The Body field contains a HTML stream that renders the actual e-mail message. The content
contains both language strings and order/job variables. Language strings are surrounded by the
@ sign, the order/job information by the % sign. Both variables are replaced when sending the
message to the customer. The language strings are replaced based on the language set for that
user.
The body may contain the following special functions:
Value::replaceString: This function is used to replace boolean data (0 or 1) by an
understandable string. For example: When an order is marked as rush the value in the message
would show 0 or 1. As this doesn't mean a lot to the customer the value can be replaced with a
string using the Value::replaceString function.
This function has the following parameters (comma separated):
The value which is going to be replaced. Typically this is an order/job variable.
Two or more key and value pairs. These values are separated by the = character. The key is
the value that matches the first parameter and the value is replace value.
The following sample shows how the fbRush variable is replaced by the cNo or cYes language
string:
Replace the fbRush with hard coded strings:
[Value::replaceString(%fbRush%,0=No,1=Yes)])
Replace the fbRush with a language dependant strings:
[Value::replaceString(%fbRush%,0=@cNo@,1=@cYes@)])
Value::notEmpty: This function will insert specific data when the specified value is not empty.
This function can be used to skip empty lines.
This Value::notEmpty function has the following two parameters (comma separated):
The value which will be checked, typically an order/job variable.
The vallue that will be inserted.
The following sample will insert the value of the fcShippingAddress2 order variable with the <br>
tag if the fcShippingAddress2 contains a value:
[Value::notEmpty(%fcShippingAddress2%,%fcShippingAddress2%<br>)]
repeatJobs: This function has a tag structure and is used to repeat the HTML code surrounded
by these tags for every job in the order.
The following sample shows how a table row and is accompanying table cells are repeated for
every job:
[repeatJobs]
<tr>
<td class="id">@cJob@: %fnJobID%</td>
<td class="template">%fcTemplateName%</td>
<td class="quantity">@cQuantity@: %fnQuantity%</td>
<td class="price">[Value::replaceString(%fbQuote%,0=%cCurrency% %fnJobPrice
%,1=@cQuote@)]</td>
</tr>
[/repeatJobs]