Shopify Liquid

From the Directed Edge Developer Base
Revision as of 00:01, 10 October 2013 by Lucijan (talk | contribs)
Jump to: navigation, search

Liquid Variables supported by Directed Edge

groups

The liquid variable groups contain all recommendation types that are available for the requested page.

{% for group in groups %}
  {{ group.label }}
  <ul></ul>
{% endfor %}

Each group has following properties:

label A formatted label of the group. E.g. 'Recommended Items', 'Recently Viewed', etc. Those labels can be customized in the Directed Edge for Shopify Appearance Settings page.
handle A machine friendly identifier for the group (e.g. bundle, recommended_product, etc.).
products A list of products that are recommended in this category.
{% for group in groups %}
  <ul>
  {% for product in group.products %}
    <li>
    <b>{{ product.title }}</b><br />
    {{ product.price | money }}
  {% endfor %}
  </ul>
{% endfor %}
bundle A boolean field that indicates if this group is a bundle

Following Liquid Variables are supported in custom templates:

  • groups - An array of recommendation types with following variables
    • handle - A machine friendly identifier for the group (e.g. bundle, recommended_product, etc.)
    • label - A rendered label text (according to your settings)
    • bundle - A boolean field that indicates if this group is a bundle
    • products - An array of Products
  • bundle
    • text - Bundle's buy message (e.g. 'Buy both for 20$')
    • price - The sum of a bundles price
    • buy_link - A link that will add a bundle's products into the cart

Examples

Simple example