@sledge-app/react-instant-search 2.0.32 → 2.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4218,6 +4218,8 @@ const VariantSelector = (props) => {
|
|
|
4218
4218
|
defaultSelected["data-inventory-quantity"] = variants[0].inventory_quantity;
|
|
4219
4219
|
defaultSelected["data-inventory-management"] = variants[0].inventory_management;
|
|
4220
4220
|
defaultSelected["data-inventory-policy"] = variants[0].inventory_policy;
|
|
4221
|
+
defaultSelected["data-price"] = variants[0].price;
|
|
4222
|
+
defaultSelected["data-compare-at-price"] = variants[0].compare_at_price;
|
|
4221
4223
|
}
|
|
4222
4224
|
setDefaultFunction();
|
|
4223
4225
|
function setSelectedOption(element, optionName) {
|
|
@@ -4317,8 +4319,11 @@ const VariantSelector = (props) => {
|
|
|
4317
4319
|
setSelectedVariantInventoryPolicy == null ? void 0 : setSelectedVariantInventoryPolicy(inventoryPolicy);
|
|
4318
4320
|
if (price)
|
|
4319
4321
|
setSelectedVariantPrice == null ? void 0 : setSelectedVariantPrice(price);
|
|
4320
|
-
if (compareAtPrice)
|
|
4322
|
+
if (compareAtPrice) {
|
|
4321
4323
|
setSelectedVariantCompareAtPrice == null ? void 0 : setSelectedVariantCompareAtPrice(compareAtPrice);
|
|
4324
|
+
} else {
|
|
4325
|
+
setSelectedVariantCompareAtPrice == null ? void 0 : setSelectedVariantCompareAtPrice(0);
|
|
4326
|
+
}
|
|
4322
4327
|
if (imageId)
|
|
4323
4328
|
parentCard.querySelector(`img.sledge__product-grid-card-image-featured-image`).src = parentCard.querySelector(`div.sledge__product-grid-card-variant-images img[id="${imageId}"]`).src;
|
|
4324
4329
|
};
|