Envía este enlace a tus clientes. Podrán navegar por todas tus colecciones, ampliar fotos con zoom en alta resolución y armar su propio carrito sin poder editar productos ni acceder a tu administración:
Conecte su panel directamente con su base de datos de Supabase. Esto habilitará el almacenamiento persistente en la nube en tiempo real, permitiendo sincronizar sus pedidos de forma instantánea sin pasar por n8n.
Acceda al SQL Editor de su panel de Supabase y ejecute la siguiente consulta para crear la tabla gm-pedidos con soporte para JSON y políticas de acceso públicas automáticas:
-- 1. TABLA DE COLECCIONES (Con Portadas y Colecciones de Temporada)
CREATE TABLE IF NOT EXISTS public.collections (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
name text NOT NULL,
slug text UNIQUE,
description text,
image_url text,
is_seasonal boolean DEFAULT false,
is_active boolean DEFAULT true,
display_order integer DEFAULT 0,
created_at timestamp with time zone DEFAULT timezone('utc'::text, now())
);
ALTER TABLE public.collections ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Acceso total a collections" ON public.collections FOR ALL USING (true) WITH CHECK (true);
-- Si ya tienes la tabla collections creada, añade las nuevas columnas ejecutando:
ALTER TABLE public.collections ADD COLUMN IF NOT EXISTS image_url text;
ALTER TABLE public.collections ADD COLUMN IF NOT EXISTS is_seasonal boolean DEFAULT false;
ALTER TABLE public.collections ADD COLUMN IF NOT EXISTS display_order integer DEFAULT 0;
-- 2. TABLA DE PRODUCTOS (Con Medidas y Colecciones)
CREATE TABLE IF NOT EXISTS public.products (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
name text NOT NULL,
slug text UNIQUE,
description text,
price numeric DEFAULT 0.00,
compare_price numeric,
dimensions text,
images text[] DEFAULT '{}'::text[],
collection_id uuid REFERENCES public.collections(id) ON DELETE SET NULL,
collection_ids uuid[] DEFAULT '{}'::uuid[],
collections text[] DEFAULT '{}'::text[],
tags text[] DEFAULT '{}'::text[],
is_active boolean DEFAULT true,
display_order integer DEFAULT 0,
customization_notes text,
created_at timestamp with time zone DEFAULT timezone('utc'::text, now())
);
ALTER TABLE public.products ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Acceso total a products" ON public.products FOR ALL USING (true) WITH CHECK (true);
-- Si ya tienes la tabla products creada, añade las dimensiones ejecutando:
ALTER TABLE public.products ADD COLUMN IF NOT EXISTS dimensions text;
-- 3. TABLA DE PEDIDOS (gm-pedidos)
CREATE TABLE IF NOT EXISTS public."gm-pedidos" (
id bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
nombre text NOT NULL,
estado text DEFAULT 'Por hacer',
plataforma text DEFAULT 'WhatsApp',
fecha_pedido timestamp with time zone DEFAULT timezone('utc'::text, now()),
fecha_entrega date,
precio_total numeric DEFAULT 0.00,
senal numeric DEFAULT 0.00,
articulos jsonb DEFAULT '[]'::jsonb
);
ALTER TABLE public."gm-pedidos" ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Acceso total a gm-pedidos" ON public."gm-pedidos" FOR ALL USING (true) WITH CHECK (true);