From 27d50c2f4d4ddf8cdf07a9fad202fa2586092d52 Mon Sep 17 00:00:00 2001 From: Carlos Vinicius Ananias Date: Sun, 13 Dec 2020 17:54:44 -0300 Subject: [PATCH 1/6] Example use 'conditional-layout' on product page with product unavailable --- manifest.json | 3 ++- store/blocks/pdp/product.jsonc | 44 +++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index a0428f03..9b80b603 100644 --- a/manifest.json +++ b/manifest.json @@ -60,7 +60,8 @@ "vtex.product-highlights": "2.x", "vtex.product-specifications": "1.x", "vtex.tab-layout": "0.x", - "vtex.responsive-layout": "0.x" + "vtex.responsive-layout": "0.x", + "vtex.condition-layout": "2.x" }, "peerDependencies": { "vtex.reviews-and-ratings": "2.x" diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index d7e64214..890d827f 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -2,7 +2,7 @@ "store.product": { "children": [ "flex-layout.row#product-breadcrumb", - "flex-layout.row#product-main", + "condition-layout.product#unavailable", "flex-layout.row#description", "flex-layout.row#specifications-title", "product-specification-group#table", @@ -33,6 +33,17 @@ }, "children": ["product-description"] }, + "condition-layout.product#unavailable": { + "props": { + "conditions": [ + { + "subject": "isProductAvailable" + } + ], + "Then": "flex-layout.row#product-main", + "Else": "flex-layout.row#product-unavailable" + } + }, "flex-layout.row#product-main": { "props": { "colGap": 7, @@ -130,6 +141,37 @@ "children": ["add-to-cart-button"] }, + "flex-layout.row#product-unavailable": { + "props": { + "colGap": 7, + "marginTop": 4, + "marginBottom": 7, + "paddingTop": 7 + }, + "children": ["flex-layout.col#stack", "flex-layout.col#right-col-unavailable"] + }, + "flex-layout.col#right-col-unavailable": { + "props": { + "preventVerticalStretch": true, + "rowGap": 0, + "blockClass": "info-unavailable" + }, + "children": [ + "flex-layout.row#product-name", + "product-identifier.product", + "sku-selector", + "flex-layout.row#unavailable" + ] + }, + "flex-layout.row#unavailable": { + "props": { + "blockClass": "message-unavailable" + }, + "children": [ + "availability-subscriber" + ] + }, + "share#default": { "props": { "social": { From 9aae2442ac35e6fd5e2d1d57b8d7ffaf3d1700d3 Mon Sep 17 00:00:00 2001 From: Carlos Vinicius Ananias Date: Tue, 15 Dec 2020 18:24:10 -0300 Subject: [PATCH 2/6] Changing id's --- docs/README.md | 2 +- store/blocks/pdp/product.jsonc | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/README.md b/docs/README.md index bb52d110..95fa5d15 100644 --- a/docs/README.md +++ b/docs/README.md @@ -34,7 +34,7 @@ Store GraphQL is a middleware to access all VTEX APIs. - [Search Result](https://github.com/vtex-apps/search-result/blob/master/docs/README.md) - [Product Details](https://github.com/vtex-apps/product-details/blob/master/docs/README.md) - [Store Components](https://github.com/vtex-apps/store-components/blob/master/docs/README.md) -- [Order Placed](https://github.com/vtex-apps/order-placed/blob/master/docs/README.md) +- [Order Placed](https://github.com/vtex-apps/order-placed/blob/master/docs/README.md) ### Store Pixel Apps diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index 890d827f..ac9df98b 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -2,7 +2,7 @@ "store.product": { "children": [ "flex-layout.row#product-breadcrumb", - "condition-layout.product#unavailable", + "condition-layout.product#availability", "flex-layout.row#description", "flex-layout.row#specifications-title", "product-specification-group#table", @@ -33,15 +33,15 @@ }, "children": ["product-description"] }, - "condition-layout.product#unavailable": { + "condition-layout.product#availability": { "props": { "conditions": [ { - "subject": "isProductAvailable" + "subject": "isProductAvailability" } ], "Then": "flex-layout.row#product-main", - "Else": "flex-layout.row#product-unavailable" + "Else": "flex-layout.row#product-availability" } }, "flex-layout.row#product-main": { @@ -141,31 +141,31 @@ "children": ["add-to-cart-button"] }, - "flex-layout.row#product-unavailable": { + "flex-layout.row#product-availability": { "props": { "colGap": 7, "marginTop": 4, "marginBottom": 7, "paddingTop": 7 }, - "children": ["flex-layout.col#stack", "flex-layout.col#right-col-unavailable"] + "children": ["flex-layout.col#stack", "flex-layout.col#right-col-availability"] }, - "flex-layout.col#right-col-unavailable": { + "flex-layout.col#right-col-availability": { "props": { "preventVerticalStretch": true, "rowGap": 0, - "blockClass": "info-unavailable" + "blockClass": "info-availability" }, "children": [ "flex-layout.row#product-name", "product-identifier.product", "sku-selector", - "flex-layout.row#unavailable" + "flex-layout.row#availability" ] }, - "flex-layout.row#unavailable": { + "flex-layout.row#availability": { "props": { - "blockClass": "message-unavailable" + "blockClass": "message-availability" }, "children": [ "availability-subscriber" From c6f7ac267e103c16ccce0f6ad9575dac871e10bf Mon Sep 17 00:00:00 2001 From: Carlos Vinicius Ananias Date: Mon, 21 Dec 2020 23:22:17 -0300 Subject: [PATCH 3/6] Adjusting manifest.json --- manifest.json | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.json b/manifest.json index 484f1483..dfd718ab 100644 --- a/manifest.json +++ b/manifest.json @@ -62,7 +62,6 @@ "vtex.product-specifications": "1.x", "vtex.tab-layout": "0.x", "vtex.responsive-layout": "0.x", - "feature/conditional-layout-example", "vtex.condition-layout": "2.x", "vtex.css-handles": "1.x" }, From e60090365ffd5f3bfb79ba4be100e34a4c12f54a Mon Sep 17 00:00:00 2001 From: Carlos Vinicius Ananias Date: Mon, 24 May 2021 21:14:56 -0300 Subject: [PATCH 4/6] Fix manifest.json --- manifest.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index d669b9f8..2fd9d186 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "vendor": "vtex", "name": "store-theme", - "version": "4.3.0", + "version": "4.3.1", "builders": { "styles": "2.x", "store": "0.x", @@ -61,10 +61,8 @@ "vtex.product-highlights": "2.x", "vtex.product-specifications": "1.x", "vtex.tab-layout": "0.x", - "vtex.responsive-layout": "0.x", "vtex.condition-layout": "2.x", "vtex.css-handles": "1.x" - "vtex.tab-layout": "0.x" }, "peerDependencies": { "vtex.reviews-and-ratings": "2.x" From acef19c49b6e088c18c50b1664c6f33061660fe7 Mon Sep 17 00:00:00 2001 From: Carlos Vinicius Ananias Date: Sun, 30 May 2021 11:30:12 -0300 Subject: [PATCH 5/6] Returning manifest.json version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 2fd9d186..b012979a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "vendor": "vtex", "name": "store-theme", - "version": "4.3.1", + "version": "4.3.0", "builders": { "styles": "2.x", "store": "0.x", From 29851da07bf1780aafad553005bab757a0004d39 Mon Sep 17 00:00:00 2001 From: Carlos Vinicius Ananias Date: Sun, 30 May 2021 13:12:26 -0300 Subject: [PATCH 6/6] Edit tag product-summary-name --- store/blocks/product-summary/product-summary.jsonc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/store/blocks/product-summary/product-summary.jsonc b/store/blocks/product-summary/product-summary.jsonc index afabee36..5a6504d2 100644 --- a/store/blocks/product-summary/product-summary.jsonc +++ b/store/blocks/product-summary/product-summary.jsonc @@ -26,6 +26,12 @@ ] }, + "product-summary-name": { + "props": { + "tag": "div" + } + }, + "product-summary-image#shelf": { "props": { "showBadge": false,