Looking for a notation on invoices to show if customer is a returning customer
Hello all.
We are a long time user of shipworks and a while back we were able to add an alert on our invoices when specific shipping types were chosen (IE: EXPRESS).
Well now we are looking for a similar if/then statment to include in the invoice template which will put an alert on the invoice when the customer is a returning customer as we include different items in the box if they are returning and right now we have to manually look each one up.
Does anyone have the syntax required to do this?
Here is the code used for the shipping one we use now
<!--SHIPPING ON TOP <center><font size="8"><strong>
<xsl:value-of select="$order/RequestedShipping" /></strong></font></center><br />-->
<table align="center" width="680" border="0" cellpadding="1">
<xsl:if test="$order/RequestedShipping='USPS Rush Express Mail'">
<tr>
<td colspan="2" style="border:0pt; text-align:center;">
<font style="font-size:26pt; font-weight:bold;">EXPRESS EXPRESS EXPRESS</font>
<BR /><BR />
</td>
</tr>
<BR />
</xsl:if>
<xsl:if test="$order/RequestedShipping='USPS Rush Express Mail.'">
<tr>
<td colspan="2" style="border:0pt; text-align:center;">
<font style="font-size:26pt; font-weight:bold;">EXPRESS EXPRESS EXPRESS EXPRESS</font>
<BR /><BR />
</td>
</tr>
<BR />
</xsl:if>
<xsl:if test="$order/RequestedShipping='USPS Express Mail Rush'">
<tr>
<td colspan="2" style="border:0pt; text-align:center;">
<font style="font-size:26pt; font-weight:bold;">EXPRESS EXPRESS EXPRESS EXPRESS</font>
<BR /><BR />
</td>
</tr>
<BR />
</xsl:if>
<xsl:if test="$order/RequestedShipping='First Class Mail International'">
<tr>
<td colspan="2" style="border:0pt; text-align:center;">
<font style="font-size:26pt; font-weight:bold;">INTERNATIONAL INTERNATIONAL</font>
<BR /><BR />
</td>
</tr>
<BR />
</xsl:if>
<xsl:if test="$order/RequestedShipping='First Class Mail To Canada'">
<tr>
<td colspan="2" style="border:0pt; text-align:center;">
<font style="font-size:26pt; font-weight:bold;">CANADA CANADA CANADA CANADA CANADA </font>
<BR /><BR />
</td>
</tr>
<BR />
</xsl:if>-->
<tr>
-
Sure!
To achieve this, we will use the
xsl:if
statement to check if the value of<xsl:value-of select="Customer/Summary/OrdersPlaced" />
is greater than 1. If the condition is true, we will display "Returning Customer".Here is the XSLT code to accomplish this:
<!-- Check if Customer has placed more than 1 order --> <xsl:if test="Customer/Summary/OrdersPlaced > 1"> <xsl:text>Returning Customer</xsl:text> </xsl:if>
Please sign in to leave a comment.
Comments
2 comments