Liqiud basics
Modules
API
Mailer
Orders
On this page
Overview
Below is a list of all the available drops on the Orders object
| Name | Description |
| orders.number | Order number |
| orders.item_total | Order items total cost |
| orders.shipment_total | Shipment total cost |
| orders.included_tax_total | Included tax total. Ex: VAT in Europe. |
| orders.additional_tax_total | Additional tax total. This is used if the store has after sales taxes. |
| orders.adjustments_total | Sum of all taxes and additional adjustments (not supported at the moment) |
| orders.pre_tax_total | Pre tax total |
| orders.after_tax_total | Same as total |
| orders.item_pre_tax_total | Item pre tax total |
| orders.item_after_tax_total | Same as item total |
| orders.shipment_pre_tax_total | Shipment pre tax total |
| orders.shipment_after_tax_total | Same as shipment_total |
| orders.discount_total | The total order discount applied to the order |
| orders.discount_additional_tax_total | The total order discount applied to the order with additional tax |
| orders.discount_included_tax_total | The total order discount applied to the order with included tax |
| orders.total | Order items + shipment cost |
| orders.payment_total | What the customer has paid |
| orders.weight_total | Total weight of all order_items product variant |
| orders.item_count | Number of items |
| orders.campaign_code | The campaign code of the order |
| orders.order_items | Array with OrderItemDrop |
| orders.campaign | CampaignDrop |
| orders.campaign? | Boolean: true or false |
| orders.has_campaign? | Alias for campaign? |
| orders.shipments | Array <ShipmentDrop> |
| orders.payment_method | Returns PaymentMethodDrop. Order payment method. |
| orders.has_shipping_option? | Boolean: true or false |
| orders.has_shipping_method? | Boolean: true or false |
| orders.shipping_option | Returns ShippingOptionDrop. Selected shipping option. |
| orders.dynamic_fields | DynamicFieldsDrop for order |
| orders.item_dynamic_fields | DynamicFieldsDrop for new order item |
| orders.order_strategy_errors | A list of the configured errors currently affecting the order; should be translated. |
| orders.order_strategy_errors? | If the order has any error configured errors at all |
| orders.strategy_max_total | Max total allowed by strategies |
| orders.strategy_max_item_total | Max item total allowed by strategies |
| orders.strategy_min_total | Min total allowed by strategies |
| orders.strategy_min_item_total | Min item total allowed by strategies |
| orders.comment_customer | A comment for the customer. This is applicable in the checkout but could be useful in an order history for the customer |
| orders.email | The email for order confirmations et cetera. |
| orders.email_cc | Any emails that should receive a cc of all order emails. |
| orders.email_bcc | Any emails that should receive a bcc of all order emails. |
The strategy_max_total, strategy_max_item_total, strategy_min_total and strategy_min_item_total values are not completely reliable, strategies have more possible behaviour than can be expressed by a single scalar. They assume that nothing other than the respective totals change which is often untrue, for instance a discount can be applied once a certain order total has been met. They are best guesses, for instance if a strategy applies to min_total and min_item_total is queried, the difference between the two will be accounted for; assuming it stays the same.
cart
CartDrop extends all functionality of an OrderDrop.
| Name | Description |
| exists? | Boolean: true or false |
| empty? | Boolean: true or false |
| url | Cart path |
| checkout_url | Checkout path |
| shipping_methods | Array with ShippingMethodDrop |
Webshop - Order notifications
Stock exceeded - alert
For non backorderable products Occurrence: When the requested quantity for a product or the existent quantity of the order item exceeds the stock quantity. See Quantity removed. Translation key: stock_exceeded Type: alert Available params:
| Name | Description |
| sku | The SKU of the product |
| id | Product id |
| variant_id | Variant id |
Translation example:
%{sku}: Requested quantity exceeds stock availability
Quantity removed - alert
For non backorderable products Occurence: When the requested quantity for a product or the existent quantity of the order item exceeds the stock quantity but there is a lesser amount in stock. The existent stock quantity is used instead. Translation key: quantity_removed Type: alert Available params:
| Name | Description |
| sku | Product SKU |
| id | Product id |
| variant_id | Variant id |
| removed_quantity | Number of removed quantity |
| old_quantity | Number of the old quantity |
| new_quantity | Number of the new quantity |
| quantity | The total number of quantity |
Translation example:
%{sku}: The quantity was changed from %{old_quantity} to %{new_quantity} due to stock availabilityNot available - alert
Occurrence: When the requested variant or the existent order item is no longer available. Not available variants are not listed in the webshop. This could be due to the product or variant being disabled or the 'available on' date being changed. Translation key: not_available Type: alert Available params:
| Name | Description |
| sku | Product SKU |
| id | Product id |
| variant_id | Variant id |
| quantity | Number of quantity |
Translation example:
%{sku}: The variant is no longer available.Not for sale - alert
Occurrence: When the requested variant or the existent order item is no longer for sale. Not for sale variants are still listed in the webshop. This is caused by changing the 'not for sale' setting of the associated stock. Translation key: not_for_sale Type: alert Available params:
| Name | Description |
| sku | Product sku |
| id | Product id |
| variant_id | Variant id |
| quantity | Number of quantity |
Translation example:
%{sku}: The variant is not available for sale in the webshop. Please contact the store for further information.Product backordered message - warning
Occurence: When the quantity of a product added to the cart exceeds the stock quantity. For backorderable products. Translation key: product_backordered_message Type: warning Available params:
| Name | Description |
| sku | SKU of product |
| id | Product id |
| variant_id | Variant id |
| quantity | Number of quantity |
| available_quantity | Number of the available quantity |
| out_of_stock_message | A translation message for the the product is out of stock |
| delivery_time_in_stock | Estimated delivery time for in stock |
| delivery_time_out_stock | Estimated delivery time for out of stock |
Translation example:
The product is not available in stock. Estimated delivery time: %{delivery_time_out_of_stock}.Variant removed - notice
Occurrence: When the variant/order item is removed from the card. Translation key: variant_removed Type: notice Available params:
| Name | Description |
| sku | Product sku |
| id | Product id |
| variant_id | Variant id |
Translation example:
%{sku} was removed from your order.Payment errors - alert
| Name | Description |
| invalid_payment_settings | Payment settings were not configured properly |
| invalid_payment_request | Communication error |
| invalid_order_configuration | Something went wrong with the order or payment that prevented the checkout to proceed |
| invalid_klarna_request | Somethign went wrong with klarna request/answer |
Liquid
Notifications:
| Name | Description |
| cart.notifications.by_type |
{ 'warning' => [ n1, ... ], 'alert' => [ ... ], ... }
|
| cart.notifications_by_variant_id |
{ 45 => { 'warning' => [ n1, ... ], ... }, 78 => ... }
|
| cart.notifications.by_order_item_id |
{ 4353 => { 'warning' => [ n1, ... ], ... }, 5356 => ... }
|
Message:
| Name | Description |
| notification.message | translated message |
| n.sku | attribute 'sku' |
| n.out_of_stock_message | attribute 'out_of_stock_message' |
| n.attr1 | attribute 'attr1' |
| ... |
Example:
{% assign notifications = cart.notifications.by_variant_id %}
{% for n in notifications[item.variant_id].warning %}
{{ n.message }}
{% endfor %}
#or
{% for type in notifications[item.variant_id] %}
{% for n in type[1] %}
{{ n.message }}
{% endfor %}
{% endfor %}
Updated: 2020-11-17