-

A simple liquid colloidal silver supplement providing 40 mcg of silver per 4 mL serving at a concentration of 10 ppm
(function () {
const formBox =
document.getElementById("lwf-colloidal-silver-form");
if (!formBox) {
return;
}
const packageSelect =
formBox.querySelector("#colloidal-silver-package");
const productPriceField =
formBox.querySelector("#colloidal-silver-productpr");
const priceDisplay =
formBox.querySelector("#colloidal-silver-price");
const addToCartButton =
formBox.querySelector("#colloidal-silver-add-to-cart");
const deliveryInputs =
formBox.querySelectorAll(
'input[name="colloidal-silver-delivery"]'
);
/* ---------------------------------------------------------
Product identification
--------------------------------------------------------- */
const productName =
"Colloidal Silver";
/* ---------------------------------------------------------
Package options
--------------------------------------------------------- */
const packages = {
one: {
sku: "USLF000600",
description: "(1) bottle / 4 fl. oz. (120 mL)",
price: "25.95"
},
two: {
sku: "USLF000600",
description: "(2) bottles / 4 fl. oz. (120 mL) each",
price: "51.90"
},
three: {
sku: "USLF000600",
description: "(3) bottles / 4 fl. oz. (120 mL) each",
price: "77.85"
},
four: {
sku: "USLF000600",
description: "(4) bottles / 4 fl. oz. (120 mL) each",
price: "103.80"
}
};
/* ---------------------------------------------------------
Get selected delivery option
--------------------------------------------------------- */
function selectedDelivery() {
const selected =
formBox.querySelector(
'input[name="colloidal-silver-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();
})();
-

A simple liquid colloidal silver supplement providing 13 mcg of silver per 2.5 mL serving at a concentration of 5 ppm
(function () {
const formBox = document.getElementById("lwf-ultimate-colloidal-silver-form");
if (!formBox) {
return;
}
const packageSelect = formBox.querySelector("#ultimate-colloidal-silver-package");
const productPriceField = formBox.querySelector("#ultimate-colloidal-silver-productpr");
const priceDisplay = formBox.querySelector("#ultimate-colloidal-silver-price");
const addToCartButton = formBox.querySelector("#ultimate-colloidal-silver-add-to-cart");
const deliveryInputs = formBox.querySelectorAll('input[name="ultimate-colloidal-silver-delivery"]');
const productName = "Ultimate Colloidal Silver";
const packages = {
single: {
sku: "USYG100401",
description: "1 bottle",
price: "34.95"
},
two: {
sku: "USYG100401",
description: "2 bottles",
price: "69.90"
},
three: {
sku: "USYG100401",
description: "3 bottles",
price: "104.85"
},
four: {
sku: "USYG0033",
description: "4 bottles",
price: "131.95"
}
};
function selectedDelivery() {
const selected = formBox.querySelector('input[name="ultimate-colloidal-silver-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();
})();