<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=920006783769328&amp;ev=PageView&amp;noscript=1">

Case Study: Custom Product Quantity Selection Using Shopify Metafields

featureimage

 

A premium fragrance brand built its bestselling product around choice: one listing, five scents, customers free to combine exactly two or three into a set of their own. The catch: Shopify had no way to enforce that rule, leaving room for a customer to complete an order that didn't match what they'd actually built.

 

Client Overview

 

Industry Premium fragrance and beauty
Project Type Custom Shopify product and cart development
Goal Enforce a strict 2-or-3 variant selection rule with full cart transparency
Tech Stack Shopify Metafields, Liquid, JavaScript, Line Item Properties

 

The Challenge: A Selection Rule Shopify Couldn't Enforce

 

That gap showed up in every place a normal Shopify build doesn't expect it to:

 

  • Shopify's native variant system has no way to enforce “choose exactly N from a group”
  • Default cart templates don't display a custom multi-variant selection, only standard line items
  • Wrong selections would only surface at checkout, risking failed orders and support tickets
  • Any solution had to stay fully compatible with checkout, tax, and fulfillment
  • The client wanted admin-level control to adjust variant rules without developer involvement

 

The Solution: Metafields, Custom Logic, and Cart Transparency

 

Metafields for admin control

 

  • Custom metafields to store available variants, selection rules (min/max), and display labels
  • Fully editable from the Shopify admin, no code changes needed for future rule updates

 

Custom product page logic

 

  • Built with Liquid and JavaScript for real-time selection feedback
  • Add to Cart disabled until the 2-or-3 rule is satisfied
  • Invalid combinations blocked before checkout, not caught after

 

Cart-level transparency

 

  • Line item properties used to carry the exact selected variant names into the cart
  • Cart template customized to display those names clearly under the product title

 

Checkout compatibility

 

  • No changes to payment, shipping, or tax logic
  • Selected variants flow through as standard, accurate order data

 

The Results: A Rule-Compliant, Transparent Buying Experience

 

Before After
No way to enforce “choose exactly 2 or 3 variants” Selection rule enforced automatically, before checkout
Cart showed generic line items, no variant clarity Cart clearly displays the exact variants a customer selected
Rule changes required developer involvement Store admin updates rules directly, no code needed
Invalid selections only caught at checkout, if at all Add to Cart blocked until the selection is valid
  Fewer support queries tied to selection confusion
  A scalable foundation for future combo, bundle, or mix-and-match products

 

Industry context: Guided, transparent selection is a proven order-value lever. Shopify's own data shows skincare brand HiSmile pushed over 80% of orders into bundled purchases, lifting average cart size 4x. That's industry evidence, not this client's number, but it reflects the same mechanic at work.

 

The Takeaway

 

This wasn't a plugin fix. It was a rebuild of exactly the part of the buying experience where the brand's product idea and Shopify's default logic didn't agree. Get that piece right, and a complex merchandising idea stops being a liability at checkout and starts being the reason customers convert with confidence.

 

Need a Shopify Feature That Doesn't Exist Out of the Box?

 

If your business has a rule, a workflow, or a customer experience that Shopify's default tools can't express, that's exactly the kind of problem we solve.

 

Talk to Our Shopify Team →