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

How to make Brigid's Cross for Imbolc


Brigid's Cross is a traditional symbol of protection and blessings, often woven from straw or rushes. It is deeply connected to the Celtic goddess Brigid and later Saint Brigid, representing hearth, home, and fertility. This cross is commonly used during Imbolc, a festival marking the transition from winter to spring, to invoke Brigid's blessings for the year ahead.


In witchcraft, it serves as a powerful talisman for protection, renewal, and spiritual connection. Its correspondences include fire for transformation, the element of water for healing, and the energy of the home for grounding and stability.


Making your own Brigid's Cross is important because it allows you to imbue it with your personal energy and intentions, creating a unique spiritual tool tailored to your practice. This act of crafting strengthens your connection to the symbol and aligns it with your own magic.

Gather your supplies and let's make Brigid's Cross together!

Here’s a list of supplies you’ll need to make a Brigid’s Cross:

1. Rushes, Straw, or Dried Grass– Traditional materials, but you can also use flexible crafting materials like raffia or pipe cleaners if needed.

2. Scissors– To trim and shape the ends of your cross.

3. String, Thread, or Twine– To secure the ends and hold the cross together.

4. Water (Optional)– To lightly dampen natural materials, making them more pliable for weaving.

5. Flat Surface– To work on for stability while weaving.


Optional: Add personal touches like charms, ribbons, or herbs for additional correspondences and intentions.




Comments


bottom of page