From 9a3c684c9da6edf49fe405f15306b0ec30459680 Mon Sep 17 00:00:00 2001 From: Darren Ethier Date: Mon, 12 Jun 2023 16:40:57 -0400 Subject: [PATCH] consider price ranges on current price --- .../price-v2/inner-blocks/current-price/block.tsx | 4 ++++ .../price-v2/inner-blocks/current-price/edit.tsx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx b/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx index 62e08ffa3a2..876382039fa 100644 --- a/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx +++ b/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/block.tsx @@ -18,6 +18,8 @@ const Block = ( { attributes, context, rawPrice, + minPrice, + maxPrice, currency, }: Props ): JSX.Element | null => { const { className } = attributes; @@ -51,6 +53,8 @@ const Block = ( { price={ isDescendentOfSingleProductTemplate ? pricePreview : rawPrice } + minPrice={ minPrice } + maxPrice={ maxPrice } /> ); }; diff --git a/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/edit.tsx b/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/edit.tsx index 91410316078..d72e93651ef 100644 --- a/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/edit.tsx +++ b/assets/js/atomic/blocks/product-elements/price-v2/inner-blocks/current-price/edit.tsx @@ -33,6 +33,8 @@ const CurrentPriceEdit = ( { attributes, context }: Props ): JSX.Element => { currency, context, rawPrice: currentPrice, + minPrice: product?.prices?.price_range?.min_amount, + maxPrice: product?.prices?.price_range?.max_amount, priceType: 'current', }; return (