// Page Code for /checkout-link import { cart } from 'wix-stores'; import wixLocation from 'wix-location'; /** * Accepts `products` query parameter in Meta format: * - Encoded: products=112233%3A1%2C445566%3A2 * - Unencoded: products=112233:1,445566:2 (still works) * * Each entry is ID:QTY. Colons/commas may be RFC 3986-escaped. * Example final URL for Meta: * https://mysticalcrow.com/checkout-link?products=112233%3A1%2C445566%3A2 */ function parseProductsParam(rawParam) { if (!rawParam || typeof rawParam !== 'string') return []; // Try to decode once; if it throws or changes nothing, we still continue safely let decoded = rawParam; try { // decodeURIComponent will convert %3A -> ":", %2C -> "," decoded = decodeURIComponent(rawParam); } catch (_e) { // If decoding fails, we’ll proceed with the original string } // Split by commas (now that we normalized to ":" and ",") // Trim spaces just in case. return decoded .split(',') .map(s => s.trim()) .filter(Boolean) .map(pair => { const [id, qty] = pair.split(':').map(x => (x || '').trim()); const quantity = Number(qty); return (id && !Number.isNaN(quantity) && quantity > 0) ? { productId: id, quantity } : null; }) .filter(Boolean); } async function addAllToCart(items) { // Wix Stores cart.addProducts accepts an array of product objects. // We’ll add one by one to ensure each promise resolves, but you can batch if desired. for (const item of items) { // If a product has variants/options, you’ll need to pass the relevant // selection data here (e.g., options: [{ optionName, selection }]). // For simple products, productId + quantity is sufficient. await cart.addProducts([{ productId: item.productId, quantity: item.quantity }]); } } $w.onReady(async function () { const { products } = wixLocation.query; if (!products) { // No parameter present; go to cart so the user isn't stuck. wixLocation.to('/cart'); return; } const items = parseProductsParam(products); if (!items.length) { // Parameter present but invalid/empty after parsing wixLocation.to('/cart'); return; } try { await addAllToCart(items); // Success: go straight to checkout wixLocation.to('/checkout'); } catch (_err) { // If anything fails (bad ID, etc.), fall back to cart wixLocation.to('/cart'); } });
top of page

Witch’s Apothecary – Dark Academia Candle

Step into the dim glow of an old-world workshop, where shelves overflow with jars of herbs, roots, and tinctures, and the air hums with quiet magic. Witch’s Apothecary captures the essence of spellcraft and ancient remedies, a mysterious blend that feels both grounding and enchanting. Aromatic top notes of peppercorn, clary sage, and coriander awaken the senses, while moss, patchouli, and chamomile create an earthy heart. At its base, warm balsam glows like candlelight against stone walls, steeped in the presence of ritual and craft.

Infused with natural essential oils—including guaiacwood, lemon, elemi, cypress, patchouli, cedarwood, nutmeg, sage, and fir balsam—this fragrance evokes the moody charm of a witch’s private apothecary. Freshly ground herbs, aged wood, and a trace of smoke linger in the air, weaving together a scent that feels like stepping directly into a page of dark folklore.

Hand-poured with 100% soy wax and a clean cotton wick, this candle provides a pure, toxin-free burn. Each fragrance oil is clean and phthalate-free, ensuring a safe and mystical experience.

Available in three sizes to suit your rituals:
– 16 oz glass jar for long nights of spellwork and study
– 12 oz glass jar for daily brushes with magic
– 6 oz travel tin to carry the apothecary’s secrets wherever you go

Light the flame, and let Witch’s Apothecary fill your space with the timeless scent of herbs, mystery, and quiet power.

WITCH'S APOTHECARY Dark Academia Candle Collection

$13.00Price
Quantity
    bottom of page