> ## Documentation Index
> Fetch the complete documentation index at: https://bundles-docs.getappfox.com/product-bundles/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Classic Bundle

> Create a Shopify Classic bundle in Appfox: fixed products, shopper variant choices, and a percentage or fixed discount applied automatically at checkout.

Classic Bundles let you package specific products together and offer them at a discounted price. Shoppers can select specific variants (size, color, etc.) for each component, and the discount applies automatically at checkout.

## What is a Classic Bundle?

A Classic Bundle combines a fixed set of component products at a discounted price using Shopify's discount function. Shoppers select variants for each component, add them to cart, and the discount applies automatically when all components are present.

**Example**: "Complete Home Office Bundle" containing desk lamp + mouse pad + pen holder at 20% off. Shoppers choose their preferred variants and the discount applies at checkout.

## When to use Classic Bundles

Classic Bundles work best for:

* **Complementary products**: Items that naturally go together (phone + case + charger)
* **Complete solutions**: Everything needed for a specific use case
* **Gift sets**: Pre-curated bundles for gifting
* **Multi-variant products**: Bundles where shoppers need to choose sizes, colors, or styles

## How Classic Bundles Work

1. **Shopper views bundle** on a component product page
2. **Selects variants** for each component (size, color, etc.)
3. **Adds to cart** - component products are added with bundle metadata
4. **Discount applies** automatically at checkout when all components are present
5. **Inventory decrements** for the actual component products purchased

This uses Shopify's discount function to apply your configured discount (percentage or flat amount) at checkout.

## Creating a Classic Bundle

<Steps>
  <Step title="Create the bundle">
    Go to **Bundles** → **Create Bundle** → **Classic Bundle**
  </Step>

  <Step title="Add products">
    Search and add the products you want to bundle together. Set the quantity for each product.
  </Step>

  <Step title="Set the discount">
    Choose between:

    * **Percentage discount**: Enter a percentage (e.g., 20%). Applies proportionally to each component.
    * **Fixed amount discount**: Enter a dollar amount (e.g., \$15 off). Distributes proportionally across components.
  </Step>

  <Step title="Configure settings">
    * **Status**: Active (visible on storefront) or Paused (hidden)
  </Step>

  <Step title="Preview and save">
    Review the bundle preview. When ready, set status to **Active** and click **Save**.
  </Step>
</Steps>

## Pricing Examples

### Percentage Discount

**Bundle:** T-Shirt ($25) + Pants ($50) = $75 total   **Discount:** 20% off   **Final Total:** $60 (save \$15)

The discount applies proportionally: 20% off each component.

### Fixed Amount Discount

**Bundle:** T-Shirt ($50) + Pants ($30) = $80 total   **Discount:** $10 off\
**Final Total:** \$70

The discount is distributed proportionally:

* T-Shirt: $50 / $80 × $10 = $6.25 discount
* Pants: $30 / $80 × $10 = $3.75 discount

### Different Variant Prices

**Bundle:** T-Shirt (Small: $20, Large: $25) + Hat (\$15)\
**Discount:** 20% off

**Shopper selects Small T-Shirt:**

* Subtotal: $20 + $15 = \$35
* With 20% off: \$28

**Shopper selects Large T-Shirt:**

* Subtotal: $25 + $15 = \$40
* With 20% off: \$32

The discount applies correctly regardless of which variants are chosen.

## Variant Selection

Shoppers can select specific variants for each component product:

* **Size**: Small, Medium, Large, etc.
* **Color**: Red, Blue, Green, etc.
* **Material**: Cotton, Polyester, etc.
* **Any product options**: Works with all Shopify product options

The storefront widget shows variant selectors for each component, and the displayed total updates as selections change.

## Technical Details

### Discount Function

Classic bundles use a Shopify discount function to apply discounts at checkout. The function:

* Detects when all bundle components are in the cart (by `_appfox_classic_bundle_id` attribute)
* Applies the configured discount (percentage or flat amount)
* Only activates when **all required components** are present in the correct quantities

### Cart Attributes

Each component product added to cart includes:

* `_appfox_classic_bundle_id`: Links the item to the bundle (used by discount function)
* `appfox_bundle`: Bundle ID for analytics and order tracking

### Inventory Management

Component products' inventory decrements normally when purchased. Shopify tracks inventory for the actual products added to cart.

### No Variant Limits

The discount function approach works with any number of variant combinations. There are no limits on:

* Number of product options
* Number of variants per product
* Number of variant combinations in the bundle

## Best Practices

### Choose Complementary Products

Select products that naturally go together or solve a common problem:

* ✅ Shirt + Pants + Belt (complete outfit)
* ✅ Laptop + Mouse + Laptop Bag (work setup)
* ❌ Random unrelated products

### Set Attractive Discounts

* **10-15%**: Good starting point for most bundles
* **20-25%**: Strong incentive for higher-value bundles
* **\$X off**: Works well when you want a specific price point

### Clear Product Descriptions

Help shoppers understand what's included:

* List all component products clearly
* Mention that they can choose variants
* Highlight the savings

## Troubleshooting

### Discount not applying at checkout

**Possible causes:**

* Not all required components are in cart
* Components were added without bundle metadata (added separately, not via widget)
* Bundle status is Paused
* Discount function not deployed

**Solutions:**

* Ensure shopper adds all components via the bundle widget
* Check bundle status is Active in admin
* Verify discount function extension is deployed

### Wrong discount amount

**Cause:** Multiple bundle sets in cart

**Solution:** The discount applies per complete bundle set. If a shopper adds 2x each component, they get 2 bundles' worth of discount (expected behavior).

### Variant prices not matching

**Cause:** Component product prices changed after bundle was created

**Solution:** The discount function uses current product prices at checkout automatically. No action needed - prices always stay up to date.

### Components added separately don't get discount

**Cause:** Items must be added via the bundle widget to include bundle metadata

**Solution:** This is expected. Shoppers must use the bundle widget to get the bundle discount. Items added separately (from product pages) won't have the bundle attributes.

## FAQs

<Accordion title="Can shoppers buy just one component without the discount?">
  Yes. If they add a single component product via its normal product page (not the bundle widget), it's added at regular price with no discount.
</Accordion>

<Accordion title="What happens if a component is out of stock?">
  Out-of-stock variants cannot be selected in the bundle widget. If all variants of a required component are out of stock, the bundle cannot be purchased.
</Accordion>

<Accordion title="Can I change component prices after creating the bundle?">
  Yes. The discount function uses current product prices, so price changes automatically apply. The bundle always shows the latest prices with the discount.
</Accordion>

<Accordion title="Do Classic bundles work with subscription products?">
  No. Classic bundles are for one-time purchases. For subscriptions, create separate subscription products in your subscription app.
</Accordion>

<Accordion title="Can I limit who sees the bundle?">
  The bundle widget appears on component product pages for all visitors. Use **Status: Paused** to hide bundles. For customer-specific offers, consider discount codes instead.
</Accordion>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.