Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
VTEX IO Apps
Store Framework
VTEX Product Summary
Official extension
Version: 2.43.0
Latest version: 2.92.0

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

Description

The VTEX Product Summary summarises the product informations such as name, price and picture. This is a VTEX app that is used by store theme.

:loudspeaker: Disclaimer: Don't fork this project; use, contribute, or open issue with your feature request

Release schedule

ReleaseStatusInitial ReleaseMaintenance LTS StartEnd-of-lifeStore Compatibility
[2.x]Current Release2018-11-282.x
[1.x]Maintenance LTS2018-08-212018-11-28March 20191.x

See our LTS policy for more information.

Table of Contents

Usage

This app uses our store builder with the blocks architecture. To know more about Store Builder click here.

To use this app or override the default CSS you need import it in your dependencies on manifest.json file.


_10
"dependencies": {
_10
"vtex.product-summary": "2.x"
_10
}

Then, add product-summary block into our app theme, as we do in our Minicart app.

Now, you can change the behavior of the product-summary block that is in the minicart. See an example of how to configure:


_13
"product-summary": {
_13
"props": {
_13
"isOneClickBuy": false,
_13
"showBadge": true,
_13
"badgeText": "OFF",
_13
"displayBuyButton": "displayButtonHover",
_13
"showCollections": false,
_13
"showListPrice": true,
_13
"showLabels": false,
_13
"showInstallments": true,
_13
"showSavings": true
_13
}
_13
}

Blocks API

When implementing this app as a block, various inner blocks may be available. The following interface lists the available blocks within product summary and describes if they are required or optional.


_10
{
_10
"product-summary": {
_10
"component": "index",
_10
"allowed": ["add-to-list-btn#product-summary"]
_10
},
_10
"add-to-list-btn#product-summary": {
_10
"component": "*"
_10
}
_10
}

This block has as allowed block the add-to-list-btn#product-summary one.

Configuration

Through the Storefront, you can change the product-summary's behavior and interface. However, you also can make in your theme app, as Store theme does.

Prop nameTypeDescription
showListPriceBooleanShows the product list price
isOneClickBuyBooleanShould redirect to checkout after clicking on buy
showLabelsBooleanSet pricing labels' visibility
showInstallmentsBooleanSet installments' visibility
showBordersBooleanSet product's borders visibility
showBadgeBooleanSet the discount badge's visibility
showDescriptionBooleanSet product's description visibility
labelSellingPriceStringText of selling price's label
labelListPriceStringText of list price's label
badgeTextStringText shown on badge
buyButtonTextStringCustom buy button text
displayBuyButtonEnumSet display mode of buy button (displayButtonAlways, displayButtonHover, displayButtonNone)
hideBuyButtonBooleanHides the buybutton completely
showCollectionsBooleanSet collection badges' visibility
displayModeEnumSet display mode of product summary (normal, small, inline or inlinePrice)
showQuantitySelectorBooleanSet the quantity selector visibility
priceAlignLeftBooleanSet the price to be left aligned

Also, you can configure the block add-to-list-btn#product-summary defined on product-summary.

Styles API

This app provides some CSS classes as an API for style customization.

To use this CSS API, you must add the styles builder and create an app styling CSS file.

  1. Add the styles builder to your manifest.json:

_10
"builders": {
_10
"styles": "1.x"
_10
}

  1. Create a file called vtex.product-summary.css inside the styles/css folder. Add your custom styles:

_10
.container {
_10
margin-top: 10px;
_10
}

CSS Namespaces

Below, we describe the namespaces that are defined in the product-summary.

Token nameComponentDescription
containerProductSummaryNormal, ProductSummarySmall, ProductSummaryInlineThe main container of ProductSummary
containerNormalProductSummaryNormalThe main container of ProductSummary in normal display mode
containerSmallProductSummarySmallThe main container of ProductSummary in small display mode
containerInlineProductSummaryInlineThe main container of ProductSummary in inline display mode
elementProductSummaryNormal, ProductSummarySmall, ProductSummaryInlineThe subcontainer of ProductSummary
clearLinkProductSummaryNormal, ProductSummarySmall, ProductSummaryInlineThe link container of ProductSummary
informationProductSummaryNormal, ProductSummarySmall, ProductSummaryInlineThe information container of ProductSummary
imageContainerProductSummaryNormal, ProductSummarySmall, ProductSummaryInlineThe image container
imageProductImageThe product image
aspectRatioImageThe image aspect ratio
nameContainerProductSummaryNameThe product name container
priceContainerProductSummaryNormal, ProductSummarySmall, ProductSummaryInlineThe product price container
buyButtonContainerProductSummaryNormal, ProductSummarySmall, ProductSummaryInlineThe buy button container
buyButtonProductSummaryBuyButtonThe buy button
isHiddenProductSummaryBuyButtonStyle used when buy button is hidden
descriptionProductSummaryNormalThe product description
quantityStepperContainerProductSummaryInlinePriceThe quantity stepper container
imagePlaceholderProductImageProduct image placeholder class

Troubleshooting

You can check if others are passing through similar issues here. Also feel free to open issues or contribute with pull requests.

Contributing

Check it out how to contribute with this project.

Tests

To execute our tests go to react/ folder and run yarn test

Travis CI

{"base64":"  ","img":{"width":98,"height":20,"type":"svg","mime":"image/svg+xml","wUnits":"px","hUnits":"px","length":730,"url":"https://api.travis-ci.com/vtex-apps/product-summary.svg?branch=master"}}
{"base64":"  ","img":{"width":99,"height":20,"type":"svg","mime":"image/svg+xml","wUnits":"px","hUnits":"px","length":724,"url":"https://s3.amazonaws.com/assets.coveralls.io/badges/coveralls_53.svg"}}

Upcoming documentation:

See also
VTEX App Store
VTEX IO Apps
ProductSummaryAttachmentList
VTEX IO Apps
ProductSummaryName
VTEX IO Apps
ProductSummaryDescription
VTEX IO Apps
ProductSummarySpecificationBadges
VTEX IO Apps
ProductSummaryImage
VTEX IO Apps
ProductSummaryBrand
VTEX IO Apps
ProductSummaryBuyButton
VTEX IO Apps
ProductSummaryPrice
VTEX IO Apps
ProductSummarySKUSelector
VTEX IO Apps
Was this helpful?