Product prices

product-prices — current / original / VAT split

Renders the price block of a product: current price (always), optional strikethrough for the original price (discount), optional inclusive / exclusive VAT text. Pure SCSS, no JS.

Use on product detail pages, product cards, cart line items, checkout summary. Visually consistent across all of them.

Install

npx czg-ui add product-prices

@import 'components/eshop/product-prices'; to app.scss. No JS.

Requires base.

Parameters

ParamTypeDefaultNotes
currentstring\floatCurrent price (already formatted, e.g. "1 290 Kč")
originalstring\float\nullOriginal price → rendered strike-through; show only when discounted
vatstring\null"vč. DPH 1 290 Kč" line
noVatstring\null"bez DPH 1 066 Kč" line
classstring\nullExtra wrapper class

Usage — basic

{include /app/components/Eshop/product-prices.latte,
    current => '1 290 Kč'}

Usage — discount

{include /app/components/Eshop/product-prices.latte,
    original => '1 690 Kč',
    current  => '1 290 Kč'}

Usage — full B2B view (incl. + excl. VAT)

{include /app/components/Eshop/product-prices.latte,
    current => '1 290 Kč',
    vat     => 'vč. DPH 1 290 Kč',
    noVat   => 'bez DPH 1 066 Kč'}

Override styles per project

The component uses CSS variables for the most opinionated bits:

$product-prices-current-color: $cgui-color-discount;   // brand red
$product-prices-current-size:  20px;

@import 'components/eshop/product-prices';

When NOT to use

  • Sale-price negotiation tables (B2B price tiers per quantity) —

build a real <table>

  • Subscription pricing with billing period — use a dedicated pricing

card with the /month / /year toggle

Live preview

ui.czechgroup.cz/component/product-prices

Další kategorie