challenge-vtex-io-bernardo-.../store/blocks/pdp/product.jsonc

224 lines
5.0 KiB
Plaintext

{
"store.product": {
"children": [
"html#breadcrumb",
"placeholder-component",
"condition-layout.product#availability",
"tab-layout#description",
// "flex-layout.row#specifications-title",
// "product-specification-group#table",
// "shelf.relatedProducts",
"html#slider-block-container"
// "product-questions-and-answers"
]
},
"html#breadcrumb": {
"props": {
"tag": "section",
"testId": "breadcrumbs",
"blockClass": "pdp-breadcrumb"
},
"children": ["breadcrumb"]
},
"flex-layout.row#specifications-title": {
"children": ["rich-text#specifications"]
},
"rich-text#specifications": {
"props": {
"text": "##### Product Specifications"
}
},
"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": {
"colGap": 7,
"rowGap": 7,
"marginTop": 4,
"marginBottom": 7,
"paddingTop": 7,
"paddingBottom": 7,
"blockClass": "product__image"
},
"children": ["flex-layout.col#stack", "flex-layout.col#right-col"]
},
"stack-layout": {
"props": {
"blockClass": "product"
},
"children": [
"html#flex-layout.row#product-image",
"product-bookmark",
"product-specification-badges"
]
},
"product-specification-badges": {
"props": {
"specificationGroupName": "Group",
"specificationName": "On Sale",
"visibleWhen": "True",
"displayValue": "SPECIFICATION_NAME"
}
},
"flex-layout.col#stack": {
"children": ["stack-layout"],
"props": {
"width": "50%",
"rowGap": 0
}
},
"flex-layout.col#right-col": {
"props": {
"preventVerticalStretch": true,
"rowGap": 0,
"blockClass": "product-skus"
},
"children": [
"flex-layout.row#product-name",
"product-identifier.product",
// "product-rating-summary", // avaliações
// "flex-layout.row#list-price-savings", preço com promoção vindo vtex
"flex-layout.row#selling-price",
"installment-component",
"html#pix-component",
// "product-separator", //linha que separa preço de skus
"html#sku-selector",
"flex-layout.row#quantity-and-button",
// "product-assembly-options",
// "product-gifts",
// "flex-layout.row#buy-button",
"availability-subscriber",
"html#shipping-simulator"
// "share#default" //reder social
]
},
"flex-layout.row#product-name": {
"props": {
"blockClass": "product__name"
},
"children": ["vtex.store-components:product-name"]
},
"html#sku-selector": {
"props": {
"testId": "sku-selector"
},
"children": ["sku-selector"]
},
"sku-selector": {
"props": {
"variationsSpacing": 3,
"showValueNameForImageVariation": true,
"blockClass": "sku-product"
}
},
"html#pix-component": {
"props": {
"tag": "section",
"testId": "pix-price"
},
"children": ["pix-component"]
},
"html#product-quantity": {
"props": {
"blockClass": "product-quantity",
"tag": "section",
"testId": "product-quantity"
},
"children": ["product-quantity"]
},
"html#button-addCart": {
"props": {
"tag": "section",
"testId": "add-to-cart-button",
"blockClass": "buy-button"
},
"children": ["flex-layout.row#buy-button"]
},
"flex-layout.row#buy-button": {
"props": {
"blockClass": "buy-button",
"width": "100%"
},
"children": ["add-to-cart-button"]
},
"flex-layout.row#quantity-and-button": {
"props":{
"tag": "section",
"blockClass": "quantityButton"
},
"children": ["html#product-quantity","html#button-addCart"]
},
"html#shipping-simulator": {
"props":{
"blockClass": "cep",
"testId": "shipping-simulator"
},
"children": ["shipping-simulator"]
},
"flex-layout.row#product-availability": {
"props": {
"colGap": 7,
"marginTop": 4,
"marginBottom": 7,
"paddingTop": 7
},
"children": [
"flex-layout.col#stack",
"flex-layout.col#right-col-availability"
]
},
"flex-layout.col#right-col-availability": {
"props": {
"preventVerticalStretch": true,
"rowGap": 0,
"blockClass": "info-availability"
},
"children": [
"flex-layout.row#product-name",
"product-identifier.product",
"flex-layout.row#availability",
"sku-selector"
]
},
"flex-layout.row#availability": {
"props": {
"blockClass": "message-availability"
},
"children": ["availability-subscriber"]
},
"share#default": {
"props": {
"social": {
"Facebook": true,
"WhatsApp": true,
"Twitter": false,
"Pinterest": true
}
}
}
}