Price
The product's price; for a product on sale, the old price struck through beside it.
zb:shop.price zubazar/ui-pro
This component is in Zubazar UI Pro; Zubazar UI Pro brings Zubazar UI with it. Installing Zubazar UI Pro →
On a card
BLADE
The default small size is the product card's price; the preview shows a product on sale and one at full price.
<zb:shop.price :product="$product" />
On the product page
BLADE
size="lg" is the large price under the product page's title.
<zb:shop.price :product="$product" size="lg" />
Amounts and currency
PHP
Prices are integers in the currency's minor unit (cents, kuruş); the currency sign comes from the currency_symbol setting.
// config/zubazar-ui-pro.php (commerce)
'currency_symbol' => '₺',
// The product's data: a price of 2,499 and an old price of 2,999
Product::fromArray([..., 'price' => 249900, 'old_price' => 299900]);
| Prop | Values |
|---|---|
249900 | ₺2,499 (₺2.499 on a Turkish page) |
7990 | ₺79.90 (₺79,90 on a Turkish page) |
Props
The values the component takes. What are props and slots?
| Prop | Type | Default | Description |
|---|---|---|---|
product | — | — | The product whose price is shown; required |
size | — | sm | sm: a card · lg: the product page |
Developer notes
- The old price (
old_price) only shows when it is higher than the price; screen readers read the two amounts as "Price" and "Old price". - The amount is formatted for the page's language, always with two decimals (₺2,499.00, ₺79.90).