List of Patterns

All patterns must be enclosed in curly brackets. In patterns, you can use codes of attributes, filters, links to parent products, base php functions, and calculations.

The base pattern schema {{ entity.attribute | filter | filter }}

Attribute Patterns

1.Primary Attributes

  • {{ product.attribute_set }} - the name of the assigned attribute set to the product

  • {{ product.description }} - the description of the product

  • {{ product.status }} - the status of the product

    Possible values:

    • Enabled
    • Disabled
  • {{ product.name }} - the name of the product

  • {{ product.meta_descritpion }} - the meta description of the product from the SEO section

  • {{ product.meta_keyword }} - the meta keyword of the product from the SEO section

  • {{ product.meta_title }} - the meta title of the product from the SEO section

  • {{ product.entity_id }} - the ID of the product

  • {{ product.name }} - the name of the product

  • {{ product.type_id }} - the type of the product (simple, configurable, etc.)

  • {{ product.url }} - the direct URL to the product

  • {{ product.url_with_options }} - the direct URL to the product with the custom options (size, color, etc.)

    This type of URL allows you to automatically select child options on the product page after the customer opens the link. At the end of the URL, there will be additional options for the parameters, f.e.: http://store.com/some-product-key.html#142=5596&93=5477

  • {{ product.sku }} - an identifier of the product

  • {{ product.short_description }} - the short description of the product

  • {{ product.url_key }} - the URL key of the product

  • {{ product.visibility }} - the visibility of the product

    Possible values:

    • Not Visible Individually
    • Catalog
    • Search
    • Catalog, Search

2.Prices & Taxes

  • {{ product.cost }} - the price at which products are or have been bought by a merchant or retailer

  • {{ product.final_price }} - the final price (saleable) of the product

    The price of a product, after applying special price and catalog price rules.

  • {{ product.final_price_tax }} - the final price (saleable) of the product with tax included

  • {{ product.msrp }} - the manufacturer's suggested retail price, a price recommended for the sale of an item in all retail outlets.

  • {{ product.minimal_price }} - the lowest price among all active child products

  • {{ product.price }} - the price of the product (without discounts, catalog rules, etc.)

  • {{ product.regular_price }} - the regular price of the product

  • {{ product.special_price }} - a special price of the product

    The special price of the product.

    The special price ignores the values of Special Price From Date and Special Price To Date

  • {{ product.special_from_date }} - the date of starting sales of the product

  • {{ product.special_to_date }} - the date of ending sales of the product

  • {{ product.tax_class_id }} - the tax class of the product

  • {{ product.tier_price }} - the tier price of the product

  • {{ product.tax_rate }} - the tax rate for the product

3.Category

  • {{ product.category_ids}} - the IDs of the assigned categories to the product

    Note

    If the product is assigned to multiple categories, the extension automatically selects Category using this logic:
    The most nested category is always selected. For example, if a product is assigned to a few categories at different levels, the attribute {category} returns the name of the category, which is the most nested in the category tree. If the product is assigned to severl categories at the same level, the extension selects the category with the lowest position of the product. You can change the position of the product at Catalog > Manage Categories, in the tab Category Products
  • {{ product.category.entity_id }} - the ID of the assigned category to the product

    Note

    If the product is assigned to several categories, the extension selects a Category Id using this logic:
    The most nested category id is always selected. For example, if a product is assigned to multiple categories at different levels, the attribute {category_id} returns the id of the category, which is the most nested in the category tree.
    If a product is assigned to several categories at the same level, the extension selects the category id with the lowest position of the product. To change the position of the product, go to Catalog > Manage Categories, in the tab Category Products
  • {{ product.category.path }} - the path of the category names

    E.g. Computers > Notebooks > Apple

    Note

    If the product is assigned to several categories, the extension selects a Category Path using this logic:
    The most nested category path is always selected. For example, if a product is assigned to multiple categories at different levels, the attribute returns the path that is the most nested in the category tree.
    If a product is assigned to several categories at the same level, the extension selects the category with the lowest position of the product. To change the position of the product, go to Catalog > Manage Categories, in the tab Category Products

4.Images

  • {{ product.image }} - the direct URL to the base image of the product

  • {{ product.images }} - the direct URLs gallery images of the product, separated by a comma

  • {{ product.thumbnail }} - the direct URL to the thumbnail image of the product

  • {{ product.small_image }} - the direct URL to the small image of the product

  • {{ product.gallery[0] }}, {{ product.gallery[1] }} ... - a direct url to gallery images of the product

  • {{ product.rating_summary }} - the average product rating (from 0 to 5)

5.Stock Attributes

  • {{ product.is_in_stock }} - the stock status of the product

    Possible values:

    • 0 - Out of Stock
    • 1 - In Stock
  • {{ product.qty }} -the quantity of the product

  • {{ product.qty_children }} - the quantity of children in stock products

  • {{ product.stock_status }} - the stock status of the product

    Possible values:

    • Out of Stock
    • In Stock

6.Reviews

Note

To export review attributes, they should be set in the Reviews context.
For example, to export, the review title must be set in the following construction:

{% for review in context.reviews %}
<title><![CDATA[{{ review.title }}]]></title>
{% endfor %}

  • {{ review.id }} - the review ID
  • {{ review.nickname }} - the nickname of the customer who left review
  • {{ review.created_at }} - the date of the review creation
  • {{ review.title }} - the title (summary) of the review
  • {{ review.detail }} - the review text
  • {{ review.rating }} - the review rating
  • {{ review.reviews_count }} - the number of approved reviews for this product
  • {{ review.product.[product_attribute] }} - allows for use of the product attributes at the Review context construction, where instead of [product_attribute], there should be set a product attribute code.
    For example, a product's SKU: {{ review.product.sku }}

7.Multi Source Inventory Sources

Note

Multi-Source Inventory (MSI) is available, starting from Magento 2.3

Allows you to export MSI Sources using the following pattern:

{{ product.inventory:source_code }} - where instead of source_code, there should be an Inventory Source Code set.

Parent product values

You can use the suffix .parent ({{ product.parent.name }}, {{ product.parent.price }}, {{ product.parent.url }} etc), if you need to return the value to the parent product.

Example

If the current product associated with a configurable/grouped/bundled product, the pattern {{ product.parent.url }}, will return the URL to the parent product. If the extension can't find the parent product, it will use the current product.

Note: The parent suffix is very useful when you export simple products with visibility Not Visible Individually. In this case, the product can't have a direct link, so you must use a link to the parent product.

Example

{% for product in context.products %}

    {% for image in product.gallery %}
    <picture>{{ image }}</picture>
    {% endfor %}

    <created>{{ product.created_at | dateFormat: 'd.m.Y H:i:s' }}</created>
{% endfor %}

How to hide a special price if it is empty

 {% if product.special_price %}
        <g:sale_price><![CDATA[{{ product.special_price }} USD]]></g:sale_price>
 {% endif %}

How to hide the shipping weight if it is empty

    {% if product.weight %}
         <g:shipping_weight><![CDATA[{{ product.weight }} kg]]></g:shipping_weight>
    {% endif %}