Skip to content

Map layers to product data

A mapping connects a layer to a field of your product data. When Cropink makes the image of a product, the layer shows the value of that field for that product: the title, a price, the product photo. A layer without a mapping shows the same text or image on every product.

Mapping is a part of the Data Settings tab of the design editor. Without a selection, the tab says No Data Settings.

  • Text layers, to a field that holds text or a number, such as the title or a price.
  • Image layers, and frames or rectangles filled with an image, to an image field, such as the main image.
  • Layers with a colour fill show the same field list as an image layer.

Vectors have no mapping field. Neither does a frame or a group that has no fill: the tab shows no mapping field for it.

The mapping list open on the title layer of Bottom Band – Classic, with a check mark on title under Common Fields and the Text group starting below it

  1. Select the layer on the canvas or in the Layers panel.
  2. Open Data Settings. The first row is a button with the name of the mapped field. A layer without a mapping shows No Data Mapped and a broken link icon.
  3. Click the button. A list opens with a search box at the top. The list scrolls.
  4. Click a field, or type in the search box to narrow the list. The search matches the field ids. If nothing matches, the list says No matching fields found.

The button now shows the field id and a link icon, and the layer gets a link icon in the Layers panel. A mapping is one step for undo.

To remove a mapping, open the list and click No Data Mapped. The layer goes back to its own text or image.

The list depends on the layer. From the top:

  1. No Data Mapped, which clears the mapping.
  2. Common Fields, the fields most layers use. A text layer gets title, current_price and old_price. Every other layer gets image_link and additional_image_link_0.
  3. Groups of the other fields that this type of layer can take, under a header for each group. A text layer gets groups such as Text (title, description, brand, color, custom_label_0) and Number (sale_price, regular_price, discount). An image layer gets the image fields (image_link and the additional images) and an internal image group (cropink_image_0 to cropink_image_9). Fields are listed by their ids.

Cropink supplies the groups and the fields, and the list can grow when Cropink adds a field. A field marked as a true or false value, such as is_discount, is not in the list. Use it in a condition instead.

In “Bottom Band – Classic”, the supporting layer is a short line of text under the title. It has no mapping, so it shows the same words on every product. Map it to the brand.

  1. Select the supporting layer.
  2. Open Data Settings and click the mapping button.
  3. Scroll to the Text group and click brand. The button reads brand.
  4. Click Data Preview in the header. Preview a product, for example NW-2435 or NW-2421. See Preview with real products.
  5. Click supporting in the Data Responsive Layers. Under Output you see the value that the layer receives. The layer shows the brand of the product: KESTRO for NW-2435, STRIDON for NW-2421.
  6. Go back to the editor. Map the layer to No Data Mapped if you want the fixed line again.

Example: show the product photo in an image layer

Section titled “Example: show the product photo in an image layer”

An image layer is mapped the same way, to an image field. In “Bottom Band – Classic”, the product layer, the photo of the sneakers, is mapped to image_link, the main image of the product. So every product shows its own photo there.

  1. Select the product layer and open Data Settings. The mapping button reads image_link.
  2. Click the mapping button. The list offers Common Fields with image_link and additional_image_link_0, then the image groups. To map the layer to another image field, click that field instead.
  3. Open Data Preview and preview a product, for example NW-2421 and then NW-2435. The layer shows the photo of each product.
  4. Click product in the Data Responsive Layers. Under Output you see the image and its address.

A product that has no value in the mapped field shows Empty, and the layer has no image to show. To make a design for the extra images of your feed, see Additional images.

The canvas shows the design with placeholder data, not product data. A mapped text layer keeps its Text Placeholder, and a mapped image keeps its placeholder image (see Text and Colours, gradients and images). The real values appear in Data Preview and in the images Cropink generates. Use the placeholder to judge the layout with a short or a long text.

A design that has no mapped layer and no condition cannot be previewed.

When you map a layer to a price field (sale_price, regular_price, current_price, old_price, discount or discount_percentage), a Price Formatting: row appears under the mapping button. It sets how the number is written. See Format prices. Clearing the mapping empties these settings.

  • A layer has one mapping. To use two fields in one place, use two layers.
  • You cannot type a field that is not in the list. The fields are the ones Cropink supports for product feeds.
  • To change a layer when a field has a certain value, use conditional properties.