Naslag meldingsvariabelen

Meldingen die vanuit je winkel worden verzonden, worden weergegeven met behulp van Liquid. Liquid is de eenvoudige, gebruiksvriendelijke programmeertaal van Shopify. Het is dezelfde programmeertaal waarop thema's uit de Theme Store zijn gebaseerd.

Als je de meldingen wilt bewerken die vanuit je winkel worden verzonden, kun je basisaanpassingen uitvoeren in je meldingstemplates.

Voor hulp bij geavanceerdere wijzigingen of om wijzigingen in aangepaste meldingstemplates aan te brengen, kun je op onze forums contact opnemen met de community of je kunt een Shopify Expert inhuren om je aanpassingen uit te voeren. Meer informatie over het inhuren van Shopify Experts.

Hier is een lijst met Liquid-meldingstemplates die je via het Shopify-beheercentrum kunt aanpassen:

  • Afgebroken checkouts
  • Contact opnemen met de klant
  • Uitnodiging voor klantaccount
  • Verwelkoming klantaccount
  • Wachtwoord van klantaccount opnieuw instellen
  • Conceptbestellingsfactuur
  • Verzoek afhandelen
  • Cadeaubon gemaakt
  • Nieuwe bestelling
  • Nieuwe bestelling (mobiel)
  • Factuur van bestelling
  • Bestelling geannuleerd
  • Bestelbevestiging
  • POS en mobiele ontvangst
  • Terugbetaling van bestelling
  • Verzendgegevens
  • Verzendingsupdate

Alle templates in het Shopify-beheercentrum hebben toegang tot de eigenschappen van hun bijbehorende bestelling.

Besteleigenschappen

Veel eigenschappen van een bestelling zijn direct beschikbaar via Liquid, in templates en in aanvullende scripts.

De eigenschappen van een bestelling zijn beschikbaar in de volgende templates:

  • Bestelbevestiging
  • Nieuwe bestelling
  • Nieuwe bestelling (mobiel)
  • Factuur van bestelling
  • Verzendgegevens
  • Verzendingsupdate
  • Aanvullende scripts
  • Verzoek afhandelen
Beschrijving van de besteleigenschappen
Eigenschappen Beschrijving
id

Een systeembrede, unieke ID van de bestelling voor intern gebruik. Gebruik het volgende voorbeeld om een link naar de bestelling te genereren in het beheergedeelte van je winkel. In het template Nieuwe bestelling kun je de volgende code toevoegen:

<a href="{{ shop.url }}/admin/orders/{{ id }}">Bestelling bekijken</a>
email
De e-mail die aan de bestelling is gekoppeld.
name

Meestal is dit een hekje gevolgd door het order_number.

Voorbeeld: #1004

order_name
Hetzelfde als de naam.
order_number

Voor de winkel uniek nummer van de bestelling, zonder het voorvoegsel #, of een voorvoegsel of achtervoegsel dat de winkeleigenaar aan de bestellings-ID heeft toegevoegd in hun winkelvoorkeuren.

Bijvoorbeeld: 1004.

created_at

De datum en tijd waarop de klant de bestelling heeft gemaakt. Je kunt dit opmaken met behulp van het datumfilter.

Voorbeeld: 2009-05-30T17:43:51+02:00

payment_terms

Betalingsvoorwaarden bepalen de datum waarop voor een bestelling moet worden betaald.

Meer informatie over het toevoegen van betalingsvoorwaarden aan facturen.

Voor meer informatie, raadpleeg je de Liquid-naslagdocumentatie voor payment_terms.

tags Retourneert een matrix van alle tags van de bestelling. De tags worden in alfabetische volgorde geretourneerd. Raadpleeg onze Liquid-naslagdocumentatie voor meer informatie.
transactions Retourneert een matrix van transacties van de bestelling.
tax_price
De gecombineerde belastingen van alle artikelen in de bestelling.
tax_lines

Belastingen ingedeeld in types:

{% for tax_line in tax_lines %} {{ tax_line.title }} ({{ tax_line.rate_percentage }}%) : {{ tax_line.price | money_with_currency }} {% endfor %}
tax_line.title

De naam van de belasting.

Voorbeelden: QST of btw

