1. First cart with strategy-driven upsells
Launch a draft cart that shows product offers from a Strategy, preview it, and publish it live.- Create and name a cart. On the Carts page, click Create cart to start from the default layout (
Header,Banner,Cart items,Summary, andCheckout buttonin the filled state). Click the cart name in the editor’s left sidebar to rename it — the name saves immediately. See Creating carts. - Add an Upsells block. In the filled cart state, click Add block in the Body or Footer section (maximum 1 per cart state) and select Upsells. By default, Aftersell attaches Shopify AI recommended products so the block works straight away. See How do blocks work? and Upsells block.
- Create or attach a Strategy (optional). To use your own rules instead of Shopify AI recommendations, open the block’s Strategy picker and choose an existing Strategy, Create strategy from selected products, or Create strategy from scratch. In the Strategy editor:
- Click the pencil icon to name the Strategy.
- On a rule, click Add trigger (for example, Cart subtotal Greater than
50, or a product Collection or Tag(s)), then set Actions such as Specific products, Collection, Most popular, or AI Recommendations. - Optionally enable Catch all as a fallback when no rule matches, and click the filter icon next to the Strategy name to add global filters such as Exclude out of stock or Exclude input products.
- Save the Strategy (every rule needs at least one trigger or Always match and an action). If you opened the editor in a new tab via ••• → Edit strategy, return to the cart editor tab and select the Strategy. See Building Strategies and Strategy rules reference.
- Configure the Upsells settings. Adjust Title (default
You may also like), Add button text (defaultAdd), Layout (Carousel or List), and Maximum products (1–12, default4). The entire Upsells section hides automatically when the Strategy returns no purchasable products. See Upsells block. - Save, preview, and publish. Click Save, then click Preview to check the draft on a storefront theme with the app embed enabled. Click Publish when ready (requires the Complete plan; publishing a cart moves any current live cart back to draft). See Previewing carts and Creating carts.
2. Per-market Rewards block (free shipping + gift tiers)
Set up tiered spend rewards that unlock free shipping first and a free gift at a higher threshold, with separate tier sets by market, country, or currency.- Add the Rewards block. Open your draft cart, click Add block in the Header, Body, or Footer section (or in the empty cart state; maximum 1 per cart state), and select Rewards. See How do blocks work? and Rewards block.
- Set calculation and gift options. Keep Rewards calculation on Cart total ($), which measures the qualifying items’ subtotal before discounts (excluding tax, shipping, reward gifts, product add-ons, shipping protection, and gift cards). Leave Stack rewards across tiers on so shoppers keep free shipping after unlocking the gift tier, and choose whether Add back removed free gifts re-adds an earned gift if a shopper removes it. See Rewards block.
- Order your conditions. Under Conditions, each When card targets a Shopify market, customer country, or customer currency (In or Not in) and holds up to 4 tiers in its Display section. Because the first matching condition wins (and the block renders nothing if none match), keep specific market or country rules above the All buyers catch-all condition. See Per-market rewards and Show or hide by market, country, or currency.
- Add free shipping and free gift tiers. Inside a condition’s Display section:
- For Tier 1, set Reward type to Free shipping, set Threshold ($) (for example,
50), and edit Title before achieving tier (supports{{amount}}) and Progress bar label. - Click Add tier for Tier 2, set Reward type to Free gift, set Threshold ($) strictly greater than Tier 1 (for example,
100— equal or lower thresholds block Save), and select up to 3 Gift products. Changing Reward type resets that tier’s title and label to defaults, so customize the text afterward. See Rewards block.
- For Tier 1, set Reward type to Free shipping, set Threshold ($) (for example,
- Preview each condition and save. Editor preview does not evaluate live buyer location, so select each condition card in the panel to inspect its tiers. Click Save, then verify in Preview (free gifts are added automatically when a cart crosses the threshold and removed if it drops below). See Per-market rewards and Previewing carts.
3. Styling a block or Custom code block with Custom CSS (and a custom template)
Start with built-in styling, then layer Custom CSS, a Custom code block, or a custom template only where needed.- Try Design settings first. Open Cart settings for global colors, buttons, horizontal padding, and desktop width, or use a block’s own Design panel for per-block overrides (blank fields inherit global settings). Reach for Custom CSS only for styling those controls do not cover. See Design settings.
- Add a Custom code block (if you need new markup). When no built-in block fits, click Add block to place a Custom code block in a section (or inside Cart items to repeat per line), then open its Code tab. Write HTML (tokens like
{{savings_amount}}work; inline<script>tags do not run) or a React component (click Compile after editing). Give elements a public or store-prefixed class (for example,cart-external-custom-code_html), turn on “Use custom template”, and keep the sidebar eye toggle on. See Custom code blocks. - Use a custom template on an existing block (when layout changes are needed). If a built-in block needs different markup, open its Code tab, edit the JSX body inside the locked function signature (or use Copy AI prompt; Reset to default restores the starter markup), click Compile, and turn the template on (a green
</>icon appears in the sidebar). An active custom template replaces the block’s wrapper and disables its Design tab: keepcart-internal-*andcart-external-*classes for small tweaks, or drop both and use your own store-prefixed class names if you restructure the DOM. See Custom templates. - Add rules in Custom CSS. Open Cart settings → Custom CSS, which loads after the cart’s base styles. Style built-in blocks through their public
cart-external-*classes (or your own store-prefixed classes on restructured templates and Custom code blocks). Avoidcart-internal-*classes (the editor flags them as errors) and selectors aimed outside the drawer (the cart renders inside a shadow DOM, so styles are scoped to the drawer). See Custom CSS. - Verify in preview before publishing. Because compile and runtime errors in custom templates and Custom code blocks fail silently, check both Filled cart and Empty cart in the editor canvas (and use Cart items → Preview → Sample data to test standard, long-title, bundle, and subscription lines), then click Save and check storefront Preview. See Previewing carts.