A template used for creating receipts in PDF format.

Kuvaus

PDF printout templates are now PDF themes.

From now on, the HTML templates for PDF printouts are defined in PDF themes, which are separate from the store theme. PDF themes are installed in the store's themes/print folder.

Any PDF templates included in the store themes will continue to function. However, we recommend you to create a designated PDF theme out of the printouts as soon as possible.

The store's admin can print the receipt manually in the admin panel on the order page. Additionally, you can add the {OderDownloadReceipt} tag to templates for order emails to enable the customers to download the receipt directly from order emails.

To include the list of ordered products on the receipt, use simply the {ReceiptProducts} tag.

You can see the template's HTML output in the admin panel by defining the page's URL address in the following way:

/flow/kuitti.php?t=receipt&tilaus=ORDERNUMBER&pdf=false

The template's HTML file is converted intothe PDF format by using the Prince XML program, which has a robust CSS support and, to some extent, supports JavaScript as well.

To see instructions for designers, check the program's user guide.

Read more about formatting PDF printouts in MyCashflow.

Sivupohjan ominaisuudet

Sivupohjan sijainti
themes/print/THEME/receipt.html
Sivupohjan URL
The printouts do not have a URL address.
Asetettu näkyvyys

Toteutus oletusteemassa

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{%Receipt} {OrderNumber}</title>

<link rel="stylesheet" type="text/css" href="{ThemeUrl}/css/printables.css?date=20170803" />

</head>

<body>

	<div id="ReceiptHeader">
		<div id="Logo">
			{Logo}
		</div>
		<div id="ReceiptTitle">
			<h4>{ShopName}</h4>
			<h1>{%ReceiptForOrder} {OrderNumber}</h1>
		</div>
	</div>

	<div id="InfoWrapper">
		<div id="ShippingAddress">
			{OrderShippingCompany(after:'<br />')}
			{OrderShippingName(after:'<br />')}
			{OrderShippingAddress(after:'<br />')}
			{OrderShippingZip}
			{OrderShippingCity(after:'<br />')}
			{OrderShippingCountry}
		</div>
		<div id="OrderInfo">
			<dl>
				<dt>{%CheckoutCustomerInformation}</dt>
				<dd>{OrderCustomerInformation}</dd>
			</dl>
			{OrderInfo}
		</div>
	</div>

	{OrderProducts(
		before: '
			<div id="PrintProducts">
				<table>
					<thead>
						<tr>
							<th scope="col" class="CartProduct">{%Product}</th>
							<th scope="col">{%ShippingDate}</th>
							<th scope="col">{%Quantity}</th>
							<th scope="col">{%Price}</th>
							<th scope="col" class="CartTotal">{%Total}</th>
						</tr>
					</thead>
					<tbody>
		',
		helper: '{{
			<tr>
				<th class="CartProduct">
					<h3>
						{OrderProductName}
						{OrderProductVariation(before: ' <br /><em class="ProductVariation">',after:'</em>')}
						{OrderProductDownloadLink(before: ' <br /><span style="font-weight: normal;">{%ProductDownload}: </span><strong class="ProductDownloadLink">',after:'</strong>')}
					</h3>
					{OrderProductCode(
						before: '<dl><dt>{%ProductCode}</dt><dd>',
						after: '</dd></dl>'
					)}
					{OrderProductWarranty(
						before: '<dl><dt>{%Warranty}</dt><dd>',
						after: '&nbsp;{%Months}</dd></dl>'
					)}
					{OrderProductChoices}
				</th>
				<td>{OrderProductShippingStatus}</td>
				<td>{OrderProductQuantity}</td>
				<td>
					{OrderProductPrice(
						after: '<br><small>{%VAT}&nbsp;{OrderProductTaxRate(after:'%')}</small>',
						before: '{OrderProductComparePrice(before: '<span style="color: #888; text-decoration: line-through;">', after: '</span>')}&ensp;'
					)}
				</td>
				<td class="CartTotal">
					{OrderProductTotal(
						after: '<br><small>{OrderProductTotalTax}</small>'
					)}
				</td>
			</tr>
		}}',
		after: '
					</tbody>
					<tfoot>
						<tr class="CartTotal">
							<th scope="row" colspan="4">{%CheckoutProductsTotal} <br><small>{%VAT} {OrderTaxRate(after:'%')}</small></th>
							<td class="CartTotal">
								{OrderSubTotal}<br>
								<small>{OrderSubtotalTax}</small>
							</td>
						</tr>
						{OrderShippingCosts(
							before: '<tr class="CartTotal"><th scope="row" colspan="4">{%ShippingCosts}: {OrderShippingMethod}<br><small>{%VAT}&nbsp;{OrderShippingCostsTaxRate(after:'%')}</small></th><td class="CartTotal">',
							after: '<br><small>{OrderShippingCostsTax}</small></td></tr>'
						)}
						{OrderPaymentCosts(
							before: '<tr class="CartTotal"><th scope="row" colspan="4">{%PaymentCosts}: {OrderPaymentMethod}<br><small>{%VAT}&nbsp;{OrderPaymentCostsTaxRate(after:'%')}</small></th><td class="CartTotal">',
							after: '<br><small>{OrderPaymentCostsTax}</small></td></tr>'
						)}
						<tr class="CartTotal" id="FullTotal">
							<th scope="row" colspan="4">{%Total} <br><small>{%VAT} {OrderTaxRate(after:'%')}</small></th>
							<td class="CartTotal">
								{OrderTotal}<br>
								<small>{OrderTax}</small>
							</td>
						</tr>
					</tfoot>
				</table>
			</div>
		'
	)}

	<div id="VatInfo">
		{OrderTotalsByTaxRate}
		{OrderVATDescription}
	</div>

	<div id="ReceiptContact">
		<p id="PrintContactAddress">
			{ContactCompany}
			{ContactBusinessID(
				before: ' (',
				after: ')'
			)}
			<br>
			{ContactStreetAddress1(
				after: '{ContactStreetAddress2(before: ',&ensp;')}'
			)}
			<br>
			{ContactZip} {ContactCity(after:',&ensp;')} {ContactCountry}
		</p>
		<p id="PrintContactElectrical">
			{ContactEmail(after:'<br>')}
			{ContactInternet(after:'<br>')}
			{ContactPhone(after:'<br>')}
		</p>
		<div id="PrintBanner">
			{Banners(
				name: 'print',
				sort: 'random',
				limit: 1,
				helper: '{{
					{BannerText}
				}}'
			)}
		</div>
	</div>

</body>
</html>