List of Patterns

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

The base pattern shema {attribute_code, [ formatter 1 ], [ formatter 2 ], ... }

Attribute Patterns

  • Product ID {entity_id} - ID of the product

  • SKU {sku} - an identifier of the product

  • Name {name} - a name of the product

  • Description {description} - a description of the product

  • Short Description {short_description} - a short description of the product

  • Status {status} - a status of the product

    Possible values:

    • Enabled
    • Disabled
  • Visibility {visibility} - a visibility of the product

    Possible values:

    • Not Visible Individually
    • Catalog
    • Search
    • Catalog, Search
  • URL Key {url_key} - a url key of the product

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

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

  • Final Price {final_price} - a final price (sellable) of the product

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

  • Base Price {base_price} - a base price of the product

    The price of product before applying special price or catalog price rules.

  • Group Price for customer group {group_priceX} - a group price for X group, where X - customer group ID

    Examples: {group_price1}, {group_price4}

  • Manufacturer's Suggested Retail Price {msrp} - manufacturer's suggested retail price

  • Special Price {special_price} - a 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

  • Store Price {store_price} - price converted into the currency of the feed selected store.

  • Minimal Child Price of Grouped or Bundle Product {min_price} - if product is Grouped or Bundle, will be exported the lowest child product price.

    For the other product types, will be exported Final Price.

  • Category {category} - a name of the assigned category to the product

    If product is assigned to a few categories, extension selects Category using next logic:
    There always is selected the most nested category. For example, if a product is assigned to a few categories at different level, the attribute {category} returns the name of the category that is the most nested in the category tree.
    If product is assigned to a few categories at the same level, the extension selects a category with the lowest position of the product. Change position of the product you can at Catalog > Manage Categories, tab Category Products

  • Category Id {category_id} - a ID of the assigned category to the product

    If product is assigned to a few categories, extension selects Category Id using next logic:
    There always is selected the most nested category id. For example, if a product is assigned to a few categories at different level, the attribute {category_id} returns the id of the category that is the most nested in the category tree.
    If product is assigned to a few categories at the same level, the extension selects a category id with the lowest position of the product. Change position of the product you can at Catalog > Manage Categories, tab Category Products

  • Category Ids {category_id} - a ID of the assigned category to the product

  • Category Path {category_path} - a path of the category names

    E.g. Computers > Notebooks > Samsung

    If product is assigned to a few categories, extension selects Category Path using next logic:
    There always is selected the most nested category path. For example, if a product is assigned to a few categories at different level, the attribute {category_path} returns the path that is the most nested in the category tree.
    If product is assigned to a few categories at the same level, the extension selects a category with the lowest position of the product. Change position of the product you can at Catalog > Manage Categories, tab Category Products

  • Category Paths {category_paths} - all product category paths

  • Category Url {category_url} - a direct url of the assigned category to the product

    The direct url to parent category.

    If product is assigned to a few categories, extension selects Category Url using next logic:
    There always is selected the most nested category url. For example, if a product is assigned to a few categories at different level, the attribute {category_url} returns the url of the category that is the most nested in the category tree.
    If product is assigned to a few categories at the same level, the extension selects a category id with the lowest position of the product. Change position of the product you can at Catalog > Manage Categories, tab Category Products

  • Attribute Set {attribute_set} - a name of the assigned attribute set to the product

  • Quantity {qty} - a quantity of the product

  • Parent Qty {parent_qty} - sum of in stock child products quantity. Export values only for configurable products.

  • Is In Stock {is_in_stock} - a stock status of the product

    Possible values:

    • 0 - Out of Stock
    • 1 - In Stock
  • Image {image} - a direct url to base image of the product

    For resize image, you can use pattern {image:WxH} ({image:110x150})

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

    For resize image, you can use pattern {thumbnail:WxH} ({thumbnail:200x100})

  • Small Image {small_image} - a direct url to small image of the product

    For resize image, you can use pattern {small_image:WxH} ({small_image:100x150})

  • Image 2 {image2}, Image 3 {image3}, Image 4 {image4}, Image 5 {image2} - a direct url to gallery images of the product

  • Rating Summary {rating_summary} - average product rating (from 0 to 5)

  • Number of Reviews {reviews_count} - number of approved reviews

