How to customize product and price list layouts

Catalog Machine provides full customization for your product and price lists.

You can find here a few scenarios that you can use in your catalogs. Read in more details about possible fields and operations in Smart Layouts. View video how to use price lists.

  1. Iterate products
  2. Iterate categories
  3. Iterate variants
  4. Use tables
  5. Conditional text

Simply insert these examples into text box in the catalog. You can format text as usual.

price-list-text-edit

Iterate products

Format: {{Products}}…{{/Products}}

Examples:

1. Display all products name, description and price
{{Products}}
{{Name}} - {{Description}} - ${{Price}}
{{/Products}}

2. Display top 10 products with images where category equals Clothing ordered by Price in decreasing order.
{{Products: Category = Clothing : LimitBy = 10 : OrderBy > Price}}
{{Image}} {{Name}} - ${{Price}}
{{/Products}}

3. Display all products with images where field Description has word Sale and order by Category.  Show images with Fit positioning, with maximum width 100px and height 200px

{{Products: Description ~ Sale : OrderBy > Category}}
{{Image:Fit:100:200}} {{Name}}
{{/Products}}

4. Display 20 products from position 41 ordered by price in increasing order. This example could be useful for displaying product lists on multiple pages.

{{Products: LimitBy = 20: SkipBy = 40 : OrderBy < Price}}
{{Name}} - {{Price}}
{{/Products}}

Iterate product categories

Format: {{Categories}}…{{/Categories}}

Examples:

1. Simple iteration displaying category name
{{Categories}}
{{Name}}
{{/Categories}}

2. Iteration displaying category name, thumbnail, description and product count where product count is more than 0.
{{Categories: ProductCount > 0}}
{{Thumbnail:Fit:50:50}}  {{Name}} ({{ProductCount}}) {{Description}}
{{/Categories}}

3.  Display categories with sub string Shoes sorted by name with positive product count.  Show full category name (includes parent name)
{{Categories: Name ~ Shoes: ProductCount > 0 : OrderBy > Name }}
{{FullName}}
{{/Categories}}

4.  Display product names with prices grouped by categories.
Note: Products inside {{Categories}} iterator will be automatically limited to this category.
{{Categories}}
{{Name}}
{{Products}}
{{Name}} - ${{Price}}
{{/Products}}
{{/Categories}}

5.  Display categories with parent category Clothing 
{{Categories: Parent = Clothing }}
{{Name}}
{{/Categories}}

Iterate product variants

Format: {{Variants}}…{{/Variants}}

{{Variants}} iterator can be placed inside {{Product}} iterator or in any text box linked to the product.

Examples:

1. Simple iteration displaying variants first option and price
{{Variants}}
{{Option}} - ${{Price}}
{{/Variants}}

2. Iterator with named options (e.g. Color and Size) and price more than 10
Note: you can reference options by name or index – Color or Option:1 (same as Option), Size or Option:2. It could be convenient for categories with different options sharing the same template.
{{Variants: Price > 10 }}
{{Color}} / {{Size}} - ${{Price}}
{{/Variants}}

same as

{{Variants: Price > 10 }}
{{Option:1}} / {{Option:2}} - ${{Price}}
{{/Variants}}

3. Display all products with variants. Separator will show symbols (or string) between options.

{{Products: VariantCount > 0}}
{{Name}}
{{Variants }}
{{Option}}{{Separator:,}}
{{/Variants}}

4.  Display product names with prices grouped by categories.  Products inside {{Categories}} iterator will be automatically limited to this category.
{{Categories}}
{{Name}}
{{Products}}
{{Name}} {{Description}}
{{Variants}}{{SKU}} - {{Color}} - {{Size}} - ${{Price}} {{Separator:/}} {{/Variants}}
{{/Products}}
{{/Categories}}

Using tables for formatted and aligned text

Tables will make your text aligned automatically.

In order to make edits, click to edit text box, open text box in popup and switch to Code mode.

price-list-tables

Basic example – copy into Code view. Switch after adding this code into Normal view and format as needed. You can add columns for any field or keep them empty.

<!--{{Categories}}-->
{{Name}}
<table>
<tr>
<td>Code</td><td>Name</td><td>Price</td>
</tr>
<!--{{Products}}-->
<tr>
<td>{{Code}}</td><td>{{Name}}</td><td>{{Price}}</td>
</tr>
<!--{{/Products}}-->
</table>
<!--{{/Categories}}-->

Note: <!–… –> is hiding text in normal view (used for comments in HTML)

Conditional text fragments

Use {{If:condition}}…{{/If}} to show text if condition is true.

Examples

{{If:Price > 100}} High price {{/If}}

{{If:Tag~sale}} Sale: {{Sale Price}} {{/If}}

You can use it inside any iterator

{{Products}} {{Name}} – {{If:Price=0}} N/A {{/If}} {{If:Price>0}} ${{Price}} {{/If}} {{/Products}}

Leave a Reply

Your email address will not be published. Required fields are marked *