Ecommerce Ticket Print Templates

Follow

Print Templates in Agility Ecommerce allow you to generate tickets that can be scanned using the Redemption app.

How They Work

When defining Tickets in Ecommerce, you can select a Template to be used for that Ticket when generating a scannable-ticket. This generated ticket can then be retrieved via the Ecommerce API Download Voucher method or directly in the Content Manager by selecting an Order that is in the Completed state and clicking the Print Vouchers button.

How to Create a Print Template

Print templates are created and managed within Ecommerce Settings and each template can be re-used across one or many different tickets.

  1. Login to Agility CMS and navigate to Ecommerce
  2. Under Ecommerce Settings, select Print Templates
  3. Click the New button to create a new template
  4. Enter a NameReference Name and Description for the ticket
  5. Enter a URL to use for your Background Image of the ticket
  6. Paste the following JSON into the Layout JSON field as a starting point and adjust accordingly
    {
    	"qrCode": {
    		"x": 42,
    		"y": 30,
    		"width": 350,
    		"height": 350
    	},
    	"textOverlays": [{
    			"text": "#OrderNum#",
    			"x": 225,
    			"y": 486,
    			"height": null,
    			"width": null,
    			"style": "normal"
    		}, {
    			"text": "#ProcessedDate#",
    			"x": 525,
    			"y": 486,
    			"height": null,
    			"width": null,
    			"style": "normal"
    		},{
    			"text": "#OrderNum#-#TicketID#-#MeasureID#-#PageNumber#",
    			"x": 1188,
    			"y": 486,
    			"height": null,
    			"width": null,
    			"style": "normal"
    		},{
    			"text": "#ItemSku#",
    			"x": 90,
    			"y": 625,
    			"height": null,
    			"width": null,
    			"style": "normal"
    		}, {
    			"text": "#ItemDescription#",
    			"x": 438,
    			"y": 625,
    			"height": 150,
    			"width": 970,
    			"style": "normal"
    		}, {
    			"text": "#CardType#",
    			"x": 390,
    			"y": 816,
    			"height": null,
    			"width": null,
    			"style": "normal"
    		}, {
    			"text": "#TicketImportantNote#",
    			"x": 80,
    			"y": 950,
    			"height": 250,
    			"width": 1500,
    			"style": "normal"
    		}
    
    	],
    	"ads": [],
    	"styles": [{
    		"name": "normal",
    		"family": "Segoe UI",
    		"emSize": "24",
    		"style": "normal",
    		"colour": "#000000"
    	}, {
    		"name": "bold",
    		"family": "Segoe UI",
    		"emSize": "24",
    		"style": "bold",
    		"colour": "#000000"
    	}]
    }

The JSON is broken into these sections:

  • qrCode  - describes where the QR Code will be placed
  • textOverlays – this is an array of field placements. You can use a combination of text and field codes in the “text” property.
  • styles – describes the different styles that are used for each textOverlay.  Each style has a name, font family, size, text style, and colour.

How to Test

We recommend setting up a test Ticket that uses the print template you want to test. Then, you can create an Order that uses this ticket. Complete the order and you should see a Print Vouchers button. Click to view the generated ticket(s).

 

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.