Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
Checkout Cart
Official extension
Version: 0.35.3
Latest version: 0.35.3

{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAIAAAB2XpiaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVR4nGPg4+Mz1Nfjl5T7f2c+AAzxA3lptuDWAAAAAElFTkSuQmCC","img":{"src":"https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square","width":110,"height":20,"type":"svg"}}

USE AT YOUR OWN RISK

This is an ongoing project. We do not guarantee any results after installation.

This app is available to stores using vtex.edition-store@4.x Edition App. To check which Edition App is installed on your account, run vtex edition get. If it's a different Edition, please open a ticket to VTEX Support asking for the installation of the vtex.edition-store@4.x Edition App.

Checkout Cart compiles all the necessary apps to deliver a full solution for your store's shopping cart.

It renders:

  • The Product List app, which displays the list of products included in the cart by the store customer, covering the capability of removing or changing the number of products included in the cart.
  • The Checkout Summary app, which provides information regarding the total price of the purchase and coupon options.
  • The Shipping Calculator app, which provides delivery options.

{"base64":"  ","img":{"width":1920,"height":1387,"type":"gif","mime":"image/gif","wUnits":"px","hUnits":"px","length":865645,"url":"https://user-images.githubusercontent.com/60782333/100383059-76b80400-2ffb-11eb-9a0c-1a253e558e90.gif"}}

The data consumed by the Checkout Cart is fetched from the Checkout OrderForm API.

Configuration

  1. Import the vtex.checkout-cart app to your theme's dependencies in the manifest.json as shown below:

_10
"dependencies": {
_10
"vtex.checkout-cart": "0.x"
_10
}

  1. Add the title block to the Checkout template. For example:

_10
"title": {
_10
"props": {
_10
"id": "title-example",
_10
"itemCountMode": "totalAvailable"
_10
}
_10
},

The following props are available to configure the behavior of the Checkout Cart app according to your scenario.

Prop nameTypeDescriptionDefault value
itemCountModeenumDefines the behavior of the number of products in the cart. This value is displayed in the string next to "Cart" (e.g., "1 product"). Possible values are: total (the string displays the number of items added to the cart), distinct (only displays the number of different products added to the cart), totalAvailable (displays the number of available items added to the cart), and distinctAvailable (displays the number of different and available products added to the cart).distinct

To configure other behaviors, check the Product List, Shipping Calculator and Checkout Summary documentations.

Translatable objects

It's possible to overwrite or translate the following messages using the Messages Builder.

Message IDDefault value
store/cart.continueShoppingContinue shopping
store/cart.titleCart
store/cart.items({itemsQuantity, plural, one {# product} other {# products}})
store/cart.emptyState.titleThe cart is empty
store/cart.emptyState.messageAdd products by navigating through categories or by searching for them.
store/cart.emptyState.buttonChoose products
store/cart.checkoutCheckout
store/cart.removeToastProduct {name} was removed from the cart
store/cart.priceChangedToastThe price of the product was changed

Checkout Cart is one of the apps that constitute Checkout IO. For more information about this app, follow this link to check its documentation.

Advanced configuration

By default, the Checkout Cart app is composed of the following blocks, declared in the /store/blocks.json file:

  • checkout-cart-single-col: Cart template used for desktop and tablet devices.
  • checkout-cart-two-cols: Cart template used for mobile devices.
  • empty-state: Cart template, as pictured below, used when the shopping cart is empty.

{"base64":"  ","img":{"width":1920,"height":944,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":103848,"url":"https://user-images.githubusercontent.com/60782333/100352159-583a1480-2fcb-11eb-940d-32e31a4abcae.png"}}

Notice that it's possible to change these layouts by modifying the files stored in the /store/blocks folder, publishing and releasing your own app. However, keep in mind that, VTEX bears no responsibility with any of these modifications, nor provide support for them.

VTEX does not bear any responsibility with apps that the vendor is different from vtex, nor provide support for them.

See also
VTEX App Store
VTEX IO Apps