Creating Bundles Using Function

Topic summary

Main issue: Implementing Shopify Bundles via metafields and enabling a single child variant to belong to multiple parent bundles.

  • Setup per docs: Create a parent bundle product and populate metafields (component_reference, component_quantities, price_adjustments). Also define bundle data on child product variants’ metafields.
  • Problem: When a child variant is already linked to a bundle via its metafields, there appears to be no room to add data for another parent bundle. The user asks how to include one variant (child) in multiple bundles (parents) given the apparent single-use/occupied metafield space.
  • Context: Reference to Shopify documentation (Bundles sample app) and an attached screenshot of a child variant’s bundle metafields. No code provided.
  • Open questions: Whether metafields support multiple bundle entries (e.g., lists/arrays) or another approach is required to associate one variant with multiple parent bundles.
  • Status: No responses or resolution yet; guidance on multi-bundle linkage for a single variant is requested.
Summarized with AI on January 16. AI used: gpt-5.

According to the documentation when creating an bundle I need to Create a Parent bundle product and add component_reference, component_quantities and price_adjustments in the metafield of the parent bundle.

Similarly I need to define the bundle on child product variants metafields. But doing this how can include a variant(child) for multiple bundle(parent) because the space is already occupied with the previously created bundles data.

For example this screenshot is from a bundles child variant: