-

A liquid supplement pack combining OsteoProCare® and FlexeoPlus® for complementary bone and joint nutritional support
(function () {
const formBox =
document.getElementById("lwf-bone-joint-form");
if (!formBox) {
return;
}
const packageSelect =
formBox.querySelector("#bone-joint-package");
const productPriceField =
formBox.querySelector("#bone-joint-productpr");
const priceDisplay =
formBox.querySelector("#bone-joint-price");
const addToCartButton =
formBox.querySelector("#bone-joint-add-to-cart");
const deliveryInputs =
formBox.querySelectorAll(
'input[name="bone-joint-delivery"]'
);
/* ---------------------------------------------------------
Package options
--------------------------------------------------------- */
const packages = {
one: {
name: "Bone & Joint Pack",
sku: "USLF000026V",
description: "1 pack, 1 OsteoProCare + 1 FlexeoPlus",
price: "67.95"
},
two: {
name: "Bone & Joint Pack",
sku: "USLF000026V",
description: "2 packs, 2 OsteoProCare + 2 FlexeoPlus",
price: "135.90"
},
three: {
name: "Bone & Joint Pack",
sku: "USLF000026V",
description: "3 packs, 3 OsteoProCare + 3 FlexeoPlus",
price: "203.85"
},
four: {
name: "Bone & Joint Pack",
sku: "USLF000026V",
description: "4 packs, 4 OsteoProCare + 4 FlexeoPlus",
price: "271.80"
}
};
/* ---------------------------------------------------------
Get selected delivery option
--------------------------------------------------------- */
function selectedDelivery() {
const selected =
formBox.querySelector(
'input[name="bone-joint-delivery"]:checked'
);
return selected ? selected.value : "";
}
/* ---------------------------------------------------------
Standard delivery wording
--------------------------------------------------------- */
function deliveryDescription(delivery) {
if (delivery === "monthly") {
return "autoship monthly";
}
if (delivery === "two-months") {
return "autoship every 2 months";
}
return "one-time purchase";
}
/* ---------------------------------------------------------
Build complete Mals cart description and price
--------------------------------------------------------- */
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 =
selectedPackage.name +
", " +
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";
}
/* ---------------------------------------------------------
Event listeners
--------------------------------------------------------- */
deliveryInputs.forEach(
function (input) {
input.addEventListener(
"change",
updateSelection
);
}
);
packageSelect.addEventListener(
"change",
updateSelection
);
/* ---------------------------------------------------------
Initialize
--------------------------------------------------------- */
updateSelection();
})();
-

A liquid bone-and-joint formula combining Glucosamine HCl, MSM, Vitamin C, Vitamin K, Zinc, and Ipriflavone
(function () {
const formBox = document.getElementById("lwf-flexeoplus-form");
if (!formBox) {
return;
}
const packageSelect = formBox.querySelector("#flexeoplus-package");
const productPriceField = formBox.querySelector("#flexeoplus-productpr");
const priceDisplay = formBox.querySelector("#flexeoplus-price");
const addToCartButton = formBox.querySelector("#flexeoplus-add-to-cart");
const deliveryInputs = formBox.querySelectorAll('input[name="flexeoplus-delivery"]');
const productName = "FlexeoPlus";
const packages = {
single: {
sku: "USLF000703",
description: "1 bottle",
price: "35.99"
},
two: {
sku: "USLF000703",
description: "2 bottles",
price: "71.98"
},
three: {
sku: "USLF000703",
description: "3 bottles",
price: "107.97"
},
four: {
sku: "USLF000703",
description: "4 bottles",
price: "143.96"
},
eight: {
sku: "USLF000704",
description: "8 bottles",
price: "191.95"
}
};
function selectedDelivery() {
const selected = formBox.querySelector('input[name="flexeoplus-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();
})();