From 406029348a48b02cdbae77db24008edbe64f8ee8 Mon Sep 17 00:00:00 2001 From: devartes Date: Fri, 27 Jan 2023 20:39:51 -0300 Subject: [PATCH] feat(product.jsonc): adicionando estrutura do carrosel --- store/blocks/pdp/product.jsonc | 67 +++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index 080749a..6a69dbd 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -7,10 +7,75 @@ "tab-layout#description", // "flex-layout.row#specifications-title", // "product-specification-group#table", - "shelf.relatedProducts", + // "shelf.relatedProducts", + "html#slider-block-container", "product-questions-and-answers" ] }, + // + "html#slider-block-container": { + "children": [ + "rich-text#slider-block-title", + "html#list-context.product-list#slider-block" + ] + }, + "rich-text#slider-block-title": { + "props": { + "text": "### Você também pode gostar:", + "blockClass": "slider-title" + } + }, + "product-summary.shelf#slider-block": { + "children": ["html#product-summary.shelf#product-content"] + }, + "html#product-summary.shelf#product-content": { + "props": { + "testId": "vtex-product-summary" + }, + "children": [ + "product-summary-image#slider-images", + "product-summary-name", + // "product-summary-space", + "product-summary-price" + ] + }, + "product-summary-image#slider-images": { + "props": { + "blockClass": "product-summary-image", + "showBadge": false, + "aspectRatio": "1:1" + // "maxHeight": 300 + } + }, + "list-context.product-list#slider-block": { + "blocks": ["product-summary.shelf#slider-block"], + "children": ["html#slider-layout#products-carousel"] + }, + "html#list-context.product-list#slider-block": { + "props": { + "testId": "product-summary-list" + }, + "children": ["list-context.product-list#slider-block"] + }, + "html#slider-layout#products-carousel": { + "props": { + "testId": "product-summary-list" + }, + "children": ["slider-layout#products-carousel"] + }, + "slider-layout#products-carousel": { + "props": { + "itemsPerPage": { + "desktop": 4, + "tablet": 1, + "phone": 1 + }, + "infinite": true, + "showNavigationArrows": "desktopOnly", + "blockClass": "carousel" + } + }, + // "html#breadcrumb": { "props": { "tag": "section",