Giter VIP home page Giter VIP logo

sonoma-product-summary's Introduction

đŸ“ĸ Use this project, contribute to it or open issues to help evolve it using Store Discussion.

Product Summary

All Contributors

Product Summary is an app responsible for summarizing product information (such as name, price and image) in other store blocks, such as the Shelf and the Minicart.

image

Configuration

  1. Import the vtex.product-summary app to your theme's dependencies in the manifest.json:
  "dependencies": {
    "sonoma.product-summary": "2.x"
  }

Now, you are able to use all blocks exported by the product-summary app. Check out the full list below:

Block name Description
list-context.product-list https://img.shields.io/badge/-Mandatory-red Renders the list of products in the Product Summary component. It is responsible for fetching product data and providing it to the product-summary.shelf block. The last one, in turn, provides the product data to its children blocks.
product-summary.shelf https://img.shields.io/badge/-Mandatory-red Logical block responsible for providing the needed structure for the Product Summary component through its child blocks (listed below).
product-summary-attachment-list Renders a list for the product attachments.
product-summary-brand Renders the product brand.
product-summary-buy-button Renders the Buy Button. Notice that this block should only be configured if your store still uses the Minicart v1. When using the Minicart v2, you should configure the Add To Cart Button instead.
product-summary-description Renders the product description.
product-summary-image Renders the product image.
product-summary-name Renders the product name.
product-summary-sku-name Renders the selected sku name.
product-summary-price https://img.shields.io/badge/-Deprecated-red The Product Summary Price block, responsible for rendering the product price, has been deprecated in favor of the Product Price app. Although support for this block is still granted, we strongly recommend you to use the Product Price app's blocks instead.
product-summary-sku-selector Renders the SKU Selector block.
product-specification-badges Renders badges based on the product specifications.
  1. Add the list-context.product-list block to the store theme template where you desire to display a product list and declare the product-summary.shelf in its block list. For example:
{
  "list-context.product-list": {
    "blocks": ["product-summary.shelf"]
  },

ℹī¸ *Notice that although the product-summary.shelf refers to the shelf component in its name, the block does not need to be necessarily used when building a Shelf component. It can and should be used whenever you want to render summarizing product information in other components as well, such as the Minicart and those found on the Search Results page.

  1. Then, based on the product information you desire to have rendered in the product list, choose which blocks from the exported list above will be sent as the product-summary.shelf children. In a scenario in which we want to display the product name, description, image, price, a SKU selector and then a Buy Button, it would go as follows:
{
  "list-context.product-list": {
    "blocks": ["product-summary.shelf"]
  },

  "product-summary.shelf": {
    "children": [
      "product-summary-name",
      "product-summary-description",
      "product-summary-image",
      "product-summary-price",
      "product-summary-sku-selector",
      "product-summary-buy-button"
    ]
  }
}

ℹī¸ In order to configure and better understand each of the Product Summary exported blocks, go through their respective documentation.

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
aspectRatio
buyButton
buyButtonContainer
clearLink
column
container
containerNormal
containerSmall
containerInline
description
element
image
imageContainer
imagePlaceholder
information
isHidden
nameContainer
priceContainer
quantityStepperContainer
spacer

Contributors ✨

Thanks goes to these wonderful people:


gustavopvasconcellos

đŸ’ģ

Daniel Piva

đŸ’ģ

This project follows the all-contributors specification. Contributions of any kind are welcome!

sonoma-product-summary's People

Contributors

jgfidelis avatar estacioneto avatar klzns avatar victorhmp avatar vitoria avatar theomoura avatar lbebber avatar arthursampaio avatar nocelli avatar guerreirobeatriz avatar klynger avatar lucasecdb avatar thalytafabrine avatar gugabribeiro avatar hiagolcm avatar fanny avatar tlgimenes avatar kaisermann avatar gustavorosolem avatar juanalmeida12 avatar salesfelipe avatar camilavcoutinho avatar paul0vinicius avatar git-the-sanz avatar vwraposo avatar lucis avatar wender avatar iaronaraujo avatar daniserejo avatar thayannevls avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.