Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Display price with discount on category page
Miracba2a016e7ad
diff --git a/saleor/static/js/components/categoryPage/ProductPrice.js b/saleor/static/js/components/categoryPage/ProductPrice.jsindex e6f928c1b7..c420e19f13 100644--- a/saleor/static/js/components/categoryPage/ProductPrice.js+++ b/saleor/static/js/components/categoryPage/ProductPrice.js@@ -6,11 +6,10 @@ import SaleImg from '../../../images/sale_bg.svg';const ProductPrice = ({ availability, price }) => {const { discount, priceRange } = availability;const isPriceRange = priceRange && priceRange.minPrice.gross !== priceRange.maxPrice.gross;- const gross = isPriceRange ? priceRange.minPrice.grossLocalized : price.grossLocalized;return (<div><span itemProp="price">- {isPriceRange && <span>{gettext('from')} </span>} {gross}+ {isPriceRange && <span>{gettext('from')} </span>} {priceRange.minPrice.grossLocalized}</span>{discount && (<div className="product-list__sale"><img src={SaleImg}/><span>{gettext('Sale')}</span></div>