Open github-learning-lab[bot] opened 4 years ago
:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::x::white_check_mark::x::x:
:white_check_mark: Getting the file :white_check_mark: First test - Code compilation :white_check_mark: store.home must contain responsive layouts mobile and desktop :white_check_mark: Desktop's image and rich text must be correctly stated :white_check_mark: Mobile's image and rich text must be correctly stated :x: You haven't declared the props text,textPosition,textAlignment from rich-text#mobile correctly. Review their names and values. :white_check_mark: Rich-text Desktop props must be correclty declared :x: You haven't declared the props alt,link,maxWidth,src from image#mobile correctly. Review their names and values. :x: You haven't declared the props src,link,alt,maxWidth from image#desktop correctly. Review their names and values.
:white_check_mark::white_check_mark::x::white_check_mark::white_check_mark::x::white_check_mark::x::x:
:white_check_mark: Getting the file :white_check_mark: First test - Code compilation :x: You havent declared responsive-layout.desktop#desktop,responsive-layout.mobile#mobile on you store.home :white_check_mark: Desktop's image and rich text must be correctly stated :white_check_mark: Mobile's image and rich text must be correctly stated :x: You haven't declared the props text,textPosition,textAlignment from rich-text#mobile correctly. Review their names and values. :white_check_mark: Rich-text Desktop props must be correclty declared :x: You haven't declared the props alt,link,maxWidth,src from image#mobile correctly. Review their names and values. :x: You haven't declared the props src,link,alt,maxWidth from image#desktop correctly. Review their names and values.
:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::x::white_check_mark::white_check_mark::white_check_mark:
:white_check_mark: Getting the file :white_check_mark: First test - Code compilation :white_check_mark: store.home must contain responsive layouts mobile and desktop :white_check_mark: Desktop's image and rich text must be correctly stated :white_check_mark: Mobile's image and rich text must be correctly stated :x: You haven't declared the props text,textPosition,textAlignment from rich-text#mobile correctly. Review their names and values. :white_check_mark: Rich-text Desktop props must be correclty declared :white_check_mark: Image Mobile props must be correclty declared :white_check_mark: Image Desktop props must be correclty declared
Product shelf
:sparkles: Branch: shelf
Introduction
The next block that we'll use is the Shelf, on which we display a product collection. This session will show you how to render and configure this shelf on your store's homepage.
Shelf
After a closer look at the Shelf documentation, we see that it's possible to configure which product collection we want to have displayed using either
category
,specificationFilters
orcollection
props, according to the products added in the catalog.Other props help to configure how the items are displayed. It's important to remember that the
shelf
component always requests thatproduct-summary
type blocks be part of its composition. Check out the product-summary block's documentation for more info on how it functions.Below, we have a Shelf implementation example:
Activity
home.jsonc
, declare ashelf
component is thestore.home
template;shelf.jsonc
file;shelf.jsonc
, define theshelf
block with all the props given in the example above;8
4
Note: It's important to remember that the
product-summary.shelf
block is already declared indefault.jsonc
. Therefore, it wasn't necessary to declare it during this activity.:information_source: Remember to access the Shelf's documentation if you have any questions during this activity.
The end result should be similar to the one below:
Troubleshoot
In case you're using your own VTEX account, make sure that the category
1
is functional and active in your environment.:no_entry_sign: Are you lost?
Is there any problem with this step? What about sending us a feedback? :pray:
Submit feedback
If you're still unsure as to how to send your answers, click here.