Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Render price range properly
Marcin Gębalae56864dd1884
diff --git a/saleor/static/js/components/categoryPage/ProductPrice.js b/saleor/static/js/components/categoryPage/ProductPrice.jsindex b3b75bf2de..e75397bd01 100644--- a/saleor/static/js/components/categoryPage/ProductPrice.js+++ b/saleor/static/js/components/categoryPage/ProductPrice.js@@ -3,11 +3,13 @@ import Relay from 'react-relay';const ProductPrice = ({ availability }) => {- const { discount, priceRange } = availability;+ const { discount, priceRange: { minPrice, maxPrice } } = availability;+ const isPriceRange = minPrice.gross !== maxPrice.gross;return (<div><span itemProp="price">- {priceRange.minPrice.gross} <span className="currency"> {priceRange.minPrice.currency}</span>+ {isPriceRange && <span>From </span>}+ {minPrice.gross} <span className="currency"> {minPrice.currency}</span></span>{discount && (<div className="product-list__sale"><span>Sale</span></div>