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.
Which layers can be mapped
Section titled “Which layers can be mapped”- 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.
Pick a mapping
Section titled “Pick a mapping”
- Select the layer on the canvas or in the Layers panel.
- 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.
- Click the button. A list opens with a search box at the top. The list scrolls.
- 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.
What the list holds
Section titled “What the list holds”The list depends on the layer. From the top:
- No Data Mapped, which clears the mapping.
- Common Fields, the fields most layers use. A text layer gets
title,current_priceandold_price. Every other layer getsimage_linkandadditional_image_link_0. - 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_linkand the additional images) and an internal image group (cropink_image_0tocropink_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.
Example: show the brand in Bottom Band
Section titled “Example: show the brand in Bottom Band”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.
- Select the
supportinglayer. - Open Data Settings and click the mapping button.
- Scroll to the Text group and click
brand. The button readsbrand. - Click Data Preview in the header. Preview a product, for example
NW-2435orNW-2421. See Preview with real products. - Click
supportingin the Data Responsive Layers. Under Output you see the value that the layer receives. The layer shows the brand of the product: KESTRO forNW-2435, STRIDON forNW-2421. - 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.
- Select the
productlayer and open Data Settings. The mapping button readsimage_link. - Click the mapping button. The list offers Common Fields with
image_linkandadditional_image_link_0, then the image groups. To map the layer to another image field, click that field instead. - Open Data Preview and preview a product, for example
NW-2421and thenNW-2435. The layer shows the photo of each product. - Click
productin 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.
What you see on the canvas
Section titled “What you see on the canvas”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.
Prices
Section titled “Prices”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.
Limits
Section titled “Limits”- 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.