$w.onReady(function () { if (!session.getItem("verified")) { $w("#agePopup").show(); } }); export function yesButton_click(event) { session.setItem("verified", "true"); $w("#agePopup").hide(); } export function noButton_click(event) { wixLocation.to("https://google.com"); } $w.onReady(function () { showAll(); }); function showAll() { $w("#lonsdaleSection").show(); $w("#toroSection").show(); $w("#fivePackSection").show(); $w("#boxesSection").show(); } export function btnAll_click(event) { showAll(); } export function btnLonsdale_click(event) { $w("#lonsdaleSection").show(); $w("#toroSection").hide(); $w("#fivePackSection").hide(); $w("#boxesSection").hide(); } export function btnToro_click(event) { $w("#lonsdaleSection").hide(); $w("#toroSection").show(); $w("#fivePackSection").hide(); $w("#boxesSection").hide(); } export function btn5Pack_click(event) { $w("#lonsdaleSection").hide(); $w("#toroSection").hide(); $w("#fivePackSection").show(); $w("#boxesSection").hide(); } export function btnBoxes_click(event) { $w("#lonsdaleSection").hide(); $w("#toroSection").hide(); $w("#fivePackSection").hide(); $w("#boxesSection").show(); } $w.onReady(function () { showAll(); }); function showAll() { $w("#lonsdaleSection").show(); $w("#toroSection").show(); $w("#fivePackSection").show(); $w("#boxesSection").show(); } export function btnAll_click(event) { showAll(); } export function btnLonsdale_click(event) { $w("#lonsdaleSection").show(); $w("#toroSection").hide(); $w("#fivePackSection").hide(); $w("#boxesSection").hide(); } export function btnToro_click(event) { $w("#lonsdaleSection").hide(); $w("#toroSection").show(); $w("#fivePackSection").hide(); $w("#boxesSection").hide(); } export function btn5Pack_click(event) { $w("#lonsdaleSection").hide(); $w("#toroSection").hide(); $w("#fivePackSection").show(); $w("#boxesSection").hide(); } export function btnBoxes_click(event) { $w("#lonsdaleSection").hide(); $w("#toroSection").hide(); $w("#fivePackSection").hide(); $w("#boxesSection").show(); } import wixWindow from 'wix-window'; import wixLocation from 'wix-location'; import { session } from 'wix-storage'; $w.onReady(function () { // nothing needed here }); export function btnYes_click(event) { session.setItem("verified", "true"); wixWindow.close(); } export function btnNo_click(event) { wixLocation.to("https://google.com"); } export function vanillaExpand_click(event) { toggleSection("#vanillaDesc"); } export function cognacExpand_click(event) { toggleSection("#cognacDesc"); } export function berryExpand_click(event) { toggleSection("#berryDesc"); } export function chocolateExpand_click(event) { toggleSection("#chocolateDesc"); } function toggleSection(sectionId) { if ($w(sectionId).collapsed) { $w(sectionId).expand(); } else { $w(sectionId).collapse(); } } import wixData from 'wix-data'; $w.onReady(function () { // Load all flavors by default when page is ready showAll(); }); function showAll() { $w("#flavorsDataset").setFilter( wixData.filter() .eq("isActive", true) ); } // ALL export function btnAll_click(event) { showAll(); } // LONSDALE ONLY export function btnLonsdale_click(event) { $w("#flavorsDataset").setFilter( wixData.filter() .eq("isActive", true) .eq("size", "Lonsdale") ); } // TORO ONLY export function btnToro_click(event) { $w("#flavorsDataset").setFilter( wixData.filter() .eq("isActive", true) .eq("size", "Toro") ); } // 5-PACKS ONLY export function btn5Pack_click(event) { $w("#flavorsDataset").setFilter( wixData.filter() .eq("isActive", true) .eq("packType", "5-Pack") ); } // BOXES ONLY export function btnBoxes_click(event) { $w("#flavorsDataset").setFilter( wixData.filter() .eq("isActive", true) .eq("packType", "Box") ); } import wixData from 'wix-data'; import wixLocation from 'wix-location'; import { triggeredEmail } from 'wix-crm'; $w.onReady(function () { // Collapse success message on page load $w("#orderSuccessBox").collapse(); }); // SUBMIT BUTTON ACTION export function btnSubmitOrder_click(event) { // Validate required fields if (!$w("#inputBusinessName").value || !$w("#inputContactName").value || !$w("#inputEmail").value || !$w("#dropdownFlavor").value || !$w("#dropdownPackType").value || !$w("#inputQuantity").value) { $w("#orderSuccessBox").expand(); $w("#orderSuccessBox").text = "Please fill out all required fields."; return; } // Build order object const orderData = { businessName: $w("#inputBusinessName").value, contactName: $w("#inputContactName").value, email: $w("#inputEmail").value, phone: $w("#inputPhone").value, flavor: $w("#dropdownFlavor").value, size: $w("#dropdownSize").value, packType: $w("#dropdownPackType").value, quantity: Number($w("#inputQuantity").value), notes: $w("#inputNotes").value, timestamp: new Date() }; // Save to database wixData.insert("WholesaleOrders", orderData) .then(() => { // Send notification email triggeredEmail.emailContact("wholesaleOrderEmail", { businessName: orderData.businessName, contactName: orderData.contactName, email: orderData.email, phone: orderData.phone, flavor: orderData.flavor, size: orderData.size, packType: orderData.packType, quantity: orderData.quantity, notes: orderData.notes }); // Show success message $w("#orderSuccessBox").text = "Your wholesale order was submitted successfully. We'll contact you shortly."; $w("#orderSuccessBox").expand(); // Reset form fields resetForm(); }) .catch((err) => { console.log(err); $w("#orderSuccessBox").text = "Something went wrong. Please try again."; $w("#orderSuccessBox").expand(); }); } // Reset form fields after submission function resetForm() { $w("#inputBusinessName").value = ""; $w("#inputContactName").value = ""; $w("#inputEmail").value = ""; $w("#inputPhone").value = ""; $w("#dropdownFlavor").value = undefined; $w("#dropdownSize").value = undefined; $w("#dropdownPackType").value = undefined; $w("#inputQuantity").value = ""; $w("#inputNotes").value = ""; }
top of page

All Products

0 products

No products here yet...

In the meantime, you can choose a different category to continue shopping.

bottom of page
export function sortDropdown_change(event) { const value = $w("#sortDropdown").value; if (value === "priceAsc") { $w("#flavorsDataset").setSort( wixData.sort() .ascending("wholesalePrice") ); } else if (value === "priceDesc") { $w("#flavorsDataset").setSort( wixData.sort() .descending("wholesalePrice") ); } else if (value === "nameAsc") { $w("#flavorsDataset").setSort( wixData.sort() .ascending("title") ); } else { // Default $w("#flavorsDataset").setSort( wixData.sort() .ascending("_createdDate") ); } } import wixLocation from 'wix-location'; export function btnDownloadMenu_click(event) { const pdfUrl = "YOUR_PDF_URL_HERE"; // paste your Wix static PDF URL here wixLocation.to(pdfUrl); }