Skip to content

Commit

Permalink
Merge pull request #2302 from graphcommerce-org/fix/tier-prices
Browse files Browse the repository at this point in the history
Fixed tier prices not working for non-configurable products
  • Loading branch information
paales authored Jun 24, 2024
2 parents bd44272 + 6b7f908 commit 59be9b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-pumas-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphcommerce/magento-product-configurable": patch
---

Fixed tier prices not working for non-configurable products
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const ConfigurableProductPagePriceTiers = (
const { Prev, product, index, ...rest } = props
const variant = useConfigurableSelectedVariant({ url_key: product.url_key, index })

if (!variant) return null
if (!variant || product.__typename !== 'ConfigurableProduct')
return <Prev product={product} {...rest} />

return <Prev product={variant} {...rest} />
return <Prev product={{ ...variant, options: product.options }} {...rest} />
}

export const Plugin = ConfigurableProductPagePriceTiers

0 comments on commit 59be9b2

Please sign in to comment.