tax_line.price
Het bedrag.
tax_line.rate
Het tarief. Als het 17,5% is, wordt 0,175 geretourneerd.
tax_line.rate_percentage
Het belastingtarief in een voor mensen leesbare vorm. Als het 0,175 is, wordt 17,5 geretourneerd.
customer
Klantobject met de attributen van de klantuitvoer.
billing_address
Het factuuradres.
billing_address.first_name
Voornaam van de klant.
billing_address.last_name
Achternaam van de klant.
billing_address.company
Bedrijfsnaam voor facturering.
billing_address.phone
Telefoonnummer voor het factuuradres.
shop.name
Naam van je winkel.
shop.phone
Telefoonnummer van je winkel.
subtotal_price
Som van de regelitemprijzen van de bestelling na aftrek van regelitemkorting of winkelwagenkorting. Het subtotaal omvat geen belastingen (tenzij belastingen zijn inbegrepen in de prijzen), verzendkosten of tips.
discounts
Een lijst met kortingen.
discounts_amount

Het bedrag van de korting dat door alle kortingen wordt toegepast.

Voorbeeld: + $ 5,00

discounts_savings

Het bedrag van de besparingen dat door alle kortingen wordt veroorzaakt.

Bijvoorbeeld: -$ 5,00

total_price

Totaal van de bestelling (subtotaal + verzendkosten - verzendkorting + belasting).

financial_status
De huidige betalingsstatus. Eén van het volgende: nil, in behandeling, geautoriseerd, betaald, ongeldig, terugbetaald.
requires_shipping
(Booleaans) Retourneert true als ten minste één artikel in de bestelling moet worden verzonden.
shipping_method.title

De naam van het verzendtarief.

Voorbeeld: Standard Shipping

shipping_method.price

De verzendprijs inclusief eventuele verzendkorting.

Voorbeeld: {{ shipping_method.price | money }}

shipping_price

De verzendkosten.

Voorbeeld: {{ shipping_price | money }}

shipping_address
Het bezorgadres.
shipping_address.first_name
Voornaam voor het bezorgadres.
shipping_address.company
Bedrijfsnaam voor het bezorgadres.
shipping_address.phone
Telefoonnummer voor het bezorgadres.
line_items
Lijst van alle orderregels in de bestelling.
item_count
Som van alle hoeveelheden van de artikelen.
fulfillment_status
De huidige fulfilmentstatus van de bestelling. Eén van de volgende: openstaand, gedeeltelijk afgehandeld, afgehandeld.
note
De aantekening die bij de bestelling is gevoegd. De aantekening kan worden verkregen van de klant en/of worden bewerkt op het scherm met bestelgegevens in de beheerdersinterface.
attributes

Alle attributen die aan de bestelling zijn gekoppeld.

Voorbeeld: {{ attributes.gift-note }}

referring_site

Bevat de URL van de verwijzer die de klant naar je winkel heeft gebracht.

Voorbeeld: https://www.google.com/?s=great+products

landing_site

Bevat het pad van de bestemmingssite die de klant heeft gebruikt. Dit is de eerste pagina die de klant zag toen hij de winkel bereikte.

Voorbeeld: /products/great-product?ref=my-tracking-token

landing_site_ref

Kijkt naar de bestemmingssite en extraheert er een verwijzingsparameter uit. Verwijzingsparameters kunnen zijn: ref, source, r.

Als de landing_site /products/great-product?ref=my-tracking-token is, dan is de landing_site_ref my-tracking-token. Je kunt een bepaalde actie uitvoeren als je ref gelijk is aan een bepaalde waarde:

{% if landing_site_ref == 'my-tracking-token' %} Mijn actie... {% endif %}
cancelled
(Booleaans) Retourneert true als de bestelling is geannuleerd.
cancelled_at
De tijd waarop de bestelling is geannuleerd.
cancel_reason
De reden die is geselecteerd bij het annuleren van de bestelling. Eén van het volgende: voorraad, klant, geweigerd, fraude, anders.
has_high_risks?
(verouderd)

Retourneert true als de bestelling een hoog risico heeft

unique_gateways

Retourneert een lijst met unieke betalingsproviders voor een bestelling. Als iemand bijvoorbeeld heeft betaald met een Visa-kaart, een Mastercard en contant, zou dit de geretourneerde lijst zijn: shopify_payments, cash.

location (POS only)

