Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
Product Price
vtex.store-components
Version: 3.150.0
Latest version: 3.178.1

This page is about version 3.150.0 of the app, which is not the most recent version. The latest stable version is 3.178.1.

{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAIAAAB2XpiaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVR4nGNoYGD6v3v+/6ask37WACanBhm9KoMJAAAAAElFTkSuQmCC","img":{"src":"https://img.shields.io/badge/-Deprecated-red","width":73,"height":20,"type":"svg"}}

:warning: The Product Price block has been deprecated in favor of the Product Price app. Although support for this block is still granted, we strongly recommend you to update your store theme with the Product Price's blocks in order to keep up with the component's evolution.

The ProductPrice is responsible for displaying the price of a given product.

{"base64":"  ","img":{"width":2094,"height":1084,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":408904,"url":"https://user-images.githubusercontent.com/284515/70233684-d3ad1100-173d-11ea-8582-4acf52263521.png"}}

Configuration

  1. Import the vtex.store-component app to your theme's dependencies in the manifest.json;

_10
"dependencies": {
_10
"vtex.store-components": "3.x"
_10
}

  1. Add the product-price block to any block below store.product (Product template). For example:

_16
"store.product": {
_16
"children": [
_16
"flex-layout.row#product",
_16
]
_16
},
_16
"flex-layout.row#product": {
_16
"children": [
_16
"product-price"
_16
]
_16
},
_16
"product-price": {
_16
"props": {
_16
"showSavings": true,
_16
"showListPrice": false
_16
}
_16
},

Prop nameTypeDescriptionDefault value
labelSellingPriceStringProduct selling price labelnull
labelListPriceStringProduct list price labelnull
showListPriceBooleanSet visibility of list pricetrue
sellingPricesArrayProduct list of selling prices[]
showSellingPriceRangeBooleanSet visibility of selling price rangefalse
showListPriceRangeBooleanSet visibility of list price rangefalse
showLabelsBooleanSet visibility of labelstrue
showInstallmentsBooleanSet visibility of installmentsfalse
showSavingsBooleanSet visibility of savingsfalse
blockClassStringThe set value functions as a customization identifier for any CSS specified in the blocknull

Customization

In order to apply CSS customizations in this and other blocks, follow the instructions given in the recipe on Using CSS Handles for store customization.

CSS Handles
price_className
price_loader
price_listPriceContainer
price_listPriceLabel
price_listPrice
price_listPriceRange
price_sellingPriceRange
price_sellingPriceContainer
price_sellingPriceLabel
price_sellingPrice
price_savingsContainer
price_savings
price_installment
price_interestRate
price_installmentContainer
See also
Vtex.store Components
VTEX IO Apps
VTEX App Store
VTEX IO Apps