Skip to content

Commit

Permalink
Adding VTEX teasers to product (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucis authored Aug 9, 2023
1 parent 94407e8 commit 27bedc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions commerce/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ export interface Offer extends Omit<Thing, "@type"> {
seller?: string;
/** The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */
sku?: string;
/** Used by some ecommerce providers (e.g: VTEX) to describe special promotions that depend on some conditions */
teasers?: Array<Record<string, unknown>>;
}

export interface AggregateOffer {
Expand Down
1 change: 1 addition & 0 deletions packs/vtex/utils/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ const toOffer = ({
seller: sellerId,
priceValidUntil: offer.PriceValidUntil,
inventoryLevel: { value: offer.AvailableQuantity },
teasers: offer.teasers,
priceSpecification: [
{
"@type": "UnitPriceSpecification",
Expand Down

0 comments on commit 27bedc5

Please sign in to comment.