Toont de fysieke locatie van de bestelling. Er zijn verschillende locatie-eigenschappen beschikbaar, die hier worden vermeld. In het gedeelte Locaties van de beheerder kun je locaties configureren.

order_status_url

Retourneert de link naar de bestelstatuspagina voor deze bestelling.

fulfilled_line_items
(verouderd)
Lijst met orderregels die zijn afgehandeld.
unfulfilled_line_items
(verouderd)
Lijst met orderregels die niet volledig zijn afgehandeld.
b2b?

Returns true if the order is a B2B order. Use the property with B2B variables to display relevant information, such as the company name, company location, and address in emails. For example, on B2B orders, you might add a header to a template with the following information:

{% if b2b? %}
        <p> Customer: {{ customer.name }}
        <p> Company: {{ company.name }}
        <p> Location: {{ company_location.name }}
      {endif%}
      
company

The company that you’re selling to on a B2B order.

company.name

The name of the company on a B2B order.

company.id

The ID of the company on a B2B order.

company_location

The location of the company on a B2B order. A company that buys from you can have more than one location.

company_location.name

The name of the company location on a B2B order.

company_location.id

The ID number of the company location on a B2B order.

company_location.shipping_address

The shipping addressof the company location on a B2B order.

company_location.billing_address

The billing addressof the company location on a B2B order.

Draft order properties

Draft order properties are available on the Draft Order Invoice email template, which notifies your customers about outstanding invoices.

Description of draft order properties
Property Description
id
A unique ID of the draft order for internal use.
invoice_url
A link the customer can follow to pay for the invoice using Shopify's secure checkout.
reserve_inventory_until

The date and time the line items in the draft are reserved until, for example, 2015-05-30T17:43:51+02:00.

You can format dates using the Liquid date filter.

user
The last staff who modified the draft order.
user.name
The name of the last staff who modified the draft order.
user.email
The email address of the last staff who modified the draft order.
email
The email address associated with the draft order.
name
The unique number of the draft order, prefixed by a number sign #.
number
The unique number of the draft order without the order prefix or suffix.
created_at

The date and time the customer created the draft order, for example, 2009-05-30T17:43:51+02:00.

You can format dates using the Liquid date filter.

tags Returns an array of all of the order's tags. The tags are returned in alphabetical order. Please see our Liquid reference documentation for more details.
tax_price
The combined taxes of all the items in the draft order.
tax_lines

Taxes broken up by type of tax:

{% for tax_line in tax_lines %}
{{ tax_line.title }} ({{ tax_line.rate_percentage }}%) : {{ tax_line.price | money_with_currency }}
{% endfor %}
tax_line.title

The name of the tax.

Examples: QST or VAT

tax_line.price
The tax amount.
tax_line.rate
The tax rate in decimal form. For example, a tax rate of 17.5% will return 0.175.
tax_line.rate_percentage
The tax rate in percentage form. For example, a rate of 0.175 will return 17.5.
customer
Customer object containing the attributes of the customer output.
billing_address
The billing address for the draft order.
billing_address.first_name
The customer's first name.
billing_address.last_name
The customer's last name.
billing_address.company
The company name in the billing address.
billing_address.phone
The phone number in the billing address.
shop.name
The name of your store.
shop.phone
Your store's phone number.
subtotal_price
Sum of the draft order's line-item prices after any line-item discount or cart discount has been deducted. The subtotal doesn't include taxes (unless taxes are included in the prices) or shipping costs.
discounts
A list of discounts.
discounts_amount

Amount of the discount applied by all discounts.

Example: +$5.00

discounts_savings

Amount of the savings caused by all discounts.

Example: -$5.00

total_price
The total price of the order (subtotal + shipping cost - shipping discount + tax).
requires_shipping
Returns true if there is at least one item in the draft order that requires shipping. Returns false if no items in the draft order require shipping.
shipping_method.title

The Shipping rate name.

Example: Standard Shipping

shipping_method.price
The price of the shipping method. Returns the same information as shipping_price.
shipping_price

The shipping price.

You can format this amount using Liquid money filters.

shipping_address

The shipping address.

Note: Unlike in regular orders, a draft order's shipping address may be incomplete.

