fix(dashboard): updated variant title is used when creating product (#10155)
This commit is contained in:
@@ -25,7 +25,6 @@ const ProductCreateVariantSchema = z.object({
|
||||
weight: optionalInt,
|
||||
material: z.string().optional(),
|
||||
origin_country: z.string().optional(),
|
||||
custom_title: z.string().optional(),
|
||||
sku: z.string().optional(),
|
||||
manage_inventory: z.boolean().optional(),
|
||||
allow_backorder: z.boolean().optional(),
|
||||
|
||||
@@ -53,8 +53,7 @@ export const normalizeVariants = (
|
||||
regionsCurrencyMap: Record<string, string>
|
||||
) => {
|
||||
return variants.map((variant) => ({
|
||||
title:
|
||||
variant.custom_title || Object.values(variant.options || {}).join(" / "),
|
||||
title: variant.title || Object.values(variant.options || {}).join(" / "),
|
||||
options: variant.options,
|
||||
sku: variant.sku || undefined,
|
||||
manage_inventory: !!variant.manage_inventory,
|
||||
|
||||
Reference in New Issue
Block a user