VariantContent reusable renders product variant selection UI (dimensions like Color/Size), plus basic product header info (category/title/image) and an Add to cart action.$store.productModal.product.quickAddModal: true mode (used in Cart for a compact “available variants” experience)Reusables/ProductGridItem/Default.liquid{% render 'Reusables\\VariantContent\\Default' %}Components/Cart/Default.liquid{% render 'Reusables\\VariantContent\\Default', quickAddModal: true %}VariantContent is used in two distinct UI contexts:Components/Cart/Default.liquid with quickAddModal: true.AvailableVariants titleReusables/ProductGridItem/Default.liquid.VariantContent is used as part of the product tile/quick-view behavior.ProductGridItem and the product-modal store; VariantContent itself just reads $store.productModal.product and renders accordingly.quickAddModal (boolean)true, the template shows the “Available variants” title and a product image block at the top.isQuickAddModal = true and resets selection state when the modal product changes.$store.productModal.product<template x-if="$store.productModal.product">
<div x-data="variantcontentreusabledefault.initComponent($store.productModal.product, true)">
...
</div>
</template>$store.productModal.product that you provided (sanitized by collapsing long arrays like searchAttributes and productVariants).{
"vatIncluded": false,
"vatRate": 25,
"reducedVatRate": 5,
"isMpnVisible": true,
"isSkuVisible": true,
"title": "Λευκή Μπλούζα Γυναικεία",
"alias": "lefki-blouza-gynaikeia",
"status": "Active",
"categoryId": "e8b0acbf-95dd-477c-9c93-fda01751cfd2",
"categoryName": "Μπλούζες - Τοπ",
"categoryLink": "/category/blouzes-top",
"availability": "Unavailable",
"id": "2014b559-d193-46e7-9fe6-f6b4b1a8e9d4",
"companyId": "a6cf8a64-13dc-45f7-bc04-d7591f3e927a",
"link": "product/lefki-blouza-gynaikeia",
"mediaItems": [
{
"id": "3cfd3be2-3e21-45db-b231-479affa0a56e",
"link": "https://ecom-media.azureedge.net/...",
"position": 0,
"alt": "product-woman-top-4.jpg",
"mediaType": "Image"
},
{
"id": "ad1ca4c2-6cb4-47b2-9e7b-6518f67f9b81",
"link": "https://ecom-media.azureedge.net/...",
"position": 1,
"alt": "green.pdf",
"mediaType": "Attachment"
}
],
"variantCount": 24,
"productVariants": [
{
"id": "1a616222-7f73-4daa-93a9-c53562f3c7eb",
"dimension1ItemId": "64575851-be25-428e-8a1f-aaf1e13dfddf",
"dimension2ItemId": "e871b942-b888-487d-bd3e-79aa4b54c79b",
"sku": "kokkino-medium",
"sellOutOfStock": true,
"canOrder": true,
"startQuantity": 1,
"price": 0,
"unitPrice": 0
},
{
"id": "1251d588-b783-403b-a046-644368c565cc",
"dimension1ItemId": "dd22993a-3ba8-4a0a-9534-7ed9b1159e54",
"dimension2ItemId": "720fc539-fb43-4b09-a8a0-78d66a577cab",
"sellOutOfStock": true,
"canOrder": true,
"startQuantity": 1,
"price": 25,
"unitPrice": 25,
"finalPriceText": "25,00 €",
"finalPrice": 25
},
{
"id": "9c1c0658-09c9-493f-bcc7-8a0e7567abf1",
"dimension1ItemId": "34da3422-bbc3-481f-82ac-13216a3b4fa9",
"dimension2ItemId": "e871b942-b888-487d-bd3e-79aa4b54c79b",
"gtin": "12334566",
"mpn": "12334566",
"sku": "12334566",
"sellOutOfStock": true,
"canOrder": true,
"startQuantity": 1,
"price": 50,
"unitPrice": 50,
"finalPriceText": "50,00 €",
"finalPrice": 50
}
],
"dimension1": {
"name": "Χρώμα",
"type": "Color",
"items": [
{ "id": "34da3422-bbc3-481f-82ac-13216a3b4fa9", "value": "Μαύρο", "textColor": "#000000" },
{ "id": "64575851-be25-428e-8a1f-aaf1e13dfddf", "value": "Κόκκινο", "textColor": "#d64343" },
{ "id": "dd22993a-3ba8-4a0a-9534-7ed9b1159e54", "value": "Πράσινο", "textColor": "#1aa189" }
]
},
"dimension2": {
"name": "Μέγεθος",
"type": "Size",
"items": [
{ "id": "13556de0-3fda-49ef-af16-2a4cef5d50e1", "value": "S" },
{ "id": "e871b942-b888-487d-bd3e-79aa4b54c79b", "value": "M" },
{ "id": "720fc539-fb43-4b09-a8a0-78d66a577cab", "value": "L" },
{ "id": "a2591652-4bc6-476a-a6f8-cde433d7bdfd", "value": "XL" }
]
},
"hasPriceRange": false,
"inWishlist": false
}product.categoryLink exists).variantOrDefault('title').quickAddModal: true:AvailableVariants heading./product/${product.alias}.product.isMpnVisible → prints variantOrDefault('mpn', true)product.isSkuVisible → prints variantOrDefault('sku', true)displayNullLine = true, variantOrDefault returns -.product.dimension1, product.dimension2).type === 'Color', it is treated as the color dimension.Reusables/VariantContent/Default.js defines:variantcontentreusabledefault.initComponent(product, isQuickAddModal = false)variantcontentreusabledefault.initSwiper(refs)Alpine.store('productModal').product and re-initializes the selection UI.colorDimKey / otherDimKey).selectedDim1Id, selectedDim2Id, plus color/other labels).dimension1ItemId must match selectedDim1Id (when product.dimension1 exists)dimension2ItemId must match selectedDim2Id (when product.dimension2 exists)variantOrDefault(path) resolution.product.productVariants[selectedVariantIndex])product)- when displayNullLine = truepath can be either a string like 'sku' or 'quantityConstraints.additive.minimum' or an array of path segments.this.customColorActive when the object being read has:stockAvailability.label === 'Custom' and a truthy stockAvailability.color.handleAddToCart(closeModal = false) clears toasts and then proceeds only if canAddToCart() allows it.servicesreusabledefault.addToCart(productId, variantId, minQty, finalPrice, originalPrice, showPopUp)productId is this.product.idvariantId is variant.id (from this.product.productVariants[this.selectedVariantIndex])minQty is variant?.quantityConstraints?.additive?.minimumfinalPrice is variant.finalPriceoriginalPrice is variant.originalPriceshowPopUp is set based on closeModal$store.toast.add(addToCartErrorMessage, 'ic-warning', 'error')$store.productModal (when closeModal is true)response.data.cartItems and updates:variant.quantityConstraints = addedProduct?.quantityConstraintsupdateQuantity(...) using the minimum additive quantity from the server:updateQuantity(addedProduct?.quantityConstraints?.additive?.minimum, addedProduct, addedProduct.productVariantId)$store.productModalproduct$store.toastremoveAll()add(...) (for errors/success feedback)servicesreusabledefault for add-to-cart and quantity-validation operations.servicesreusabledefault.addToCart(...)servicesreusabledefault.updateProductQuantity(data, cancelToken)data shape used by this reusable:productId: product.productId || product.idproductVariantIdrequestedQuantitycancelToken is an Axios cancel token (axios.CancelToken.source().token)addToCartErrorMessage (toast on add-to-cart failure)updateProductQuantityErrorMessage (toast on quantity update failure)response.status < 200 || response.status >= 300 || response?.success === falseReusables/VariantContent/Default.liquidReusables/VariantContent/Default.jsReusables/VariantContent/Default.json (consumed as Reusables.VariantContent.Translations.*)product.mediaItems[0].link when present; otherwise it falls back to GlobalData.Settings.noImage.link or the theme fallback /Assets/images/no-image.svg.item.textColor; the template supports one or two concatenated hex colors (e.g. #RRGGBB#RRGGBB) and renders split halves.