Parent product values

You can use suffix |parent ({name|parent}, {price|parent}, {image|parent}, {custom:dynamic_attribute|parent} etc), if you need return value of parent product.

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

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

Only Parent product values

You can use suffix |only_parent ({name|only_parent}, {image|only_parent}, {custom:dynamic_attribute|only_parent} etc), if you need to return only value of the parent product.
If extension can't find value of the parent product attribute, all its child products will also have no values, even if the childs have values of this attribute.

Parent value, if child value is empty

You can use suffix |parent_if_empty ({image|parent_if_empty}, {custom:dynamic_attribute|parent_if_empty} etc), for return parent value, if child product value is empty.

Grouped product values

You can use suffix |grouped ({color|grouped}, etc), if you need contact all child product values to one string (this feature will work for bundled and grouped products).

To export only active child products which are in stock and whose qty greater than 0 you can use the suffix |salable_grouped ({color|salable_grouped}).

Category attributes mapping

If product is assigned to a few categories, extension selects Category using next logic:
There always is selected the most nested category. For example, if a product is assigned to a few categories at different level, the attribute {category} returns the name of the category that is the most nested in the category tree.
If product is assigned to a few categories at the same level, the extension selects a category with the lowest position of the product. Change position of the product you can at Catalog > Manage Categories, tab Category Products

Formatters

Formatter Description Schema Example
strip_tags Remove all html tags {attribute_code, [strip_tags]} {description, [strip_tags]}
html2plain Remove all html tags, slashes and multiple spaces {attribute_code, [html2plain]} {description, [html2plain]}
htmlentities Convert all applicable characters to HTML entities {attribute_code, [htmlentities]} {description, [htmlentities]}
clear Remove all non-utf-8 characters from string {attribute_code, [strip_tags]} {description, [clear]}
substr Truncate the string {attribute_code, [substr from to]} {name, [substr 0 80], [...]}
strtoupper Transform the string to upper case {attribute_code, [strtoupper]} {name, [strtoupper]}
strtolower Transform the string to lower case {attribute_code, [strtolower]} {name, [strtolower]}
convert Change price currency {attribute_code, [convert CODE]} {price, [convert AUD]} or {special_price, [convert CHF]}
number_format Format a number with grouped thousands {attribute_code, [number_format decimals]} {price, [number_format 2]} or Price comma format: {price, [number_format 2 , ]}
urlToUnsecure Convert all Urls to http format {attribute_code, [urlToUnsecure]} {image, [urlToUnsecure]}
urlToSecure Convert all Urls to https format {attribute_code, [urlToSecure]} {image, [urlToSecure]}
if_not_empty Delete the row if attribute value is empty {attribute_code, [if_not_empty]} {color, [if_not_empty]}
[php function] Any other php function {attribute_code, [function arg1 arg2 ]} {brand, [trim], [strtoupper], [substr 0 80]}

Additional Patterns

Calculations:

  • {(return $price * 1.15;)}
  • {(return $qty + 1;)}
  • {(return $group_price2 / 10 * 4 - 2.5;)}
  • {(return str_replace("0", "*", $sku);)}
  • {(return substr($sku, 3);)}
  • {(return str_replace("a", "b", substr($sku, 0, 5));)}
  • {(return date('d.m.Y H:i:s');)}
  • {(return date('d.m.Y H:i:s', strtotime('+25 days'));)}
  • {(return date("d/m/Y", strtotime($special_from_date));)}

PHP Ternary Operator:

  • {(return ($price > 1000) ? 'free shipping' : '15';)}
  • {(return ($manage_stock == 1) ? $qty : 999;)}
  • {(return (strlen($manufacturer) > 1) ? $manufacturer : 'NoBrand';)}
  • {(return ($color!=='orange') ? $color : '';)}

PHP functions:

  • {php, [date("d.m.Y H:i:s")]}
Advanced Product Feeds