0f57b6fdef
* calculate regular price for line item and return in API `line_subtotal` * restore `line_subtotal` api field to previous behaviour * correctly handle discounts on cart line items: - return product `prices` in cart items endpoint - calculate full price and discount on client using product regular_price * quantity in cart * add product prices to preview cart API data * show product sale price discount in "save" badge: - previously we were displaying any effective discount, e.g. from coupons which apply to whole cart - now this badge will only display discount due to product on sale - much simpler * rename sale badge class (discount => sale) * clarify docs for line_subtotal - includes sale prices, not coupons * clarify line_total docs * add prices to schema (fix unit test) * fix schema unit test - return `prices` as object, consistent with `totals` * Further line total rewording Co-authored-by: Mike Jolley <mike.jolley@me.com> |
||
---|---|---|
.. | ||
css | ||
img | ||
js |