How pricing works
The merchant sets a singleprice on the rule — the total the customer pays for the bundle. Appstle’s discount Function reduces the bundled lines so their combined total equals price:
Step 1 — Read the rule from the metafield
Read the active rules from theappstle_bundles.bundle_rules shop metafield — the Shopify-native source, with no call to Appstle’s servers (see Reading bundle configuration). Filter to fixed pricing bundles by bundleType + bundleSubType.
Step 2 — Render your selector
Build whatever UI matches your theme. Drive its rules from the configuration:- Show the eligible products.
- Enforce the item count between
minProductCountandmaxProductCount. - Display the headline price (
price) prominently, and optionally the savings (see below).
Step 3 — Add the bundle to the cart
When the selection is valid, add the chosen variants to the cart with the required attributes. For a fixed pricing bundle, each component line carries_appstle-bb-id, _appstle_bundles_type, and __appstle-bb-name.
Step 4 — Discount applies automatically
Once the lines are in the cart, Appstle’s automatic discount reduces the bundled lines so the set totalsprice. It shows in the cart, persists through checkout, and is reflected on the order. There is nothing else to call.
Previewing savings
To show the customer what they save before checkout, compute it from the rule (remember cart prices are in cents):This is a display-only preview. The Shopify Function applies the authoritative discount at checkout from the same
price, so the two always agree.Checklist
1
Bundle is Active in the Appstle admin
Only active rules have a live automatic discount.
2
Selection respects min/max product count
Validate before adding to cart.
3
Every line carries the bundle attributes
_appstle-bb-id (= uniqueRef) and _appstle_bundles_type (= SINGLE_PRODUCT_BUILD_A_BOX) on each line.4
Verify the discount in the cart
Confirm the bundled lines total the configured
price.Next steps
Dynamic pricing bundle
Build-your-own with a percentage or amount discount.
Volume discount bundle
Tiered “buy more, save more” discounts.