|
|
@@ -400,6 +400,7 @@ const ProductDetails = () => {
|
|
400
|
400
|
const careInstructionMetafield = product?.metafields?.care_instruction
|
|
401
|
401
|
const shippingInformationMetafield = product?.metafields?.shipping_information
|
|
402
|
402
|
const returnExchangeMetafield = product?.metafields?.return_exchange
|
|
|
403
|
+ const noteMetafield = product?.metafields?.note
|
|
403
|
404
|
const productDetailsMetafield = product?.metafields?.product_details
|
|
404
|
405
|
const sizeChartMetafield = product?.metafields?.size_chart
|
|
405
|
406
|
const sizeChartImageUrl = sizeChartMetafield?.reference?.image?.url || sizeChartMetafield?.reference?.url || ""
|
|
|
@@ -470,6 +471,22 @@ const ProductDetails = () => {
|
|
470
|
471
|
</Box>
|
|
471
|
472
|
)
|
|
472
|
473
|
|
|
|
474
|
+ // Renders Shopify product metafield custom.note inside the Note row.
|
|
|
475
|
+ const notePanel = noteMetafield?.value ? (
|
|
|
476
|
+ <Box sx={infoPanelSx}>
|
|
|
477
|
+ <Collapse in={Boolean(expandedInfoRows.note)} timeout="auto">
|
|
|
478
|
+ <Box
|
|
|
479
|
+ sx={{
|
|
|
480
|
+ ...infoPanelContentSx,
|
|
|
481
|
+ minHeight: noteMetafield.value ? 0 : 28,
|
|
|
482
|
+ }}
|
|
|
483
|
+ >
|
|
|
484
|
+ {renderShopifyRichText(noteMetafield.value)}
|
|
|
485
|
+ </Box>
|
|
|
486
|
+ </Collapse>
|
|
|
487
|
+ </Box>
|
|
|
488
|
+ ) : null
|
|
|
489
|
+
|
|
473
|
490
|
// Renders Shopify product metafield custom.product_details inside the Product Details row.
|
|
474
|
491
|
const productDetailsPanel = (
|
|
475
|
492
|
<Box sx={infoPanelSx}>
|
|
|
@@ -936,6 +953,24 @@ const ProductDetails = () => {
|
|
936
|
953
|
{expandedInfoRows.returnExchanges ? <RemoveIcon sx={{ fontSize: 18 }} /> : <AddIcon sx={{ fontSize: 18 }} />}
|
|
937
|
954
|
</Box>
|
|
938
|
955
|
{returnExchangesPanel}
|
|
|
956
|
+
|
|
|
957
|
+ {/* Note */}
|
|
|
958
|
+ {noteMetafield?.value && (
|
|
|
959
|
+ <Box
|
|
|
960
|
+ onClick={() => toggleInfoRow("note")}
|
|
|
961
|
+ sx={{
|
|
|
962
|
+ ...infoRowSx(expandedInfoRows.note),
|
|
|
963
|
+ pb: 2,
|
|
|
964
|
+ borderBottom: "none"
|
|
|
965
|
+ }}
|
|
|
966
|
+ >
|
|
|
967
|
+ <Typography variant="body2" sx={{ textTransform: "uppercase", fontWeight: "400", fontSize: { xs: "0.875rem", md: "1.1rem" } }}>
|
|
|
968
|
+ Note
|
|
|
969
|
+ </Typography>
|
|
|
970
|
+ {expandedInfoRows.note ? <RemoveIcon sx={{ fontSize: 18 }} /> : <AddIcon sx={{ fontSize: 18 }} />}
|
|
|
971
|
+ </Box>
|
|
|
972
|
+ )}
|
|
|
973
|
+ {notePanel}
|
|
939
|
974
|
</Box>
|
|
940
|
975
|
</Box>
|
|
941
|
976
|
|