shipping_address.first_name
The first name for the shipping address.
shipping_address.company
The company name in the shipping address.
shipping_address.phone
The phone number in the shipping address.
line_items
A list of all line items in the draft order.
item_count
A sum of all the item quantities in the draft order.
note
The note attached to the draft order. The note can be obtained from the customer and also edited in the draft order detail screen in your Shopify admin.
location

The physical location of the order. There are several location properties available.

You can configure locations in the Locations page of your Shopify admin.

b2b?

Returns true if the order is a B2B order. Use the property with B2B variables to display relevant information, such as the company name, company location, and address in emails. For example, on B2B orders, you might add a header to a template with the following information:

{% if b2b? %}
        <p> Customer: {{ customer.name }}
        <p> Company: {{ company.name }}
        <p> Location: {{ company_location.name }}
      {endif%}
      
company

The company that you’re selling to on a B2B order.

company.name

The name of the company on a B2B order.

company.id

The ID of the company on a B2B order.

company_location

The location of the company on a B2B order. A company that buys from you can have more than one location.

company_location.name

The name of the company location on a B2B order.

company_location.id

The ID number of the company location on a B2B order.

company_location.shipping_address

The shipping addressof the company location on a B2B order.

company_location.billing_address

The billing addressof the company location on a B2B order.

Line item properties

Each line in the list of line_items or subtotal_line_items has the following properties.

Description of line item properties
Property Description
line.applied_discounts
(POS and draft orders only)
List of discounts applied to this item (each discount has the title, code, amount, savings and type properties).
line.custom
(Draft orders only)
(boolean) Returns true if the item is a custom line item for a draft order.
line.grams
Weight of a single item.
line.image
Returns the URL of the image associated with this line item. You can also use the img_url filter to get specific image sizes, for example {{ line.image | img_url: 'small' }}
line.line_price
The price multiplied by the quantity for that item.
line.original_line_price
The combined price of the quantity of items included in the line, before discounts were applied.
line.final_line_price
The combined price of all the items in the line item, including all line level discount amounts.
line.price
The price for a single item.
line.product.metafields

The Metafields at the product level. Use the following syntax:

line.product.metafields.NAMESPACE.KEY

line.product.title
The name of the product.
line.product.vendor
The vendor for the item.
line.properties
Returns an array of custom information for an item. Line item properties are specified by the customer on the product page, before adding a product to the cart.
line.quantity
Quantity for that item.
line.requires_shipping
(boolean) Returns true if the variant for the item has the checkbox This is a physical product checked on the product page.
line.selling_plan_allocation
Returns a selling_plan_allocation object, which describes how a selling plan such as a subscription impacts the line item.
line.taxable
(boolean) Returns true if the variant for the item has the checkbox 'Charge taxes on this product' checked on the product page.
line.title
The name of the product followed by a dash followed by the name of the variant. The variant name isn't included when it is “Default Title”.
line.url
The relative URL of the line item's variant. The relative URL doesn't include your store's root URL (mystore.myshopify.com).
line.line_item.variant.barcode
The barcode associated with the product variant.
line.variant.compare_at_price
The compare at price associated with the product variant.
line.variant.image
The image for the product variant. Only returns an image if there is a specific image assigned to the variant in the line item.
line.variant.metafields

The Metafields at the variant level. Use the following syntax:

line.variant.metafields.NAMESPACE.KEY

line.variant.sku
The SKU associated with the product variant.
line.variant.title

The variant's option values, joined by / characters.

Example: small / red

line.refunded.quantity 
      
(within refund notifications)

The quantity of an item to be refunded. You can use this property to add an identifier to refunded items in an order.

For example: {% if line.refunded_quantity > 0 %}Refunded line identifier{% endif %}

Refunds properties

These additional properties are available on the Refunds email template. This email template is used to notify your customers that a refund (complete or partial) has been applied to their order. You can use any variable available for the Order email notification template, in addition to the following variables:

Description of refunds properties
Property Description
amount
The amount of money refunded.
refund_line_items
A list of refund line items to be refunded.

Refund_line_item properties

Each refund_line in the list of refund_line_items has the following properties:

Description of refund line item properties
Property Description
refund_line.line_item
The line_item that is being refunded. This has access to all the line_item’s properties.
refund_line.quantity
The quantity of the line item to be refunded.

Fulfillment properties

These additional properties are available on the Shipping confirmation, Shipping update and Fulfillment request email templates.

