Skip to content

Commit

Permalink
feat: add sku modal type to additional properties (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitoUwu authored Jan 21, 2025
1 parent 90838fb commit a93b388
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions vtex/utils/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,14 @@ export const toProduct = <P extends LegacyProductVTEX | ProductVTEX>(
value: estimatedDateArrival,
});

if (sku.modalType) {
additionalProperty.push({
"@type": "PropertyValue",
name: "Modal Type",
value: sku.modalType,
});
}

return {
"@type": "Product",
category: categoriesString,
Expand Down
2 changes: 1 addition & 1 deletion vtex/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ export interface Item {
referenceId?: Array<{ Key: string; Value: string }>;
measurementUnit: string;
unitMultiplier: number;
modalType: unknown | null;
modalType: string | null;
images: Image[];
videos: string[];
variations: Array<{
Expand Down

0 comments on commit a93b388

Please sign in to comment.