Skip to main content

Customize feeds template

Create and modify the product feed accordingly to your needs and the requirements of the shopping engine.

The feed format can be XML or CSV, depending on the shopping engine requirements.

The feed output is configured in the feed template by using the Liquid template language.

Know before customization

Before starting to customize your feed, you need to know the following information.

Metafields

Metafields are used to keep specialized pieces of product information, for example, expiration date, ingredients, etc.

note

Metafields should be first activated in the store admin in order to use them:

  1. Open Global Settings > Settings > Indexing and enable:
    • Index product metafields data
    • Index product variants metafields data
  2. Save changes
  3. Open Index Status > Index Status and run the Schedule Synchronization button

Learn to use metafields by reading the Shopify Metafields reference.

Working with variables

The feed modification is made with the help of Liquid variables and Liquid filters.

Variables contain the data on product attributes, for example, product title.

note

Depending on the context - product or product variant - different variables are available. For example, the Size and Color variables are available only for product variants. Alternatively, the product variant may have an image, but the product will have it.

Filters are used to set a specific output format for the variable. For example, filters can add the currency tag to the price variable, truncate the description variable, set the date format, etc.

Variables and operators are placed within the {% %} tag.

You can create additional named variables by using the {% assign variable.name = variable_value %} tag. For example:

logic condition in the feed
INPUT
{% assign logic_variable = true %}
{% assign text_variable = "logic variable is true" %}
{% if logic_variable != false %}
{{ text_variable }}
{% endif %}
OUTPUT
logic variable is true