From 142f28eceac913f7fb5b528a7e560bf5f5f644dc Mon Sep 17 00:00:00 2001 From: Emmanuel Vitor Date: Sun, 5 Feb 2023 14:12:14 -0300 Subject: [PATCH] feat: cria bloco de prateleira de produtos relacionados e retira bloco de prateleira obsoleto. --- store/blocks/pdp/product-shelf-related.jsonc | 58 ++++++++++++++++++++ store/blocks/pdp/product.jsonc | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 store/blocks/pdp/product-shelf-related.jsonc diff --git a/store/blocks/pdp/product-shelf-related.jsonc b/store/blocks/pdp/product-shelf-related.jsonc new file mode 100644 index 0000000..e80b35c --- /dev/null +++ b/store/blocks/pdp/product-shelf-related.jsonc @@ -0,0 +1,58 @@ +{ + "list-context.product-list#m3-shelf-retaletd": { + "props": { + "blockClass": "m3-shelf-retaletd" + }, + "blocks": ["product-summary.shelf#m3-shelf-retaletd-content"], + "children": [ + "rich-text#m3-shelf-related-title", + "slider-layout#m3-carousel-products" + ] + }, + "product-summary.shelf#m3-shelf-retaletd-content": { + "props": { + "blockClass": "m3-shelf-retaletd-content" + }, + "children": ["html#product-summary"] + }, + "html#product-summary": { + "props": { + "blockClass": "m3-html-product-sumary", + "testId": "vtex-product-summary" + }, + "children": [ + "product-summary-image", + "product-summary-name", + "product-summary-price" + ] + }, + "slider-layout#m3-carousel-products": { + "props": { + "blockClass": "m3-carousel-products", + "itemsPerPage": { + "desktop": 4, + "tablet": 3, + "phone": 2 + }, + "infinite": true, + "showNavigationArrows": "always" + } + }, + "rich-text#m3-shelf-related-title": { + "props": { + "blockClass": "m3-shelf-related-title", + "text": "Você também pode gostar:", + "textAlignment": "CENTER", + "textPosition": "CENTER" + } + }, + "product-summary-image": { + "props": { + "showBadge": false, + "aspectRatio": { + "desktop": "1:1", + "mobile": "1:1" + } + } + } +} diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index f2f040b..61ab69c 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -6,7 +6,7 @@ "flex-layout.row#description", "flex-layout.row#specifications-title", "product-specification-group#table", - "shelf.relatedProducts", + "list-context.product-list#m3-shelf-retaletd", "newsletter#m3-newsletter", "product-questions-and-answers" ]