Showing the single result
-

A liquid calcium formula with vitamin D3, magnesium, supporting minerals, glucosamine and MSM for bone and joint support
(function () {
const formBox = document.getElementById("lwf-ultimate-osteo-fx-form");
if (!formBox) {
return;
}
const packageSelect = formBox.querySelector("#ultimate-osteo-fx-package");
const productPriceField = formBox.querySelector("#ultimate-osteo-fx-productpr");
const priceDisplay = formBox.querySelector("#ultimate-osteo-fx-price");
const addToCartButton = formBox.querySelector("#ultimate-osteo-fx-add-to-cart");
const deliveryInputs = formBox.querySelectorAll('input[name="ultimate-osteo-fx-delivery"]');
const productName = "Ultimate Osteo fx";
const packages = {
one: {
sku: "13209",
description: "(1) 32 oz bottle",
price: "46.95"
},
two: {
sku: "13209",
description: "(2) 32 oz bottles",
price: "93.90"
},
three: {
sku: "13209",
description: "(3) 32 oz bottles",
price: "140.85"
},
four: {
sku: "13209C",
description: "(4) 32 oz bottles",
price: "180.95"
}
};
function selectedDelivery() {
const selected = formBox.querySelector('input[name="ultimate-osteo-fx-delivery"]:checked');
return selected ? selected.value : "";
}
function deliveryDescription(delivery) {
if (delivery === "monthly") {
return "autoship monthly";
}
if (delivery === "two-months") {
return "autoship every 2 months";
}
return "one-time purchase";
}
function updateSelection() {
const packageKey = packageSelect.value;
const delivery = selectedDelivery();
if (!packageKey) {
productPriceField.value = "";
priceDisplay.textContent =
"(Price will show when you make your selection)";
priceDisplay.classList.add("lwf-price-prompt");
addToCartButton.disabled = true;
addToCartButton.textContent = "Add to Cart";
return;
}
const selectedPackage = packages[packageKey];
if (!selectedPackage) {
return;
}
const description =
productName +
", " +
selectedPackage.description +
", SKU " +
selectedPackage.sku +
", " +
deliveryDescription(delivery);
productPriceField.value =
description +
", :" +
selectedPackage.price;
priceDisplay.textContent =
"$" + selectedPackage.price;
priceDisplay.classList.remove("lwf-price-prompt");
addToCartButton.disabled = false;
addToCartButton.textContent = "Add to Cart";
}
deliveryInputs.forEach(function (input) {
input.addEventListener("change", updateSelection);
});
packageSelect.addEventListener("change", updateSelection);
updateSelection();
})();