An open library of custom blocks for subscription customer portals
All blocks
No. 21Upsell

Stock-Up Switch

Move monthly subscribers to a bigger, less frequent order in one click.

D’Tanga SmallLinkedIn
Preview animationNeeds a live customer portal to run
Customer portal · Stock-Up Switch
Stock-Up Switch preview

This block reads live subscription data, so it only runs inside a real customer portal. The animation shows what subscribers see.

What it does

A card on the subscription page that offers a bigger supply on a longer schedule: the selected products go to a set quantity (for example ×3) and delivery moves to a longer schedule (for example every 3 months). Before the subscriber clicks, it lists every change, including the other items on the subscription that will move to the new schedule, and says the next order date stays the same. One click changes the schedule, then the quantities, then reloads the page. It only shows on active, non-prepaid subscriptions on a qualifying schedule, and stays hidden for anyone already at or above the starting quantity you set.

Why it exists

For subscription brands selling consumables people use on a steady schedule (supplements, coffee, snacks, personal care), where most subscribers buy one unit a month. Moving them to a larger, less frequent order means fewer shipments per customer, which lowers fulfillment and shipping cost per unit, and a stocked-up subscriber has fewer renewal moments where they might skip or cancel. It takes one click and no support ticket, instead of editing quantity and frequency separately.

The code

Paste it as-is, or download stock-up-switch.html

How to install

  1. Copy the code above, or download the .html file.
Your portal
  1. Go to Storefront → Customization → Blocks, then click Add block → Custom block.
  2. Name it and paste the whole file into the code editor.
  3. Swap anything the file asks you to, like [BRAND], product names or Quick Action IDs. The AI prompt below can walk you through it.
  4. Save, drag it where you want it in the layout, then Publish. Check it on a test subscription’s magic link with ?forcePreview=true, since some scripts don’t run in Preview.
Before you paste

It ships with placeholder products (productHandles your-product-handle and another-product-handle), so the card stays hidden until you list your own. In CONFIG, list the eligible products in productHandles (the part after /products/ in a product link), productIds or variantIds, then set targetQuantity, eligibleIntervals (your current monthly schedule, e.g. MONTH 1 or DAY 30) and newInterval. Pick a newInterval that matches one of your existing selling plans. maxStartingQuantity controls who sees the card: with the sample settings (target 3, max 2), a subscriber getting 2 a month is offered 3 every 3 months, which is less product overall, so set it to 1 if that shouldn't happen. Every selected product goes to targetQuantity; other items keep their quantity but move to the new schedule too, and the card lists them before the click. It changes quantity and schedule only, never price, and the card shows no prices, so the next order (same date) bills for the bigger quantity. For a stock-up discount, create a quantity-based volume discount (in Skio: Grow › Volume Discounts) with the same products and “At least” your target quantity. One rule for all products allows mix and match; one rule per product requires the same product. If the schedule changes but a quantity doesn't, the card says so and the button finishes only the missing quantities. Card text and colors are in CONFIG.copy and CONFIG.style; leave the style values blank to use your portal theme. It uses Skio's portal API (fetchSkioAPI), so it needs a Skio customer portal.

Customize it with AI

Paste this prompt into Claude Code or Codex. It asks for the code and your brand and product details, then writes a version for your store.

Blocks are shared as-is by the people who built them. Read the code before you add it to your portal, and test it with a test subscriber first.

Built a custom extension your subscribers love?

Share it with us, we'll review it, we'll get it live, then we'll add it to the site so anyone can copy + customize.

your-block.html
<!-- your-block.html -->
<div class="my-block">
  <p class="my-block__title">Your next order ships Friday</p>
  <button class="my-block__cta">Add a bonus item</button>
</div>

<style>
  .my-block { padding: 20px; border-radius: 16px; }
  .my-block__cta { background: var(--brand); }
</style>

<script>
  // read the subscription, then do the useful thing
  const sub = window.__subscription;
</script>