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

Gothic Victorian Mansions

Stationery Set by The Mystical Crow

 

Step into a world of haunting elegance with the Victorian Mansions Stationery Set, featuring hand-drawn Gothic Victorian mansions nestled in misty forests under the glow of a full moon. Each design is a doorway to another time, surrounded by enchanting gardens that tell stories of mystery, romance, and magic.

 

Victorian Mansions in Witchcraft and Folklore

Victorian mansions are symbols of history, secrets, and the connection between the seen and unseen worlds. Their towering spires and intricate details embody the energy of protection, wisdom, and enduring beauty. In witchcraft, they are often associated with ancestral magic, deep introspection, and the cultivation of sacred spaces.

 

Unveil the art of magical correspondence with these handmade stationery sets. Perfect for the peculiar soul who cherishes unique, artistic details, each set includes:

• 8 handmade cards crafted from iridescent shimmer cardstock, partially hand-painted with gold acrylics for depth and dimension.

• 8 black envelopes that add a luxurious and dramatic touch to your letters.

• 8 wax seals (with sticker backing) featuring ornate designs carefully highlighted with gold paint, offering elegance and timeless charm.

 

Designed exclusively by The Mystical Crow, these sets are a true testament to craftsmanship and creativity. Ideal for sending heartfelt messages, invitations, or even a sprinkle of magic, they’re the perfect blend of artistry and function.

'GOTHIC VICTORIAN MANSIONS' Stationary Set

$28.00Price
Quantity
    bottom of page