From 936b06110eb4e1068ba64e9939f3d5675ea5a943 Mon Sep 17 00:00:00 2001 From: Emmanuel Vitor Date: Mon, 6 Feb 2023 20:36:36 -0300 Subject: [PATCH] feat: adicionar blocos e organiza-os, para coluna da direita do produto --- store/blocks/pdp/product-assembly.jsonc | 23 ++++----- store/blocks/pdp/product.jsonc | 65 +++++++++++++++++++------ 2 files changed, 62 insertions(+), 26 deletions(-) diff --git a/store/blocks/pdp/product-assembly.jsonc b/store/blocks/pdp/product-assembly.jsonc index 43ad04e..ece2d87 100644 --- a/store/blocks/pdp/product-assembly.jsonc +++ b/store/blocks/pdp/product-assembly.jsonc @@ -1,9 +1,16 @@ { "sticky-layout#buy-button": { "props": { - "position": "bottom" + "position": "bottom", + "blockClass": "teste" }, - "children": ["flex-layout.row#buy-button"] + "children": ["html#buy-button"] + }, + "product-assembly-options": { + "children": [ + "flex-layout.row#product-assembly-options", + "assembly-option-input-values" + ] }, "product-assembly-options": { "children": [ @@ -32,17 +39,13 @@ "props": { "verticalAlign": "middle" }, - "children": [ - "assembly-option-item-quantity-selector" - ] + "children": ["assembly-option-item-quantity-selector"] }, "flex-layout.col#product-assembly-image": { "props": { "marginRight": 4 }, - "children": [ - "assembly-option-item-image" - ] + "children": ["assembly-option-item-image"] }, "flex-layout.col#product-assembly-middle": { "props": { @@ -96,9 +99,7 @@ "horizontalAlign": "right", "verticalAlign": "middle" }, - "children": [ - "assembly-option-item-quantity-selector" - ] + "children": ["assembly-option-item-quantity-selector"] }, "assembly-option-item-customize#sec-level": { "props": { diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index a9e3c81..a29af48 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -98,23 +98,28 @@ }, "children": [ "flex-layout.row#product-name", - "product-rating-summary", - "flex-layout.row#list-price-savings", - "flex-layout.row#selling-price", - "product-installments", - "product-separator", "product-identifier.product", + "product-rating-summary", + "flex-layout.row#selling-price", + "product-installments#parcelas", + // "m3-pix", "sku-selector", - "product-quantity", "product-assembly-options", "product-gifts", - "flex-layout.row#buy-button", + "html#buy-button", "availability-subscriber", - "shipping-simulator", - "share#default" + "html#m3-shipping-simulator" ] }, + "product-installments#parcelas": { + "props": { + "blockClass": "desconto", + "installmentsCriteria": "max-quantity-without-interest", + "markers": ["x"], + "message": "{installmentsNumber} x de {installmentValue} sem juros" + } + }, "flex-layout.row#product-name": { "props": { "marginBottom": 3 @@ -128,17 +133,34 @@ "showValueNameForImageVariation": true } }, - - "flex-layout.row#buy-button": { + "html#buy-button": { "props": { + "blockClass": "container__buyButton", "marginTop": 4, - "marginBottom": 7 + "marginBottom": 7, + "paddingRight": 0 }, - "children": ["add-to-cart-button"] + "children": ["html#sizeQuantity", "add-to-cart-button"] }, + "html#sizeQuantity": { + "props": { + "blockClass": "quantity", + "testid": "product-quantity" + }, + "children": ["product-quantity#size"] + }, + "product-quantity#size": { + "props": { + "blockClass": "quantity__wrapper", + "size": "regular", + "width": "25%", + "showLabel": false + } + }, "flex-layout.row#product-availability": { "props": { + "blockClass": "indisponivel", "colGap": 7, "marginTop": 4, "marginBottom": 7, @@ -158,8 +180,8 @@ "children": [ "flex-layout.row#product-name", "product-identifier.product", - "sku-selector", - "flex-layout.row#availability" + "flex-layout.row#availability", + "sku-selector" ] }, "flex-layout.row#availability": { @@ -168,6 +190,19 @@ }, "children": ["availability-subscriber"] }, + "html#m3-shipping-simulator": { + "props": { + "blockClass": "m3-shipping-simulator" + }, + "children": ["rich-text", "shipping-simulator"] + }, + "rich-text": { + "props": { + "blockClass": "m3-shipping-simulator-title", + "textAlignment": "LEFT", + "text": "Calcular o frete" + } + }, "share#default": { "props": { -- 2.34.1