Adding customization values to the Job Ticket - xmpie-users/uStore-js GitHub Wiki

The uStore Admin application has a feature that allows you to download or print a job ticket for each item in an order:

Alt

While the job ticket includes a lot of information required for printing the job (eg properties), for dynamic products it does not list the customization values that the user entered when ordering the product (eg the firstname and lastname entered for a business card).

You can create a new message template SQL to get these values, and add them to the message template. Below are the instructions:

Create a new Message Template SQL

  1. Login to uStore admin
  2. Click Presets -> System Setup -> Message Template SQL -> Add new
  3. Enter the new SQL as shown below, and click to save:

Alt

For copy/paste the SQL is listed below:

exec('SELECT DC.FriendlyName, OPDV.DialValue FROM OrderProductDialValue AS OPDV INNER JOIN Dial AS D ON OPDV.DialID = D.DialID INNER JOIN Dial_Culture AS DC ON D.DialID = DC.DialID WHERE OPDV.OrderProductID = ' + @OrderProductId + ' AND OPDV.CultureID = ' + @CultureId + ' AND DC.CultureID = ' + @CultureId + ' AND D.DialTypeID <> 11')

Modify the Job Ticket Message Template

  1. Click Presets -> System Setup -> Message Template
  2. Move to page 3 (or filter the list to select the template by name "Create printed job ticket on new order creation" or id "27")
  3. Click the edit (pen) icon next to Message Template ID 27.
  4. Click the "Edit Localized text" button.
  5. Click the edit (pen) icon next to the language version you want to edit (English US = Culture ID = 1).
  6. In the Message Body text area, take a backup copy of the current message template in case you need to go back to the default message in future.
  7. Make the Text area larger so it is easier to see where we need to insert the extra code.
  8. Search for "Components Properties". We will insert the extra code before this section.
  9. Place the cursor in the text after the </xsl:if> and before the
  10. Paste in the code shown below, and change "Product Customizations" text to the words needed in the language you are editing:

Alt

<!--Product Customizations--><tr class="trProductCustomizations"><td colspan="2"><div class="tblTitle">Product Customizations</div><table  class="tblRegion"><xsl:for-each select="//Sqls/Customizations/Row"><tr><td class="dataName"><xsl:value-of select="FriendlyName"/></td><td class="dataValue"><xsl:value-of select="DialValue"/></td></tr></xsl:for-each></table></td></tr>

End result

After adding the SQL and editing the message template, the product customization values will appear in the Job Ticket:

Alt

⚠️ **GitHub.com Fallback** ⚠️