// 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

Valued at $65, your for only $49.99

Immerse yourself in the mystical world of our Crow's Witch Botanical Flora Vintage Apothecary Set, a collection of luxurious and enchanting products designed to pamper your skin and soothe your senses. Each item in this set is carefully crafted with botanical ingredients and high-grade essential oils to provide a truly magical experience.

 

Indulge in the soothing scent of lavender with our Lavender Balm, made with pure essential oils, beeswax, and coconut oil. You can use it for your hands and skin for ultimate skin moisture.

 

Experience the exotic and floral notes of gardenia and jasmine with our Gardenia Oil, infused with fragrant jasmine flowers. This oil will leave your skin feeling soft and hydrated, while transporting you to a blooming garden paradise.

 

Our Rose Oil is a decadent blend of rose petals and buds infused in organic coconut oil with high-grade rose essential oils. This luxurious oil will moisturize and rejuvenate your skin, leaving it glowing and radiant.

 

Treat yourself to a luxurious milk bath with our Milk Bath, featuring coconut milk, Epsom salt, sea salt, and fragrant peels. This indulgent bath will nourish your skin and help you unwind after a long day.

 

Lastly, pamper yourself with our Rose Scented Bath Bomb, infused with rose petals and high-grade oils to provide moisture and hydration to your skin. This bath bomb will leave you feeling refreshed and rejuvenated, with a delicate rose scent lingering on your skin.

 

Embrace the magic of our Crow's Witch Botanical Flora Vintage Apothecary Set and elevate your self-care routine with these luxurious and enchanting products. Let the power of botanicals and essential oils transform your skincare ritual into a truly mystical experience.

Mystical Crow's Witch Botanical Flora Vintage Apothecary set

$47.99Price
Quantity
    bottom of page