Skip to content

Commit 75a5ccb

Browse files
feat: filter product options to exclude single-value and default title options
1 parent 0436988 commit 75a5ccb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/pages/store/products/[handle].tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,14 @@ const ProductDetailPage: React.FC<ProductDetailPageProps> = ({ product }) => {
263263
)}
264264

265265
{/* Options (Size, Color, etc.) */}
266-
{product.options.map((option) => (
266+
{product.options
267+
.filter((option) => {
268+
// Only show options with multiple values
269+
// Hide default Shopify "Title" option with "Default Title" value
270+
return option.values.length > 1 &&
271+
!(option.name === 'Title' && option.values.includes('Default Title'));
272+
})
273+
.map((option) => (
267274
<div key={option.id} className="tw-mb-6">
268275
<label className="tw-block tw-font-semibold tw-text-secondary tw-mb-3">
269276
{option.name}

0 commit comments

Comments
 (0)