|
|
@@ -395,6 +395,7 @@ const ProductDetails = () => {
|
|
395
|
395
|
const sizeChartMetafield = product?.metafields?.size_chart
|
|
396
|
396
|
const sizeChartImageUrl = sizeChartMetafield?.reference?.image?.url || sizeChartMetafield?.reference?.url || ""
|
|
397
|
397
|
const sizeChartImageAlt = sizeChartMetafield?.reference?.image?.altText || `${product?.title || "Product"} size chart`
|
|
|
398
|
+ const isEssentialProduct = (product?.productType || "").trim().toUpperCase() === "BEAUTY"
|
|
398
|
399
|
|
|
399
|
400
|
// Renders Shopify product metafield custom.material inside the Material row.
|
|
400
|
401
|
const materialPanel = (
|
|
|
@@ -715,27 +716,29 @@ const ProductDetails = () => {
|
|
715
|
716
|
|
|
716
|
717
|
})}
|
|
717
|
718
|
|
|
718
|
|
- <Box
|
|
719
|
|
- component="a"
|
|
720
|
|
- href={sizeChartImageUrl || "#"}
|
|
721
|
|
- onClick={(event) => {
|
|
722
|
|
- event.preventDefault()
|
|
723
|
|
- if (sizeChartImageUrl) setSizeChartOpen(true)
|
|
724
|
|
- }}
|
|
725
|
|
- sx={{
|
|
726
|
|
- display: "inline-flex",
|
|
727
|
|
- alignItems: "center",
|
|
728
|
|
- color: "inherit",
|
|
729
|
|
- textDecoration: "underline",
|
|
730
|
|
- textTransform: "uppercase",
|
|
731
|
|
- fontSize: "0.875rem",
|
|
732
|
|
- mb: 1,
|
|
733
|
|
- cursor: sizeChartImageUrl ? "pointer" : "default"
|
|
734
|
|
- }}
|
|
735
|
|
- >
|
|
736
|
|
- <StraightenIcon sx={{ mr: 0.75, fontSize: 20 }} />
|
|
737
|
|
- Size Chart
|
|
738
|
|
- </Box>
|
|
|
719
|
+ {!isEssentialProduct && (
|
|
|
720
|
+ <Box
|
|
|
721
|
+ component="a"
|
|
|
722
|
+ href={sizeChartImageUrl || "#"}
|
|
|
723
|
+ onClick={(event) => {
|
|
|
724
|
+ event.preventDefault()
|
|
|
725
|
+ if (sizeChartImageUrl) setSizeChartOpen(true)
|
|
|
726
|
+ }}
|
|
|
727
|
+ sx={{
|
|
|
728
|
+ display: "inline-flex",
|
|
|
729
|
+ alignItems: "center",
|
|
|
730
|
+ color: "inherit",
|
|
|
731
|
+ textDecoration: "underline",
|
|
|
732
|
+ textTransform: "uppercase",
|
|
|
733
|
+ fontSize: "0.875rem",
|
|
|
734
|
+ mb: 1,
|
|
|
735
|
+ cursor: sizeChartImageUrl ? "pointer" : "default"
|
|
|
736
|
+ }}
|
|
|
737
|
+ >
|
|
|
738
|
+ <StraightenIcon sx={{ mr: 0.75, fontSize: 20 }} />
|
|
|
739
|
+ Size Chart
|
|
|
740
|
+ </Box>
|
|
|
741
|
+ )}
|
|
739
|
742
|
</Box>
|
|
740
|
743
|
|
|
741
|
744
|
|