Product page sub-group

Topic summary

A user wants to replicate a product page design where fabric/color options are organized into separate visual groups (e.g., “Performance Textured Weave,” “Woven Chenille,” “Velvet”) with independent color swatches, rather than combined in a single variant dropdown.

Two implementation approaches suggested:

  1. Metafields Method (Recommended for inventory tracking):

    • Create custom metafields to tag variants by fabric type
    • Customize theme template to group and display swatches by fabric category
    • Maintains proper variant-level inventory control
  2. Line Item Properties Method (Simpler, no inventory tracking):

    • Add custom form inputs for each fabric group
    • Use JavaScript to handle selections
    • Selections appear as line item properties in cart

Current Status:
The original poster has requested step-by-step implementation assistance. The responder offered help and provided example Liquid code snippets, but detailed setup instructions are pending.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

hi,

I’m trying to create a product page similar to the example shown in the attached screenshot. Specifically, I want to organize the fabric or color options into separate categories—like “Performance Textured Weave,” “Woven Chenille,” and “Velvet”—with each group displaying its own color swatches. The key point is that these options should appear independently and not be linked together as a single variant dropdown.

Their website link: https://7thavenue.co/products/4-seat-sectional?variant=42909080322291

Hope someone can help me with this

1 Like

Hello @FrogMan25

Thank you for providing the link to the 7th Avenue product page. Upon reviewing it, I see that their product page showcases fabric options grouped under distinct headings like “Performance Textured Weave,” “Woven Chenille,” and “Velvet,” each accompanied by its own set of color swatches. These swatches are organized into separate sections, allowing customers to view and select fabric types and colors independently, rather than through a single variant dropdown.

To achieve a similar layout on your Shopify product page, you can consider the following approaches:

Option 1: Using Metafields to Group Fabric Options
Shopify allows you to add custom metafields to products, which can be utilized to group fabric options. By assigning a metafield for the fabric type to each variant, you can then customize your theme to display swatches grouped under their respective fabric type headings.

Steps:

  1. Define Metafields:

. In your Shopify admin, navigate to Settings > Custom data > Products.

. Create a new metafield definition, for example, Fabric Type, with a single-line text type.

  1. Assign Metafields to Variants:

. For each product variant, assign the appropriate fabric type in the metafield you just created.

  1. Customize Theme to Display Grouped Swatches:

. Edit your product template to loop through variants, grouping them by the Fabric Type metafield.

. Display each group with a heading and its corresponding color swatches.

Example Liquid Code:

{% assign fabric_groups = product.variants | map: 'metafields.custom.fabric_type' | uniq %}

{% for group in fabric_groups %}
  #### {{ group }}
  
    {% for variant in product.variants %}
      {% if variant.metafields.custom.fabric_type == group %}
        
      {% endif %}
    {% endfor %}
  

{% endfor %}

Note: Ensure that each variant has a color_hex metafield for the swatch color.

Option 2: Utilizing Line Item Properties
If your fabric options do not need to track inventory separately, you can use line item properties to collect fabric selections. This method allows for more flexibility in displaying options but doesn’t associate selections with specific variants.

Steps:

  1. Modify Product Form:

. Edit your product form to include custom inputs for each fabric group and its colors.

  1. Handle Selections:

. Use JavaScript to manage the selection of fabric types and colors, ensuring only one selection per group.

  1. Display Selections in Cart:

Line item properties will automatically display selected options in the cart and order details.

Example HTML Structure:


  #### Performance Textured Weave
  
  

  #### Woven Chenille
  

Recommendation
If managing inventory for each fabric and color combination is essential, Option 1 using metafields is the preferred approach. It allows for precise control over variant inventory and provides a structured way to display grouped swatches.

If inventory tracking is not required for each combination, Option 2 offers greater flexibility in presentation and is simpler to implement.

if you need help plz let me know

Thank you :blush:

Hi,

thank you so much for your reply. Yes, could you help me with steps to set it up?

Thank you!

1 Like

Hi,

yes, I will need additional help with steps.