You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting up purchases requires two steps. Both must be in place before users can make a purchase.
9
+
To set up purchases on a screen, add a purchase button and configure its **Purchase** action. The action can target a specific product or whichever product the user selects from a Products element on the screen.
10
10
11
-
1.[Add product elements](#2-add-product-elements)
12
-
2.[Add a purchase button](#3-add-a-purchase-button)
13
-
14
-
## Set up purchases
15
-
16
-
### 1. Add product elements
11
+
## Add products
17
12
18
13
A product element is a visual card that displays a product on the canvas.
19
14
@@ -25,32 +20,43 @@ To add a product element:
25
20
26
21
<ZoomImageid="product-element.webp"width="500px"alt="Adding a product element to the canvas" />
27
22
28
-
4. When the element is placed:
29
-
30
-
- If products are already assigned to the screen, the first available product is selected by default, following the order in the Products panel. You can change this.
31
-
- If no products are assigned yet, select each product card and assign it a product in the dropdown in the **Design** panel.
23
+
4. Select each product card and assign it a product in the dropdown in the **Design** panel.
32
24
33
25
<ZoomImageid="product-card.webp"width="500px"alt="Adding a product element to the canvas" />
34
26
35
-
#### Product card rules
27
+
:::note
28
+
You can also attach a **Purchase** action directly to a product card's **On tap** interaction. Tapping the card then triggers the purchase, with no need for a separate purchase button.
29
+
:::
36
30
37
-
- Product cards cannot be nested inside a selectable element.
38
-
- If a Products group contains only one card, the card is no longer selectable and the Selected state is removed.
31
+
## Add a purchase button
39
32
40
-
### 2. Add a purchase button
41
-
42
-
Products work only when the screen also has a purchase button with a configured Purchase action.
33
+
A purchase button triggers a **Purchase** action when the user taps it.
43
34
44
35
To add a purchase button:
45
36
46
37
1. On the canvas, click **+** on the screen.
47
38
2. Select **Button** and choose a button preset.
48
39
3. With the button selected, open the **Interactions** tab in the right panel.
5. Set **Action** to **Purchase** and **Product** to `products.selectedProduct`. The `products.selectedProduct` variable always resolves to the currently selected product on the screen.
41
+
5. Set **Action** to **Purchase**, then set **Product** to one of:
42
+
-`products.selectedProduct`: Buys whichever product the user has selected from a Products element on the screen.
43
+
- A specific product: Always buys that product, regardless of any selection on the screen.
51
44
52
45
<ZoomImageid="flow-purchase-button.webp"width="500px"alt="Adding a purchase button to the canvas" />
53
46
47
+
### Show the price on the button
48
+
49
+
To insert the selected product's price into the button label, use a variable:
50
+
51
+
1. With the button selected, open the **Design** tab in the right panel.
52
+
2. In the **Content** field, place the cursor where the price should appear.
53
+
3. Click the variable icon, pick `products.selectedProduct`, then pick the `prod_price` attribute. The full variable resolves to `products.selectedProduct.prod_price`.
54
+
4. Add static text around the variable — for example, `Subscribe for {prod_price}`.
55
+
56
+
The label updates as the user selects different products.
57
+
58
+
<ZoomImageid="plans-bottom-sheet-main-button-var.webp"width="500px"alt="Purchase button with the selected product's price variable in the label" />
59
+
54
60
## Restore purchases
55
61
56
62
To let users restore previous purchases, add a restore button or link to the screen.
0 commit comments