Contextual price for ExpandedItems in Expand Operation

Is it possible to get the contextual price for an Expanded Item in the Expand Operation?

Contextual price being the current price of the product based on the users Market and/or Company/Price List.

In the Price Per Component example app - a singular price is saved within the metafield for the parent product:

bundledComponentData: {
  value: JSON.stringify([
    { id: "gid://shopify/ProductVariant/2", price: "25.00" },
    { id: "gid://shopify/ProductVariant/3", price: "25.00" },
  ]),
},

This solution only works for the products home price.

It would be possible to convert this with presentmentCurrencyRate, but this would not account for % increase/decrease, or fixed price settings for Markets.

It would be possible to save all prices from all Markets but this becomes unrealistic/unwieldy at scale.

The example also doesn’t account for B2B Prices.

Merge is not suitable
Merge might be suitable for some circumstances, but I’m speaking directly to this example, and the use of Expand and Price Per Components.

1 Like