challenge-vtex-io-eleonora-otz/store/blocks/pdp/product.jsonc

367 lines
7.2 KiB
Plaintext
Raw Normal View History

{
"store.product": {
"children": [
2023-01-20 14:59:33 +00:00
"html#breadcrumb",
"condition-layout.product#availability",
"html#tab-layout",
2023-01-31 00:37:44 +00:00
"rich-text#carousel",
"list-context.product-list#product-carousel",
2023-01-28 15:31:26 +00:00
"product-questions-and-answers",
"newsletter"
]
},
2023-02-01 00:36:33 +00:00
// Breadcrumb
2023-02-01 01:24:50 +00:00
"html#breadcrumb": {
"props": {
"tag": "section",
"testId": "breadcrumbs",
"blockClass": "pdp-breadcrumb"
},
"children": ["breadcrumb"]
},
2023-02-01 00:36:33 +00:00
// Produto
2023-02-01 01:24:50 +00:00
"flex-layout.row#specifications-title": {
"children": ["rich-text#specifications"]
},
"rich-text#specifications": {
"props": {
"text": "##### Product Specifications"
}
},
"flex-layout.row#description": {
"props": {
"marginBottom": 7
},
"children": ["product-description"]
},
"condition-layout.product#availability": {
"props": {
"conditions": [
{
"subject": "isProductAvailable"
}
],
"Then": "flex-layout.row#product-main",
"Else": "flex-layout.row#product-availability"
}
},
"flex-layout.row#product-main": {
"props": {
"blockClass": "product-main",
"colGap": 7,
"rowGap": 7,
"marginTop": 4,
"marginBottom": 7,
"paddingTop": 7,
"paddingBottom": 7
},
"children": ["flex-layout.col#stack", "flex-layout.col#right-col"]
},
"stack-layout": {
"props": {
"blockClass": "product"
},
"children": [
"flex-layout.row#product-image",
"product-bookmark",
"product-specification-badges"
]
},
2023-02-01 00:36:33 +00:00
// Imagens de produto
2023-02-01 01:24:50 +00:00
"flex-layout.col#stack": {
"children": ["stack-layout"],
"props": {
// "width": "60%",
"rowGap": 0
}
},
"flex-layout.row#product-image": {
2023-02-01 00:36:33 +00:00
"children": ["html#product-images"]
},
2023-02-01 01:24:50 +00:00
"html#product-images": {
"children": ["product-images"],
"props": {
"testId": "product-images"
}
},
2023-02-01 00:36:33 +00:00
"product-images": {
"props": {
"aspectRatio": {
2023-02-02 00:49:08 +00:00
"desktop": "auto"
},
"showNavigationArrows": false,
"showPaginationDots": false,
"displayThumbnailsArrows": false,
"thumbnailsOrientation": "horizontal"
}
},
2023-02-01 00:36:33 +00:00
// Especificações de produto
2023-02-01 01:24:50 +00:00
"flex-layout.col#right-col": {
"props": {
"preventVerticalStretch": true,
"rowGap": 0
},
"children": [
"html#product-name",
"html#product-code",
"html#product-price",
"html#product-installments",
2023-02-01 00:36:33 +00:00
"html#pix-price",
"html#sku-selector",
2023-01-28 15:31:26 +00:00
"html#buy-button",
"product-gifts",
"availability-subscriber",
2023-02-02 00:49:08 +00:00
"rich-text#labelCep",
"html#shipping-simulator"
]
},
2023-02-02 00:49:08 +00:00
// Título CEP
"rich-text#labelCep": {
"props": {
"blockClass": "labelCep",
"text": "CALCULAR FRETE:"
}
},
// Nome do produto
"html#product-name": {
"children": ["flex-layout.row#product-name"],
"props": { "testId": "product-name" }
},
"flex-layout.row#product-name": {
"props": {
"marginBottom": 3
},
"children": ["vtex.store-components:product-name"]
},
// Código identificação produto
"html#product-code": {
"children": ["product-identifier.product"],
"props": {
"testId": "product-code"
}
},
// Skus
2023-02-01 00:36:33 +00:00
"html#sku-selector": {
"children": ["sku-selector"],
"props": {
"testId": "sku-selector"
}
},
"sku-selector": {
"props": {
"variationsSpacing": 3,
2023-01-25 02:22:27 +00:00
"showValueNameForImageVariation": true,
"blockClass": "size-sku"
}
},
// Valor do produto
"html#product-price": {
"children": ["flex-layout.row#selling-price"],
"props": {
"testId": "product-price"
}
},
2023-02-01 00:36:33 +00:00
// Parcelamento
2023-02-01 01:24:50 +00:00
"html#product-installments": {
"children": ["product-installments"],
"props": {
"testId": "product-installments"
}
},
2023-01-28 15:31:26 +00:00
"product-installments": {
"props": {
"markers": ["discount"],
"message": "<discount>{installmentsNumber} x</discount> de {installmentValue} sem juros",
"installmentsCriteria": "max-quantity-without-interest"
}
},
2023-02-01 00:36:33 +00:00
// Quantidade e botão de compra
2023-02-01 01:24:50 +00:00
2023-01-28 15:31:26 +00:00
"html#buy-button": {
"props": {
"blockClass": "buy-button"
},
2023-02-01 01:24:50 +00:00
"children": ["html#product-quantity-size", "html#cart-button"]
2023-02-01 00:36:33 +00:00
},
"html#cart-button": {
"children": ["add-to-cart-button"],
"props": {
"testId": "add-to-cart-button",
"blockClass": "cart-button"
}
},
"html#product-quantity-size": {
"children": ["product-quantity#size"],
"props": {
2023-02-02 00:49:08 +00:00
"testId": "product-quantity",
"blockClass": "product-quantity"
2023-02-01 00:36:33 +00:00
}
},
2023-02-01 00:36:33 +00:00
"product-quantity#size": {
"props": {
"size": "large",
"width": "28%",
"showLabel": false
}
},
// Produto indisponível
2023-02-01 01:24:50 +00:00
"flex-layout.row#product-availability": {
"props": {
"blockClass": "product-availability",
"colGap": 7,
"marginTop": 4,
"marginBottom": 7,
"paddingTop": 7
},
"children": [
"flex-layout.col#stack",
"flex-layout.col#right-col-availability"
]
},
2023-02-01 00:36:33 +00:00
"flex-layout.col#right-col-availability": {
"props": {
"preventVerticalStretch": true,
"rowGap": 0,
"blockClass": "info-availability"
},
"children": [
"flex-layout.row#product-name",
"product-identifier.product",
2023-01-31 17:21:27 +00:00
"flex-layout.row#availability",
"sku-selector"
]
},
2023-02-01 00:36:33 +00:00
// Formulário produto indisponível
2023-02-01 01:24:50 +00:00
"flex-layout.row#availability": {
"props": {
"blockClass": "message-availability"
},
"children": ["availability-subscriber"]
},
2023-02-01 00:36:33 +00:00
// Desconto Pix
2023-02-01 01:24:50 +00:00
2023-02-01 00:36:33 +00:00
"html#pix-price": {
"children": ["Pix"],
"props": {
2023-02-01 00:36:33 +00:00
"testId": "pix-price"
}
2023-01-28 15:31:26 +00:00
},
2023-02-01 00:36:33 +00:00
// Prateleira de produtos
2023-02-01 01:24:50 +00:00
2023-01-31 00:37:44 +00:00
"rich-text#carousel": {
"props": {
"text": "Você também pode gostar:",
"textAlignment": "CENTER",
"textPosition": "CENTER",
"blockClass": "carousel-title"
}
},
"product-summary.shelf#carousel": {
2023-02-01 00:36:33 +00:00
"children": ["html#product-summary"]
},
"list-context.product-list#product-carousel": {
"blocks": ["product-summary.shelf#carousel"],
"children": ["html#product-summary-list"]
},
"html#product-summary-list": {
"children": ["slider-layout#demo-products"],
"props": {
"testId": "product-summary-list"
}
},
2023-02-02 00:49:08 +00:00
"slider-layout#demo-products": {
"props": {
"itemsPerPage": {
"desktop": 4,
"tablet": 3,
"phone": 2
}
}
},
2023-02-01 00:36:33 +00:00
"html#product-summary": {
"props": {
"testId": "vtex-product-summary"
},
2023-01-31 00:37:44 +00:00
"children": [
"product-summary-image",
"product-summary-name",
"product-list-price",
"product-selling-price"
2023-01-31 00:37:44 +00:00
]
},
"product-summary-image": {
"props": {
"aspectRatio": "1:1",
"showBadge": false
}
},
2023-02-02 00:49:08 +00:00
"product-list-price": {
"props": {
"message": "de {listPriceValue} por",
"blockClass": "list-price"
}
},
2023-02-01 00:36:33 +00:00
// Newsletter
2023-02-01 01:24:50 +00:00
2023-01-28 15:31:26 +00:00
"newsletter": {
"props": {
"label": "Assine nossa newsletter",
2023-01-28 15:31:26 +00:00
"placeholder": "Digite seu e-mail",
"submit": "ENVIAR"
}
},
// Informações de frete
"html#shipping-simulator": {
"props": {
"testId": "shipping-simulator"
},
"children": ["shipping-simulator"]
}
}