diff --git a/.changeset/dull-otters-cheer.md b/.changeset/dull-otters-cheer.md new file mode 100644 index 0000000000..117aa3ac41 --- /dev/null +++ b/.changeset/dull-otters-cheer.md @@ -0,0 +1,5 @@ +--- +"@medusajs/product": patch +--- + +feat(product): allow variant search by product properties diff --git a/packages/modules/product/src/models/product-variant.ts b/packages/modules/product/src/models/product-variant.ts index b5e203f98a..5bd3d832a9 100644 --- a/packages/modules/product/src/models/product-variant.ts +++ b/packages/modules/product/src/models/product-variant.ts @@ -25,6 +25,7 @@ const ProductVariant = model .belongsTo(() => Product, { mappedBy: "variants", }) + .searchable() .nullable(), options: model.manyToMany(() => ProductOptionValue, { pivotTable: "product_variant_option",