The Shipping confirmation and Shipping update are used to notify your customers that some or all items in their order have been successfully fulfilled, or updated with new shipping information.

The Fulfillment request email template is used for any custom fulfillment service defined in your shop admin. To add a custom fulfillment service, go to Settings > Shipping and scroll down to Fulfillment/Dropshipping.

Description of fulfillment properties
Property Description
service_name
The name of the custom service as defined in the Settings > Shipping page. (Fulfillment request only)
fulfillment.estimated_delivery_at
An estimated delivery date based on the tracking number (if available) provided by one of the following carriers: USPS, FedEx, UPS, Canada Post (Canada only). This property is only available when carrier-calculated rates are in use.
fulfillment.fulfillment_line_items
A list of fulfillment line items to be fulfilled.
fulfillment.item_count
A sum of all the items' quantities. The total number of items being fulfilled.
fulfillment.requires_shipping
(boolean) Returns true if this fulfillment request requires shipping.
fulfillment.tracking_company
The company doing the tracking.
fulfillment.tracking_numbers
A list of tracking numbers.
fulfillment.tracking_urls
A list of tracking URLs.
items_to_fulfill
(deprecated)
A list of line items that are to be fulfilled by this particular custom fulfillment service. (Fulfillment request only)
items_to_fulfill_count
(deprecated)
The total number of items to be fulfilled by this request. (Fulfillment request only)

Fulfillment_line_item properties

Each fulfillment_line in the list of fulfillment_line_items has the following properties.

Description of fulfillment line item properties
Property Description
fulfillment_line.line_item
The line_item being fulfilled. This has access to all the line_item's properties.
fulfillment_line.quantity
The quantity of the line item that is being fulfilled.

Delivery properties

Description of delivery properties
Property Description
delivery_instructions
Local delivery information to share with the customer. This information is controlled by the Delivery information field in your local delivery settings.
consolidated_estimated_delivery_time
Order delivery dates information to share with the customer. This information is controlled by the Processing time setting that you set up in your Shipping and delivery page.

Discount properties

There are two types of discount properties.

discount_applications describe why and how an item was discounted.

discount_allocations describe how a particular discount affects a line item and how it reduces the price. You should use this property at the line item level.

You can combine these properties to display discount information at the line item or order level.

Example

This example checks if a discount has been applied to the line item. If the discount wasn't applied at the order level (all), then the discount name and amount are displayed.

{% if line.discount_allocations %}
    {% for discount_allocation in line.discount_allocations %}
        {% if discount_allocation.discount_application.target_selection != 'all' %}
            {{ discount_allocation.discount_application.title | upcase }}
            (-{{ discount_allocation.amount | money }})
        {% endif %}
    {% endfor %}
{% endif %}

The result might look like this:

SPRING5 (-$5.00)

Discount_allocation properties

Each discount_allocation in the list of discount_allocations has the following properties.

Description of discount_allocation properties
Property Description
discount_allocation.amount
The amount of money saved by the customer on a line item. Must be entered in a loop if you want to allow multiple discount codes.
discount_allocation.discount_application
The discount application that allocates the amount on the line item.

Discount_application properties

Each discount_application in the list of discount_applications has the following properties.

Description of discount_application properties
Property Description
discount_application.target_selection

Describes how a discount selects line items in the cart to be discounted. One of:

  • all: The discount applies to all line items.
  • entitled: The discount applies to a particular subset of line items, often defined by a condition.
  • explicit: The discount applies to a specifically selected line item or shipping line.
discount_application.target_type
The type of item that a discount applies to (line_item or shipping_line).
discount_application.title

The customer-facing name of the discount.

Examples: Welcome10 or CBBWQQAKYBYY

discount_application.total_allocated_amount
The total amount that the price of an order is reduced by the discount.
discount_application.type
The type of the discount. One of: automatic, discount_code, manual, or script.
discount_application.value
The value of the discount.
discount_application.value_type
The value type of the discount. One of: fixed_amount or percentage.

Email notification properties

Description of email notification properties
Property Description
shop.email_logo_url
The url for the logo specified in the Customize email templates section of the admin.
shop.email_logo_width
The logo width (pixels) specified in the Customize email templates section of the admin.
shop.email_accent_color
The HEX code for the accent color specified in the Customize email templates section of the admin.

Klaar om te beginnen met verkopen met Shopify?

Probeer het gratis