{"id":1409,"date":"2026-03-09T16:44:03","date_gmt":"2026-03-09T15:44:03","guid":{"rendered":"https:\/\/www.gelaterialeccapaletta.it\/?page_id=1409"},"modified":"2026-09-01T01:54:10","modified_gmt":"2026-08-31T23:54:10","slug":"vaschetta","status":"publish","type":"page","link":"https:\/\/www.gelaterialeccapaletta.it\/en\/vaschetta\/","title":{"rendered":"vaschetta"},"content":{"rendered":"<link\n  href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.3\/dist\/css\/bootstrap.min.css\"\n  rel=\"stylesheet\"\n\/>\n<link\n  href=\"https:\/\/www.gelaterialeccapaletta.it\/gelato\/sezione-vaschetta.css?v=3\"\n  rel=\"stylesheet\"\n\/>\n<div id=\"gelato\">\n<div class=\"hero-wrap\">\n    <img decoding=\"async\"\n      class=\"logo-gelateria\"\n      src=\"https:\/\/www.gelaterialeccapaletta.it\/wp-content\/uploads\/2024\/08\/logo-lecca-paletta-100.jpg\"\n      alt=\"Logo Lecca Paletta\"\n    \/><\/p>\n<h1>IL TUO GELATO ARTIGIANALE<\/h1>\n<p class=\"hero-subtitle\">\n      Scegli la vaschetta, componi i gusti disponibili di oggi e inviaci la tua<br \/>\n      richiesta in modo semplice e veloce.\n    <\/p>\n<\/p><\/div>\n<div class=\"step-bar\">\n<div class=\"step-item\">\n<div class=\"step-number\">1<\/div>\n<div class=\"step-title\">Scegli la vaschetta<\/div>\n<div class=\"step-subtitle\">Choose your tub<\/div>\n<\/p><\/div>\n<div class=\"step-item\">\n<div class=\"step-number\">2<\/div>\n<div class=\"step-title\">Scegli i gusti<\/div>\n<div class=\"step-subtitle\">Choose your flavours<\/div>\n<\/p><\/div>\n<div class=\"step-item\">\n<div class=\"step-number\">3<\/div>\n<div class=\"step-title\">Invia la prenotazione<\/div>\n<div class=\"step-subtitle\">Send your booking request<\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div id=\"appgelato\" v-cloak>\n<div class=\"status-wrap\">\n<div v-if=\"loading\" class=\"loading-box\">\n        Sto caricando i gusti disponibili&#8230;\n      <\/div>\n<div v-if=\"errore\" class=\"error-box\">\n        {{ errore }}\n      <\/div>\n<\/p><\/div>\n<div class=\"section-head\">\n<div class=\"section-kicker\">Step 1<\/div>\n<h2>SCEGLI LA VASCHETTA<\/h2>\n<p class=\"section-sub\">\n        Seleziona la dimensione pi\u00f9 adatta e poi passa alla scelta dei gusti.\n      <\/p>\n<div class=\"tub-price\">\n        <span>Price tub<\/span><br \/>\n        <span>=<\/span><br \/>\n        <span>23\u20ac\/Kg<\/span>\n      <\/div>\n<\/p><\/div>\n<div class=\"cards-section\">\n<div class=\"varianti row row-cols-1 row-cols-md-2 g-4 mb-4 text-center\">\n<div v-for=\"v in varianti\" :key=\"v.id\" class=\"col\">\n<div\n            class=\"ui-card\"\n            :class=\"{ 'is-active': v.isattivo }\"\n            @click=\"settaVarianteAttiva(v.id)\"\n          ><\/p>\n<div class=\"ui-card-header\">\n<h4>{{ v.nomeBreve }}<\/h4>\n<\/p><\/div>\n<div class=\"ui-card-body\">\n              <img class=\"ui-card-image\" :src=\"v.image\" :alt=\"v.nomeBreve\" \/><\/p>\n<div class=\"ui-card-content\">\n<p class=\"ui-card-text\">{{ v.descrizione }}<\/p>\n<p>                <button\n                  type=\"button\"\n                  class=\"ui-btn ui-btn-full\"\n                  @click.stop=\"settaVarianteAttiva(v.id)\"\n                ><br \/>\n                  Scegli \/ Choose<br \/>\n                <\/button>\n              <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div v-if=\"varianteAttiva\" class=\"status-wrap\">\n<div class=\"selected-box\">\n          Hai selezionato:<br \/>\n          <strong>{{ varianteAttiva.nomeBreve }}<\/strong><br \/>\n          \u2014 {{ varianteAttiva.descrizione }}<br \/>\n          <br \/>\n          Gusti selezionati:<br \/>\n          <strong>{{ qta_tot }}\/{{ max_gusti }}<\/strong>\n        <\/div>\n<\/p><\/div>\n<div v-if=\"messaggio\" class=\"status-wrap\">\n<div class=\"notice-box\">\n          {{ messaggio }}\n        <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<p>    <span id=\"inizio-gusti\" class=\"anchor-gusti\" aria-hidden=\"true\"><\/span><\/p>\n<div class=\"section-head\" style=\"margin-top: 26px\">\n<div class=\"section-kicker\">Step 2<\/div>\n<h3>SCEGLI I GUSTI<\/h3>\n<p class=\"section-sub\">\n        Aggiungi i gusti disponibili di oggi fino al numero consentito dalla<br \/>\n        vaschetta scelta.\n      <\/p>\n<\/p><\/div>\n<div v-if=\"!varianteAttiva\" class=\"status-wrap\">\n<div class=\"empty-box\">Prima scegli la vaschetta.<\/div>\n<\/p><\/div>\n<div\n      v-if=\"!loading &#038;&#038; !errore &#038;&#038; products &#038;&#038; !products.length\"\n      class=\"status-wrap\"\n    ><\/p>\n<div class=\"empty-box\">Nessun gusto trovato.<\/div>\n<\/p><\/div>\n<div\n      v-if=\"products &#038;&#038; products.length\"\n      class=\"gusti row row-cols-1 row-cols-md-3 g-4 mb-3 text-center\"\n    ><\/p>\n<div v-for=\"p in products\" :key=\"p.id\" class=\"col\">\n<div class=\"ui-card gusto-card\" :class=\"{ 'is-active': p.isattivo }\">\n<div class=\"ui-card-header\">\n<h4 v-html=\"p.name\"><\/h4>\n<\/p><\/div>\n<div class=\"ui-card-body\">\n            <img class=\"ui-card-image\" :src=\"p.image\" :alt=\"testoPulito(p.name)\" \/><\/p>\n<div class=\"ui-card-content\">\n<div class=\"ui-card-text\" v-html=\"p.description\"><\/div>\n<div class=\"qty-box\">\n<div class=\"qty-row\">\n                  <span class=\"qty-cell\"><br \/>\n                    <button\n                      type=\"button\"\n                      class=\"qty-btn\"\n                      :disabled=\"p.q <= 0\"\n                      aria-label=\"Diminuisci quantit\u00e0\"\n                      @click.stop=\"settaQtaprodottoAttivo(p, -1)\"\n                    ><br \/>\n                      \u2212<br \/>\n                    <\/button><br \/>\n                  <\/span><\/p>\n<p>                  <span class=\"qty-cell qty-number\">{{ p.q }}<\/span><\/p>\n<p>                  <span class=\"qty-cell\"><br \/>\n                    <button\n                      type=\"button\"\n                      class=\"qty-btn\"\n                      :disabled=\"!varianteAttiva || qta_tot >= max_gusti&#8221;<br \/>\n                      aria-label=&#8221;Aumenta quantit\u00e0&#8221;<br \/>\n                      @click.stop=&#8221;settaQtaprodottoAttivo(p, 1)&#8221;<br \/>\n                    ><br \/>\n                      +<br \/>\n                    <\/button><br \/>\n                  <\/span>\n                <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"form-section\" id=\"form-prenotazione\">\n<div class=\"form-section-head\">\n<div class=\"section-kicker\">Step 3<\/div>\n<div class=\"form-title\">Completa la prenotazione<\/div>\n<p class=\"form-subtitle\">\n          Inserisci i tuoi dati e inviaci la richiesta. Ti confermeremo l\u2019orario<br \/>\n          appena possibile. Nessun addebito verr\u00e0 effettuato prima della nostra<br \/>\n          conferma.\n        <\/p>\n<\/p><\/div>\n<form\n        class=\"vaschetta-form\"\n        id=\"vaschetta-form\"\n        novalidate\n        @submit.prevent=\"apriWhatsAppDiretto\"\n      ><br \/>\n        <input type=\"hidden\" id=\"vaschetta_json\" name=\"vaschetta_json\" \/><br \/>\n        <input type=\"hidden\" id=\"vaschetta_variante\" name=\"vaschetta_variante\" \/><br \/>\n        <input type=\"hidden\" id=\"vaschetta_descrizione\" name=\"vaschetta_descrizione\" \/><br \/>\n        <input type=\"hidden\" id=\"vaschetta_qta_gusti\" name=\"vaschetta_qta_gusti\" \/><br \/>\n        <input type=\"hidden\" id=\"vaschetta_gusti\" name=\"vaschetta_gusti\" \/><\/p>\n<div class=\"vaschetta-field\">\n          <label for=\"nome-cognome\"><br \/>\n            <strong>Nome e cognome \/ Name and surname<\/strong><br \/>\n          <\/label><br \/>\n          <input\n            v-model.trim=\"form.nome\"\n            type=\"text\"\n            id=\"nome-cognome\"\n            name=\"nome_cognome\"\n            autocomplete=\"name\"\n            placeholder=\"Inserisci nome e cognome\"\n            required\n          \/>\n        <\/div>\n<div class=\"vaschetta-field\">\n          <label for=\"telefono\"><br \/>\n            <strong>Numero di telefono o WhatsApp \/ Phone number or WhatsApp<\/strong><br \/>\n          <\/label><br \/>\n          <input\n            v-model.trim=\"form.telefono\"\n            type=\"tel\"\n            id=\"telefono\"\n            name=\"telefono\"\n            autocomplete=\"tel\"\n            placeholder=\"Inserisci il tuo numero\"\n            required\n          \/>\n        <\/div>\n<div class=\"vaschetta-field\">\n          <label for=\"email\"><br \/>\n            <strong>Mail (facoltativa) \/ Email (optional)<\/strong><br \/>\n          <\/label><br \/>\n          <input\n            v-model.trim=\"form.email\"\n            type=\"email\"\n            id=\"email\"\n            name=\"email\"\n            autocomplete=\"email\"\n            placeholder=\"Inserisci la tua email\"\n          \/>\n        <\/div>\n<div class=\"vaschetta-field\">\n          <label for=\"note\"><br \/>\n            <strong>Note o richieste particolari \/ Notes or special requests<\/strong><br \/>\n          <\/label><br \/>\n          <textarea\n            v-model.trim=\"form.note\"\n            id=\"note\"\n            name=\"note\"\n            placeholder=\"Scrivi qui eventuali richieste particolari...\"\n          ><\/textarea>\n        <\/div>\n<div class=\"vaschetta-submit-wrap\">\n          <button type=\"submit\" class=\"vaschetta-submit\" :disabled=\"!canSubmit\"><br \/>\n            Invia prenotazione<br \/>\n          <\/button><\/p>\n<div class=\"submit-helper\" v-if=\"!canSubmit\">\n            Seleziona una vaschetta, almeno un gusto, nome e telefono.\n          <\/div>\n<\/p><\/div>\n<\/p><\/form>\n<\/p><\/div>\n<div class=\"summary-bar\" id=\"summary-bar\">\n<div class=\"summary-inner\">\n<div class=\"summary-head\">\n<div class=\"summary-title\">Riepilogo<\/div>\n<p>          <button\n            type=\"button\"\n            class=\"summary-reset\"\n            aria-label=\"Azzera la selezione\"\n            @click=\"resettaOrdine\"\n          ><br \/>\n            \u00d7<br \/>\n          <\/button>\n        <\/div>\n<div class=\"summary-text\">\n<div v-if=\"varianteAttiva\">\n            {{ varianteAttiva.nomeBreve }} \u2014 {{ varianteAttiva.descrizione }}<br \/>\n            \u2014 gusti: {{ qta_tot }}\/{{ max_gusti }}\n          <\/div>\n<div v-else>Nessuna vaschetta selezionata.<\/div>\n<\/p><\/div>\n<div class=\"summary-badges\">\n          <span\n            class=\"summary-badge\"\n            v-for=\"p in gustiAttivi\"\n            :key=\"'badge-' + p.id\"\n          ><br \/>\n            <span v-html=\"p.name\"><\/span><br \/>\n            <strong>x{{ p.q }}<\/strong><br \/>\n          <\/span>\n        <\/div>\n<div class=\"summary-actions\">\n          <button\n            type=\"button\"\n            class=\"summary-continue-btn\"\n            @click=\"vaiAlForm\"\n            v-if=\"varianteAttiva\"\n          ><br \/>\n            Prosegui<br \/>\n          <\/button>\n        <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<style>\n  [v-cloak] {\n    display: none;\n  }<\/p>\n<p>  #gelato button,\n  #gelato input,\n  #gelato textarea {\n    touch-action: manipulation;\n  }<\/p>\n<p>  #gelato .summary-continue-btn {\n    appearance: none;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    min-height: 44px;\n    padding: 10px 18px;\n    border: 0;\n    border-radius: 12px;\n    background: var(--brand-blue, #163852);\n    color: #fff;\n    font-size: 15px;\n    font-weight: 700;\n    line-height: 1.2;\n    cursor: pointer;\n  }<\/p>\n<p>  #gelato .summary-continue-btn:focus-visible {\n    outline: 3px solid rgba(22, 56, 82, 0.25);\n    outline-offset: 2px;\n  }<\/p>\n<p>  @media (max-width: 782px) {\n    body.page-id-1409 .sections_group .mcb-section .section_wrapper {\n      width: 100%;\n      max-width: 100%;\n      padding-right: 12px !important;\n      padding-left: 12px !important;\n    }\n  }<\/p>\n<p>  @media (max-width: 767.98px) {\n    #gelato {\n      width: 100%;\n      max-width: 100%;\n      padding-right: 12px !important;\n      padding-bottom: calc(230px + env(safe-area-inset-bottom)) !important;\n      padding-left: 12px !important;\n      overflow-x: clip;\n    }<\/p>\n<p>    #gelato h1 {\n      display: block !important;\n      max-width: 100%;\n      font-size: clamp(27px, 8vw, 34px) !important;\n      overflow-wrap: anywhere;\n    }<\/p>\n<p>    #gelato h2,\n    #gelato h3,\n    #gelato .form-title {\n      overflow-wrap: anywhere;\n    }<\/p>\n<p>    #gelato .hero-wrap {\n      margin-bottom: 24px;\n    }<\/p>\n<p>    #gelato .step-bar {\n      gap: 10px;\n      margin-top: 20px;\n      margin-bottom: 30px;\n    }<\/p>\n<p>    #gelato .step-item {\n      padding: 12px 14px;\n    }<\/p>\n<p>    #gelato .varianti .ui-card-image {\n      height: clamp(220px, 70vw, 290px) !important;\n      padding: 12px !important;\n      object-fit: contain !important;\n    }<\/p>\n<p>    #gelato .gusti .ui-card-image {\n      height: 220px !important;\n      padding: 0 !important;\n      object-fit: cover !important;\n    }<\/p>\n<p>    #gelato .ui-card-header {\n      min-height: 64px !important;\n      height: auto !important;\n      padding: 12px 14px !important;\n    }<\/p>\n<p>    #gelato .ui-card-text,\n    #gelato .gusto-card .ui-card-text {\n      min-height: 0;\n    }<\/p>\n<p>    #gelato .vaschetta-field input,\n    #gelato .vaschetta-field textarea {\n      font-size: 16px !important;\n    }<\/p>\n<p>    #gelato .vaschetta-submit {\n      width: 100%;\n      min-width: 0;\n      min-height: 48px;\n    }<\/p>\n<p>    #gelato .summary-bar {\n      position: fixed !important;\n      right: 0;\n      bottom: 0;\n      left: 0;\n      width: 100%;\n      margin: 0;\n      z-index: 99999;\n      padding-bottom: 0;\n      border-radius: 20px 20px 0 0;\n      transition: transform 0.2s ease, opacity 0.2s ease;\n    }<\/p>\n<p>    #gelato .summary-inner {\n      width: 100%;\n      max-width: none;\n      max-height: min(44vh, 320px);\n      padding: 10px 12px calc(12px + env(safe-area-inset-bottom));\n      overflow-y: auto;\n      overscroll-behavior: contain;\n      border-radius: 20px 20px 0 0;\n    }<\/p>\n<p>    #gelato .summary-head {\n      gap: 10px;\n      margin-bottom: 6px;\n    }<\/p>\n<p>    #gelato .summary-reset {\n      width: 44px;\n      min-width: 44px;\n      height: 44px;\n    }<\/p>\n<p>    #gelato .summary-text {\n      font-size: 13px;\n    }<\/p>\n<p>    #gelato .summary-badges {\n      flex-wrap: nowrap;\n      gap: 6px;\n      overflow-x: auto;\n      overscroll-behavior-x: contain;\n      scrollbar-width: thin;\n      -webkit-overflow-scrolling: touch;\n    }<\/p>\n<p>    #gelato .summary-badge {\n      flex: 0 0 auto;\n      max-width: 82vw;\n      padding: 7px 10px;\n    }<\/p>\n<p>    #gelato .summary-actions {\n      margin-top: 8px;\n      text-align: center !important;\n    }<\/p>\n<p>    #gelato .summary-continue-btn {\n      width: 100%;\n      min-height: 46px;\n      padding: 10px 16px !important;\n      border-radius: 12px !important;\n      font-size: 15px;\n    }<\/p>\n<p>    #gelato .anchor-gusti,\n    #gelato .form-section {\n      scroll-margin-top: 90px;\n    }<\/p>\n<p>    @supports selector(#gelato:has(input:focus)) {\n      #gelato:has(.vaschetta-field input:focus) .summary-bar,\n      #gelato:has(.vaschetta-field textarea:focus) .summary-bar {\n        transform: translateY(110%);\n        opacity: 0;\n        pointer-events: none;\n      }\n    }\n  }<\/p>\n<p>  @media (max-width: 379px) {\n    body.page-id-1409 .sections_group .mcb-section .section_wrapper {\n      padding-right: 6px !important;\n      padding-left: 6px !important;\n    }<\/p>\n<p>    #gelato {\n      padding-right: 10px !important;\n      padding-left: 10px !important;\n    }<\/p>\n<p>    #gelato .tub-price {\n      flex-wrap: wrap;\n      justify-content: center;\n      border-radius: 16px;\n    }<\/p>\n<p>    #gelato .varianti .ui-card-image {\n      height: 235px !important;\n    }\n  }<\/p>\n<p>  @media (hover: none) {\n    #gelato .ui-card:hover {\n      transform: none;\n    }\n  }<\/p>\n<p>  @media (prefers-reduced-motion: reduce) {\n    #gelato *,\n    #gelato *::before,\n    #gelato *::after {\n      scroll-behavior: auto !important;\n      transition-duration: 0.01ms !important;\n      animation-duration: 0.01ms !important;\n      animation-iteration-count: 1 !important;\n    }\n  }\n<\/style>\n<p><script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.7.16\/dist\/vue.min.js\"><\/script><br \/>\n<script>\n(function () {\n  'use strict';<\/p>\n<p>  var apiURL =\n    'https:\/\/www.gelaterialeccapaletta.it\/wp-json\/asnp-easy-product-bundles\/v1\/filter-products' +\n    '?filter=products&product=89&index=2&page=1&_locale=user';<\/p>\n<p>  var numeroGelateria = '393761832920';<\/p>\n<p>  function avviaConfiguratore() {\n    if (window.minigelato || !document.getElementById('appgelato')) return;<\/p>\n<p>    if (typeof window.Vue === 'undefined') {\n      window.setTimeout(avviaConfiguratore, 100);\n      return;\n    }<\/p>\n<p>    window.minigelato = new window.Vue({\n      el: '#appgelato',<\/p>\n<p>      data: {\n        products: [],\n        loading: true,\n        errore: '',\n        messaggio: '',\n        product_id: 89,\n        gusti_index: 2,\n        qta_tot: 0,\n        max_gusti: 0,\n        form: {\n          nome: '',\n          telefono: '',\n          email: '',\n          note: ''\n        },\n        varianti: [\n          {\n            id: 1,\n            nomeBreve: '2\/3 persone',\n            descrizione: '2 gusti\/flavors (~ 1\/2 Kg)',\n            maxGusti: 2,\n            image:\n              'https:\/\/www.gelaterialeccapaletta.it\/wp-content\/uploads\/2026\/08\/vaschetta-gelato-3-persone.png',\n            isattivo: false\n          },\n          {\n            id: 2,\n            nomeBreve: '3\/4 persone',\n            descrizione: '3 gusti\/flavors (~ 750 gr)',\n            maxGusti: 3,\n            image:\n              'https:\/\/www.gelaterialeccapaletta.it\/wp-content\/uploads\/2026\/08\/vaschetta-gelato-4-persone.png',\n            isattivo: false\n          },\n          {\n            id: 3,\n            nomeBreve: '5\/6 persone',\n            descrizione: '4 gusti\/flavors (~ 1 Kg)',\n            maxGusti: 4,\n            image:\n              'https:\/\/www.gelaterialeccapaletta.it\/wp-content\/uploads\/2026\/08\/vaschetta-gelato-6-persone.png',\n            isattivo: false\n          },\n          {\n            id: 4,\n            nomeBreve: '7\/8 persone',\n            descrizione: '6 gusti\/flavors (~ 1,5 Kg)',\n            maxGusti: 6,\n            image:\n              'https:\/\/www.gelaterialeccapaletta.it\/wp-content\/uploads\/2026\/08\/vaschetta-gelato-8-persone.png',\n            isattivo: false\n          }\n        ]\n      },<\/p>\n<p>      computed: {\n        varianteAttiva: function () {\n          for (var i = 0; i < this.varianti.length; i += 1) {\n            if (this.varianti[i].isattivo) return this.varianti[i];\n          }\n          return null;\n        },\n\n        gustiAttivi: function () {\n          return this.products.filter(function (prodotto) {\n            return Number(prodotto.q || 0) > 0;\n          });\n        },<\/p>\n<p>        canSubmit: function () {\n          return Boolean(\n            this.varianteAttiva &&\n              Number(this.qta_tot || 0) > 0 &&\n              this.form.nome &&\n              this.form.telefono\n          );\n        }\n      },<\/p>\n<p>      created: function () {\n        this.fetchData();\n      },<\/p>\n<p>      methods: {\n        testoPulito: function (testo) {\n          var contenitore = document.createElement('div');\n          contenitore.innerHTML = String(testo || '');\n          return (contenitore.textContent || contenitore.innerText || '')\n            .replace(\/\\s+\/g, ' ')\n            .trim();\n        },<\/p>\n<p>        pulisciNomePerOrdinamento: function (nome) {\n          return this.testoPulito(nome).toLocaleLowerCase('it');\n        },<\/p>\n<p>        fetchData: function () {\n          var self = this;\n          var xhr = new XMLHttpRequest();<\/p>\n<p>          self.loading = true;\n          self.errore = '';<\/p>\n<p>          xhr.open('GET', apiURL, true);<\/p>\n<p>          xhr.onload = function () {\n            self.loading = false;<\/p>\n<p>            if (xhr.status < 200 || xhr.status >= 300) {\n              self.products = [];\n              self.errore = 'Errore nel caricamento dei gusti disponibili.';\n              return;\n            }<\/p>\n<p>            try {\n              var risposta = JSON.parse(xhr.responseText);<\/p>\n<p>              if (!risposta || !Array.isArray(risposta.products)) {\n                self.products = [];\n                self.errore =\n                  'La risposta del plugin non contiene il campo products.';\n                return;\n              }<\/p>\n<p>              self.products = risposta.products\n                .map(function (elemento) {\n                  return {\n                    id: elemento.id || '',\n                    name: elemento.name || '',\n                    description: elemento.description || 'Gusto disponibile',\n                    image:\n                      elemento.image ||\n                      'https:\/\/via.placeholder.com\/800x600?text=Gusto',\n                    q: 0,\n                    isattivo: false\n                  };\n                })\n                .sort(function (a, b) {\n                  return self\n                    .pulisciNomePerOrdinamento(a.name)\n                    .localeCompare(\n                      self.pulisciNomePerOrdinamento(b.name),\n                      'it'\n                    );\n                });\n            } catch (errore) {\n              window.console.error(errore);\n              self.products = [];\n              self.errore = 'Errore nella lettura dei gusti disponibili.';\n            }\n          };<\/p>\n<p>          xhr.onerror = function () {\n            self.loading = false;\n            self.products = [];\n            self.errore = 'Errore di connessione durante il caricamento.';\n          };<\/p>\n<p>          xhr.send();\n        },<\/p>\n<p>        settaVarianteAttiva: function (id) {\n          this.messaggio = '';<\/p>\n<p>          for (var i = 0; i < this.varianti.length; i += 1) {\n            var attiva = this.varianti[i].id === id;\n            this.varianti[i].isattivo = attiva;\n            if (attiva) this.max_gusti = this.varianti[i].maxGusti;\n          }\n\n          this.azzeraGusti();\n          this.salvaRiepilogoTemporaneo();\n\n          this.$nextTick(function () {\n            var ancora = document.getElementById('inizio-gusti');\n            if (ancora) {\n              ancora.scrollIntoView({ behavior: 'smooth', block: 'start' });\n            }\n          });\n        },\n\n        settaQtaprodottoAttivo: function (prodotto, delta) {\n          if (!this.varianteAttiva) {\n            window.alert('Prima scegli la vaschetta.');\n            return;\n          }\n\n          this.messaggio = '';\n\n          if (delta > 0) {\n            if (this.qta_tot >= this.max_gusti) {\n              window.alert('Limite massimo dei gusti raggiunto!');\n              return;\n            }<\/p>\n<p>            prodotto.q = Number(prodotto.q || 0) + 1;\n            this.qta_tot += 1;\n          } else if (delta < 0) {\n            if (Number(prodotto.q || 0) <= 0) return;\n\n            prodotto.q = Number(prodotto.q || 0) - 1;\n            this.qta_tot -= 1;\n          }\n\n          prodotto.isattivo = Number(prodotto.q || 0) > 0;\n          this.salvaRiepilogoTemporaneo();\n        },<\/p>\n<p>        azzeraGusti: function () {\n          for (var i = 0; i < this.products.length; i += 1) {\n            this.products[i].q = 0;\n            this.products[i].isattivo = false;\n          }\n          this.qta_tot = 0;\n        },\n\n        costruisciPayloadPrenotazione: function () {\n          var self = this;\n          var gusti = this.gustiAttivi.map(function (prodotto) {\n            return {\n              id: prodotto.id || '',\n              nome: self.testoPulito(prodotto.name),\n              qta: Number(prodotto.q || 0)\n            };\n          });\n\n          return {\n            variante: this.varianteAttiva\n              ? this.varianteAttiva.nomeBreve\n              : '',\n            descrizioneVariante: this.varianteAttiva\n              ? this.varianteAttiva.descrizione\n              : '',\n            max_gusti: Number(this.max_gusti || 0),\n            totale_gusti: Number(this.qta_tot || 0),\n            gusti: gusti,\n            gusti_testo: gusti\n              .map(function (gusto) {\n                return gusto.nome + ' x' + gusto.qta;\n              })\n              .join(', ')\n          };\n        },\n\n        aggiornaCampiNascosti: function (payload) {\n          var valori = {\n            vaschetta_json: JSON.stringify(payload),\n            vaschetta_variante: payload.variante || '',\n            vaschetta_descrizione: payload.descrizioneVariante || '',\n            vaschetta_qta_gusti: payload.totale_gusti || 0,\n            vaschetta_gusti: payload.gusti_testo || ''\n          };\n\n          Object.keys(valori).forEach(function (id) {\n            var campo = document.getElementById(id);\n            if (campo) campo.value = valori[id];\n          });\n        },\n\n        salvaRiepilogoTemporaneo: function () {\n          try {\n            var payload = this.costruisciPayloadPrenotazione();\n            var payloadJSON = JSON.stringify(payload);\n\n            window.sessionStorage.setItem(\n              'vaschettaPrenotazione',\n              payloadJSON\n            );\n            window.localStorage.setItem('vaschettaPrenotazione', payloadJSON);\n            this.aggiornaCampiNascosti(payload);\n          } catch (errore) {\n            window.console.error(\n              'Errore salvataggio riepilogo temporaneo:',\n              errore\n            );\n          }\n        },\n\n        vaiAlForm: function () {\n          var form = document.getElementById('form-prenotazione');\n          if (form) form.scrollIntoView({ behavior: 'smooth', block: 'start' });\n        },\n\n        apriWhatsAppDiretto: function () {\n          if (!this.form.nome) {\n            window.alert('Inserisci nome e cognome.');\n            document.getElementById('nome-cognome').focus();\n            return;\n          }\n\n          if (!this.form.telefono) {\n            window.alert('Inserisci il numero di telefono.');\n            document.getElementById('telefono').focus();\n            return;\n          }\n\n          if (!this.varianteAttiva) {\n            window.alert('Prima scegli la vaschetta.');\n            return;\n          }\n\n          if (Number(this.qta_tot || 0) <= 0) {\n            window.alert('Seleziona almeno un gusto.');\n            return;\n          }\n\n          var payload = this.costruisciPayloadPrenotazione();\n          this.aggiornaCampiNascosti(payload);\n\n          var listaGusti = payload.gusti\n            .map(function (gusto) {\n              return '- ' + gusto.nome + ' x' + gusto.qta;\n            })\n            .join('\\n');\n\n          var messaggio =\n            'Nuova prenotazione vaschetta\\n\\n' +\n            'Nome: ' +\n            this.form.nome +\n            '\\n' +\n            'Telefono: ' +\n            this.form.telefono +\n            '\\n' +\n            'Email: ' +\n            (this.form.email || 'non indicata') +\n            '\\n\\n' +\n            'Vaschetta: ' +\n            payload.variante +\n            '\\n' +\n            'Descrizione: ' +\n            payload.descrizioneVariante +\n            '\\n' +\n            'Gusti selezionati: ' +\n            payload.totale_gusti +\n            '\/' +\n            payload.max_gusti +\n            '\\n\\n' +\n            'Elenco gusti:\\n' +\n            listaGusti +\n            '\\n\\n' +\n            'Note: ' +\n            (this.form.note || 'nessuna');\n\n          window.location.href =\n            'https:\/\/wa.me\/' +\n            numeroGelateria +\n            '?text=' +\n            window.encodeURIComponent(messaggio);\n        },\n\n        resettaOrdine: function () {\n          this.messaggio = '';\n          this.max_gusti = 0;\n\n          for (var i = 0; i < this.varianti.length; i += 1) {\n            this.varianti[i].isattivo = false;\n          }\n\n          this.azzeraGusti();\n\n          try {\n            window.sessionStorage.removeItem('vaschettaPrenotazione');\n            window.localStorage.removeItem('vaschettaPrenotazione');\n          } catch (errore) {\n            window.console.error('Errore durante il reset:', errore);\n          }\n\n          this.aggiornaCampiNascosti({\n            variante: '',\n            descrizioneVariante: '',\n            totale_gusti: 0,\n            gusti_testo: '',\n            gusti: []\n          });\n        },\n\n        ricarica: function () {\n          this.resettaOrdine();\n          window.scrollTo({ top: 0, behavior: 'smooth' });\n        }\n      },\n\n      watch: {\n        qta_tot: function () {\n          this.salvaRiepilogoTemporaneo();\n        },\n\n        max_gusti: function () {\n          this.salvaRiepilogoTemporaneo();\n        }\n      }\n    });\n  }\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', avviaConfiguratore);\n  } else {\n    avviaConfiguratore();\n  }\n})();\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>IL TUO GELATO ARTIGIANALE Scegli la vaschetta, componi i gusti disponibili di oggi e inviaci la tua richiesta in modo semplice e veloce. 1 Scegli la<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":-1,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1409","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/pages\/1409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/comments?post=1409"}],"version-history":[{"count":53,"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/pages\/1409\/revisions"}],"predecessor-version":[{"id":2040,"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/pages\/1409\/revisions\/2040"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.gelaterialeccapaletta.it\/en\/wp-json\/wp\/v2\/media?parent=1409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}