COLECCIONES

{%- comment -%} Mundo3D · Catálogo de colección (página de productos) Replica el catálogo mobile-first como sección Liquid: encabezado, filtros por categoría (links de colección o tipos de producto), orden, grilla y vista rápida. Contenido a max-width 1600px. Requiere assets/m3d-base.css y assets/m3d-base.js. Úsala dentro de templates/collection.json para que reciba el objeto {{ collection }}. {%- endcomment -%} {{ 'm3d-base.css' | asset_url | stylesheet_tag }} {{ 'm3d-base.js' | asset_url | script_tag }} {%- liquid assign maxw = section.settings.content_max_width | default: 1600 assign acc = section.settings.accent_color | default: '#00bfa6' assign per = section.settings.products_per_page | default: 24 assign cols = section.settings.columns | default: 3 assign cols_m = section.settings.columns_mobile | default: 2 -%}
{%- if section.settings.show_breadcrumb -%} {%- endif -%}

{{ section.settings.heading | default: collection.title | default: section.settings.fallback_title }}

{%- assign desc = section.settings.subtitle | default: collection.description -%} {%- if desc != blank -%}
{{ desc | strip_html | truncatewords: 28 }}
{%- endif -%} {%- if section.settings.ship_text != blank -%}
{{ section.settings.ship_text }}
{%- endif -%}
{%- if section.settings.show_filters -%}
{%- comment -%} Filtros: enlaces a sub-colecciones o filtrado por tipo de producto {%- endcomment -%} {%- if section.settings.filter_source == 'links' and linklists[section.settings.filter_menu].links.size > 0 -%} ✨ Todos {%- for link in linklists[section.settings.filter_menu].links -%} {{ link.title }} {%- endfor -%} {%- else -%} {%- comment -%} Por tipo de producto (filtrado client-side) {%- endcomment -%} {%- assign types = collection.all_types | default: collection.products | map: 'type' | uniq -%} {%- for t in types -%} {%- if t != blank -%}{%- endif -%} {%- endfor -%} {%- endif -%}
{%- endif -%}
{{ collection.products_count | default: collection.products.size }} productos
{%- if section.settings.show_sort -%} {%- endif -%}
{%- paginate collection.products by per -%} {%- if collection.products.size > 0 -%}
{%- for product in collection.products -%} {%- assign pcat = product.type | default: 'Producto' -%}
{%- if section.settings.show_badge and product.compare_at_price > product.price -%}Oferta {%- elsif section.settings.show_badge and product.metafields.custom.badge != blank -%}{{ product.metafields.custom.badge }}{%- endif -%} {%- if section.settings.show_fav -%} {%- endif -%} {%- if product.featured_image -%} {{ product.featured_image.alt | escape | default: product.title }} {%- else -%}
Foto — {{ product.title | downcase | truncate: 30 }}
{%- endif -%}
{{ pcat }}

{{ product.title }}

{%- if section.settings.show_points -%}+100 Puntos 3D{%- endif -%}
{{ product.price | money }}{% if product.compare_at_price > product.price %}{{ product.compare_at_price | money }}{% endif %}{% if section.settings.show_shipping %}Envío gratis{% endif %}
{%- if section.settings.show_add -%} {%- endif -%}
{%- endfor -%}
{%- if paginate.pages > 1 -%} {%- endif -%} {%- else -%}
🔍
Esta colección está vacía.

Vuelve pronto, estamos imprimiendo cosas nuevas.

{%- endif -%} {%- endpaginate -%}
{%- if section.settings.show_quickview -%}

Envío gratis

Ganas +100 Puntos 3D = $100
1
Ver todos los detalles →
{%- endif -%} {% schema %} { "name": "M3D · Catálogo", "tag": "section", "settings": [ { "type": "header", "content": "Encabezado" }, { "type": "checkbox", "id": "show_breadcrumb", "label": "Mostrar migas de pan", "default": true }, { "type": "text", "id": "heading", "label": "Título (vacío = nombre de colección)" }, { "type": "text", "id": "fallback_title", "label": "Título por defecto", "default": "El catálogo" }, { "type": "text", "id": "subtitle", "label": "Subtítulo (vacío = descripción de colección)", "default": "Cada producto resuelve algo concreto. Sin relleno." }, { "type": "text", "id": "ship_text", "label": "Texto de envío", "default": "Envío gratis en todo Chile · +100 Puntos 3D por compra" }, { "type": "header", "content": "Filtros y orden" }, { "type": "checkbox", "id": "show_filters", "label": "Mostrar filtros por categoría", "default": true }, { "type": "select", "id": "filter_source", "label": "Fuente de los filtros", "options": [ {"value":"types","label":"Tipos de producto (filtra en la página)"}, {"value":"links","label":"Menú de colecciones (enlaces)"} ], "default": "types", "info": "‘Tipos’ filtra los productos cargados sin recargar. ‘Menú’ usa enlaces a colecciones." }, { "type": "link_list", "id": "filter_menu", "label": "Menú para filtros (si eliges ‘Menú de colecciones’)" }, { "type": "checkbox", "id": "show_sort", "label": "Mostrar orden", "default": true }, { "type": "header", "content": "Tarjetas de producto" }, { "type": "range", "id": "columns", "min": 2, "max": 5, "step": 1, "label": "Columnas (escritorio)", "default": 3 }, { "type": "range", "id": "columns_mobile", "min": 1, "max": 2, "step": 1, "label": "Columnas (móvil)", "default": 2 }, { "type": "range", "id": "products_per_page", "min": 8, "max": 48, "step": 4, "label": "Productos por página", "default": 24 }, { "type": "checkbox", "id": "show_badge", "label": "Etiqueta (oferta / metafield custom.badge)", "default": true }, { "type": "checkbox", "id": "show_fav", "label": "Botón favorito", "default": true }, { "type": "checkbox", "id": "show_points", "label": "Mostrar Puntos 3D", "default": true }, { "type": "checkbox", "id": "show_shipping", "label": "Mostrar ‘Envío gratis’", "default": true }, { "type": "checkbox", "id": "show_add", "label": "Botón agregar / vista rápida", "default": true }, { "type": "checkbox", "id": "show_quickview", "label": "Vista rápida (bottom sheet)", "default": true }, { "type": "header", "content": "Apariencia" }, { "type": "color", "id": "bg_color", "label": "Fondo", "default": "#e0ddd5" }, { "type": "color", "id": "accent_color", "label": "Acento", "default": "#00bfa6" }, { "type": "checkbox", "id": "show_texture", "label": "Textura de papel", "default": false }, { "type": "range", "id": "corner_radius", "min": 0, "max": 30, "step": 1, "unit": "px", "label": "Redondez", "default": 18 }, { "type": "range", "id": "content_max_width", "min": 1000, "max": 1600, "step": 20, "unit": "px", "label": "Ancho máx. del contenido", "default": 1600 }, { "type": "range", "id": "padding_top", "min": 0, "max": 160, "step": 4, "unit": "px", "label": "Espaciado superior", "default": 56 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 160, "step": 4, "unit": "px", "label": "Espaciado inferior", "default": 80 } ], "presets": [ { "name": "M3D · Catálogo" } ] } {% endschema %}