Documentation You are here: start » v » 2.0 » receipt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v:2.0:receipt [2016/12/01 03:06] – [Revisiting the Receipt] adamv:2.0:receipt [2020/10/03 00:34] (current) – [Where the Receipt Fits Into the Order Flow] foxybrett
Line 18: Line 18:
   * General   * General
     * Payment gateway or processor response     * Payment gateway or processor response
-    * Your store's name (as configured in your store settings+    * Your store's name (as configured in your store settings)
     * The date and time     * The date and time
   * Order   * Order
Line 52: Line 52:
   - Back to your site.   - Back to your site.
  
-Also worth noting is that <wrap tip>you can configure the "continue" link</wrap> 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|JSON cart object]], which is available on the receipt.+Also worth noting is that <wrap tip>you can configure the "continue" link</wrap> 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). Or you can [[:v:2.0:snippets:change_continue_category|set the ''href'' of that link dynamically]]
  
 +===== Specifying a custom transaction ID for your store =====
  
 +By default, FoxyCart store transactions are assigned a unique numerical global transaction ID, which means that transaction ID's will most probably not be sequential within your store. You can enable custom ID's though that will be sequential and can be customised to a specific start number, length and prefix/suffix.
 +
 +To enable custom ID's for your store, navigate to the ''Advanced'' settings page, and check the ''enable a custom receipt display id'' option. This will provide a few options to customise the ID:
 +
 +  ; Start Value
 +  : **Description:** The starting number for the custom ID of the next transaction for your store. Setting this as ''1'' will cause the next transaction to have a custom display ID of ''1''. Once you start using a custom display ID, you can only change the start value to a higher number than the last custom display ID number used for a transaction on your store.
 +  : **Default:** ''1''
 +  ; Minimum Length
 +  : **Description:** Used to set the minimum total length of the auto-incrementing part of the display ID you'd like to have. The display ID will be padded with leading zeros as needed. For example, if you'd like your first display ID to be "00000001" enter a length of 8.
 +  : **Default:** ''1''
 +  ; Prefix
 +  : **Description:** A value to be appended to the start of the custom ID. For example, if you set the prefix to ''inv-'', your custom ID could look like ''inv-1''
 +  ; Suffix
 +  : **Description:** A value to be appended to the end of the custom ID. For example, if you set the prefix to ''_2017'', your custom ID could look like ''1_2017''
 +
 +\\
 +<WRAP center round info 90%>
 +Note that enabling the custom display ID's will only apply to new transactions placed after it's enabled. Any transactions placed while this setting was not enabled will simply have the default global transaction ID.
 +</WRAP>
 +
 +
 +==== Filtering by Custom ID in the Admin or API ====
 +
 +To look for transactions when using a custom display ID, you can use the "Display Id" filter in the admin's transactions report, or filter using ''display_id'' in the API.
 ===== Revisiting the Receipt ===== ===== Revisiting 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 [[https://foxycart-demo.foxycart.com/receipt?id=59bbe56d7e638c2d7beb6f9f4a94e683d64d9f1f4aa7325ea1043ca3d0cccab8|a quick example]], showing a downloadable product in addition to non-downloadable products. 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 [[https://foxycart-demo.foxycart.com/receipt?id=59bbe56d7e638c2d7beb6f9f4a94e683d64d9f1f4aa7325ea1043ca3d0cccab8|a quick example]], showing a downloadable product in addition to non-downloadable products.
Line 69: Line 94:
 {% if context == 'receipt' %} {% if context == 'receipt' %}
  
-    {% set candy true %} +    {% set hasWholesale false %}
     {% for item in items %}     {% for item in items %}
         {% if item.category == 'WHOLESALE' %}         {% if item.category == 'WHOLESALE' %}
-            {% set categoryFound false %}+            {% set hasWholesale true %}
         {% endif %}         {% endif %}
     {% endfor %}     {% endfor %}
  
-    {% if categoryFound %} +    {% if hasWholesale %} 
-<h1>Success!</h1>+        <h1>Success!</h1>
     {% endif %}     {% endif %}
  

Site Tools