The FoxyCart receipt is much like the checkout in terms of how it can be customized, but obviously the function of the receipt is to display the information about the successful transaction that just took place on the checkout. While it might sound rather dull, the receipt is actually quite an exciting place to be, for a few reasons:
While you may not need to ever touch the receipt, it is important to understand how it functions so that you can be prepared if you do need to track marketing activities in the future.
The receipt will generally contain nearly all the information about a transaction, with a few exceptions. The information displayed is grouped into a few containers on the receipt.
The receipt happens after the checkout, but it's worth noting that the datafeed happens before the receipt is loaded. So by the time the receipt is loaded, the datafeed has already been sent to your endpoint (if configured).
Also worth noting is that you can configure the “continue” link that's displayed on the receipt in your store's “settings” page. If the continue link is not explicitly set in your store's settings it will use the most recent referring page (ie. the last page that the customer visited before the cart or checkout). If you'd like to set the href
of that link dynamically you can do so with a bit of javascript and the JSON cart object, which is available on the receipt.
The receipt can be revisited by your customers (or by store admins for viewing or printing orders) using the receipt's unique URL. Here's a quick example, showing a downloadable product in addition to non-downloadable products.
The URL to the receipt is available via the ^^receipt_url^^
placeholder in your email receipts, and in the responses you'll get from the API and the datafeed. You can also get the URL from the “print” link in your FoxyCart admin's transaction history view, which may be the easiest way if you just want to view a past transaction.
Note: the entire receipt template is optional. You can just use the checkout template if you like.
^^receipt^^
^^checkout^^
may also be used, and behaves identically to ^^receipt^^
.^^cart^^
^^store_domain^^
^^store_name^^
All analytics and order tracking scripts should be placed inside of ^^receipt_only_begin^^
and ^^receipt_only_end^^
tags. If tracking scripts are not placed within these tags they could be loaded multiple times, causing the data collected to be inaccurate.
^^receipt_only_begin^^
^^receipt_only_end^^
^^order_id^^
^^subtotal^^
^^subtotal_with_tax^^
^^order_total^^
^^analytics_google_ga_async^^
_addTrans()
, _addItem()
, and _trackTrans()
for the asynchronous Google Analytics approach, outlined here.^^analytics_google_ga^^
^^analytics_google_urchin^^