|
|
@@ -400,6 +400,7 @@ const ProductDetails = () => {
|
|
400
|
400
|
|
|
401
|
401
|
const materialMetafield = product?.metafields?.material
|
|
402
|
402
|
const careInstructionMetafield = product?.metafields?.care_instruction
|
|
|
403
|
+ const shippingInformationMetafield = product?.metafields?.shipping_information
|
|
403
|
404
|
|
|
404
|
405
|
// Renders Shopify product metafield custom.material inside the Material row.
|
|
405
|
406
|
const materialPanel = (
|
|
|
@@ -453,6 +454,34 @@ const ProductDetails = () => {
|
|
453
|
454
|
</Box>
|
|
454
|
455
|
)
|
|
455
|
456
|
|
|
|
457
|
+ // Renders Shopify product metafield custom.shipping_information inside the Shipping Information row.
|
|
|
458
|
+ const shippingInformationPanel = (
|
|
|
459
|
+ <Box
|
|
|
460
|
+ sx={{
|
|
|
461
|
+ maxHeight: expandedInfoRows.shippingInformation ? 600 : 0,
|
|
|
462
|
+ overflow: "hidden",
|
|
|
463
|
+ borderBottom: "1px solid #DDD",
|
|
|
464
|
+ transition: "max-height 0.25s ease-in-out"
|
|
|
465
|
+ }}
|
|
|
466
|
+ >
|
|
|
467
|
+ <Box
|
|
|
468
|
+ sx={{
|
|
|
469
|
+ // Old extra panel spacing kept for reference:
|
|
|
470
|
+ // pb: 3,
|
|
|
471
|
+ color: "text.secondary",
|
|
|
472
|
+ minHeight: shippingInformationMetafield?.value ? 0 : 28,
|
|
|
473
|
+ fontSize: {
|
|
|
474
|
+ xs: "0.875rem",
|
|
|
475
|
+ md: "1rem"
|
|
|
476
|
+ },
|
|
|
477
|
+ lineHeight: 1.6
|
|
|
478
|
+ }}
|
|
|
479
|
+ >
|
|
|
480
|
+ {renderShopifyRichText(shippingInformationMetafield?.value)}
|
|
|
481
|
+ </Box>
|
|
|
482
|
+ </Box>
|
|
|
483
|
+ )
|
|
|
484
|
+
|
|
456
|
485
|
const productDetailsPanel = (
|
|
457
|
486
|
<Box
|
|
458
|
487
|
sx={{
|
|
|
@@ -892,14 +921,18 @@ const ProductDetails = () => {
|
|
892
|
921
|
{/* Shipping Information */}
|
|
893
|
922
|
<Box
|
|
894
|
923
|
onClick={() => toggleInfoRow("shippingInformation")}
|
|
895
|
|
- sx={infoRowSx(expandedInfoRows.shippingInformation)}
|
|
|
924
|
+ sx={{
|
|
|
925
|
+ ...infoRowSx(expandedInfoRows.shippingInformation),
|
|
|
926
|
+ pb: 2,
|
|
|
927
|
+ borderBottom: "none"
|
|
|
928
|
+ }}
|
|
896
|
929
|
>
|
|
897
|
930
|
<Typography variant="body2" sx={{ textTransform: "uppercase", fontWeight: "400", fontSize: { xs: "0.875rem", md: "1.1rem" } }}>
|
|
898
|
931
|
Shipping Information
|
|
899
|
932
|
</Typography>
|
|
900
|
933
|
{expandedInfoRows.shippingInformation ? <RemoveIcon sx={{ fontSize: 18 }} /> : <AddIcon sx={{ fontSize: 18 }} />}
|
|
901
|
934
|
</Box>
|
|
902
|
|
- {emptyInfoPanel("shippingInformation")}
|
|
|
935
|
+ {shippingInformationPanel}
|
|
903
|
936
|
|
|
904
|
937
|
{/* Return & Exchanges */}
|
|
905
|
938
|
<Box
|