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 }} - 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 }} - 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 to automatically select child options on the product page after the customer opens the link. At the end of the url will be added options with 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 }} - final price (saleable) of the product

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

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

  • {{ 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 }} - price of product (without discounts, catalog rules etc)

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

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

    The special price of the product.

    Special price ignore values of Special Price From Date and Special Price To Date

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

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

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

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

  • {{ product.tax_rate }} - 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 a few categories, the extension 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, that is the most nested in the category tree.
    If the product is assigned to a few categories at the same level, the extension selects a category with the lowest position of the product. Change the position of the product you can at Catalog > Manage Categories, tab Category Products
  • {{ product.category.entity_id }} - a ID of the assigned category to the product

    Note

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

    E.g. Computers > Notebooks > Apple

    Note

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

4.Images

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

  • {{ product.images }} - direct urls gallery images of the product separated by comma

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

  • {{ product.small_image }} - 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 }} - average product rating (from 0 to 5)

5.Stock Attributes

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

    Possible values:

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

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

  • {{ product.stock_status }} - 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 next construction:

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

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

7.Multi Source Inventory Sources

Note

Multi Source Inventory (MSI) is available starting with Magento 2.3

Allows to export MSI Sources using next pattern:

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

Parent product values

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

Example

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

Note: 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 the 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 %}