Showing the single result
-

A convenient three-product pack combining Vitali-C Plus, Taheebo, and Colloidal Silver 10 ppm in one Life Force bundle
(function () {
const formBox =
document.getElementById("lwf-super-immune-form");
if (!formBox) {
return;
}
const packageSelect =
formBox.querySelector("#super-immune-package");
const productPriceField =
formBox.querySelector("#super-immune-productpr");
const priceDisplay =
formBox.querySelector("#super-immune-price");
const addToCartButton =
formBox.querySelector("#super-immune-add-to-cart");
const deliveryInputs =
formBox.querySelectorAll(
'input[name="super-immune-delivery"]'
);
/* ---------------------------------------------------------
Product identification
--------------------------------------------------------- */
const productName =
"Super Immune Pack";
/* ---------------------------------------------------------
Package options
--------------------------------------------------------- */
const packages = {
one: {
sku: "USLF080272",
description: "1 pack, 1 Vitali-C Plus + 1 Taheebo + 1 Colloidal Silver 10 ppm",
price: "83.95"
},
two: {
sku: "USLF080272",
description: "2 packs, 2 Vitali-C Plus + 2 Taheebo + 2 Colloidal Silver 10 ppm",
price: "167.90"
},
three: {
sku: "USLF080272",
description: "3 packs, 3 Vitali-C Plus + 3 Taheebo + 3 Colloidal Silver 10 ppm",
price: "251.85"
},
four: {
sku: "USLF080272",
description: "4 packs, 4 Vitali-C Plus + 4 Taheebo + 4 Colloidal Silver 10 ppm",
price: "335.80"
}
};
/* ---------------------------------------------------------
Get selected delivery option
--------------------------------------------------------- */
function selectedDelivery() {
const selected =
formBox.querySelector(
'input[name="super-immune-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 =
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";
}
/* ---------------------------------------------------------
Event listeners
--------------------------------------------------------- */
deliveryInputs.forEach(
function (input) {
input.addEventListener(
"change",
updateSelection
);
}
);
packageSelect.addEventListener(
"change",
updateSelection
);
/* ---------------------------------------------------------
Initialize
--------------------------------------------------------- */
updateSelection();
})();