{"id":2,"date":"2016-05-10T03:48:21","date_gmt":"2016-05-10T03:48:21","guid":{"rendered":"https:\/\/www.mieloteca.com\/?page_id=2"},"modified":"2025-05-05T13:10:50","modified_gmt":"2025-05-05T13:10:50","slug":"sample-page","status":"publish","type":"page","link":"https:\/\/www.mieloteca.com\/?page_id=2","title":{"rendered":"Sample Page"},"content":{"rendered":"<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:<\/p>\n<blockquote><p>Hi there! I&#8217;m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi&#241;a coladas. (And gettin&#8217; caught in the rain.)<\/p><\/blockquote>\n<p>&#8230;or something like this:<\/p>\n<blockquote><p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.<\/p><\/blockquote>\n<p>As a new WordPress user, you should go to <a href=\"https:\/\/www.mieloteca.com\/wp-admin\/\">your dashboard<\/a> to delete this page and create new pages for your content. Have fun!<\/p>\n\n\n<div class=\"lb-smoobu-booking-widget-container\" data-property-id=\"2057101\" data-locale=\"en\" data-theme=\"default\">\n    \n    <div class=\"lb-smoobu-error-message\" style=\"display: none;\"><\/div>\n    \n    <div class=\"lb-smoobu-loading\">Caricamento...<\/div>\n    \n    <!-- Step 1: Date selection -->\n    <div class=\"lb-smoobu-step lb-smoobu-step-dates\">\n        <h3>Seleziona le date<\/h3>\n        \n        <div class=\"lb-smoobu-date-picker\">\n            <div class=\"lb-smoobu-form-group\">\n                <label for=\"lb-smoobu-check-in\">Check-in<\/label>\n                <input type=\"text\" id=\"lb-smoobu-check-in\" class=\"lb-smoobu-check-in\" readonly>\n            <\/div>\n            \n            <div class=\"lb-smoobu-form-group\">\n                <label for=\"lb-smoobu-check-out\">Check-out<\/label>\n                <input type=\"text\" id=\"lb-smoobu-check-out\" class=\"lb-smoobu-check-out\" readonly>\n            <\/div>\n        <\/div>\n        \n        <div class=\"lb-smoobu-availability-message\" style=\"display: none;\"><\/div>\n    <\/div>\n    \n    <!-- Step 2: Guest selection -->\n    <div class=\"lb-smoobu-step lb-smoobu-step-guests\" style=\"display: none;\">\n        <h3>Numero di ospiti<\/h3>\n        \n        <div class=\"lb-smoobu-guest-selector\">\n            <div class=\"lb-smoobu-guest-control\">\n                <button type=\"button\" class=\"lb-smoobu-guest-minus\">-<\/button>\n                <span class=\"lb-smoobu-guest-count\">1<\/span>\n                <button type=\"button\" class=\"lb-smoobu-guest-plus\">+<\/button>\n            <\/div>\n            <div class=\"lb-smoobu-guest-info\">\n                Massimo 10 ospiti            <\/div>\n        <\/div>\n    <\/div>\n    \n    <!-- Step 3: Extra options -->\n    <div class=\"lb-smoobu-step lb-smoobu-step-extras\" style=\"display: none;\">\n        <h3>Opzioni aggiuntive<\/h3>\n        \n        <div class=\"lb-smoobu-extras\">\n                                                <div class=\"lb-smoobu-extra-item\">\n                        <input type=\"checkbox\" \n                               id=\"lb-smoobu-extra-225188\" \n                               class=\"lb-smoobu-extra-checkbox\" \n                               data-extra-id=\"225188\" \n                               data-price=\"40\"\n                               >\n                        <label for=\"lb-smoobu-extra-225188\">\n                            Pets                            <span class=\"lb-smoobu-extra-price\">\n                                (40.00 EUR                                )\n                            <\/span>\n                        <\/label>\n                    <\/div>\n                                    <\/div>\n    <\/div>\n    \n    <!-- Step 4: Payment and guest information -->\n    <div class=\"lb-smoobu-step lb-smoobu-step-payment\" style=\"display: none;\">\n        <h3>Informazioni ospite<\/h3>\n        \n        <form class=\"lb-smoobu-booking-form\">\n            <input type=\"hidden\" name=\"property_id\" value=\"2057101\">\n            \n            <div class=\"lb-smoobu-form-group\">\n                <label for=\"lb-smoobu-first-name\">Nome <span class=\"lb-smoobu-required\">*<\/span><\/label>\n                <input type=\"text\" id=\"lb-smoobu-first-name\" name=\"firstName\" required>\n            <\/div>\n            \n            <div class=\"lb-smoobu-form-group\">\n                <label for=\"lb-smoobu-last-name\">Cognome <span class=\"lb-smoobu-required\">*<\/span><\/label>\n                <input type=\"text\" id=\"lb-smoobu-last-name\" name=\"lastName\" required>\n            <\/div>\n            \n            <div class=\"lb-smoobu-form-group\">\n                <label for=\"lb-smoobu-email\">Email <span class=\"lb-smoobu-required\">*<\/span><\/label>\n                <input type=\"email\" id=\"lb-smoobu-email\" name=\"email\" required>\n            <\/div>\n            \n            <div class=\"lb-smoobu-form-group\">\n                <label for=\"lb-smoobu-phone\">Telefono <span class=\"lb-smoobu-required\">*<\/span><\/label>\n                <input type=\"tel\" id=\"lb-smoobu-phone\" name=\"phone\" required>\n            <\/div>\n            \n            <div class=\"lb-smoobu-form-group\">\n                <label for=\"lb-smoobu-notes\">Note<\/label>\n                <textarea id=\"lb-smoobu-notes\" name=\"notes\"><\/textarea>\n            <\/div>\n            \n                            <div class=\"lb-smoobu-payment-section\">\n                    <h4>Riepilogo prenotazione<\/h4>\n                    \n                    <div class=\"lb-smoobu-price\">\n                        <strong>Totale:<\/strong>\n                        <span class=\"lb-smoobu-price-amount\">0.00 EUR<\/span>\n                    <\/div>\n                    \n                    <div class=\"lb-smoobu-submit-container\">\n                        <button type=\"submit\" class=\"lb-smoobu-submit-booking\">\n                            Procedi al pagamento                        <\/button>\n                    <\/div>\n                <\/div>\n                    <\/form>\n    <\/div>\n    \n    <!-- Navigation buttons -->\n    <div class=\"lb-smoobu-step-buttons\">\n        <button type=\"button\" class=\"lb-smoobu-prev-step\" style=\"display: none;\">\n            Indietro        <\/button>\n        <button type=\"button\" class=\"lb-smoobu-next-step\">\n            Avanti        <\/button>\n    <\/div>\n    <script>\n        jQuery(document).ready(function($) {\n            \/\/ ID propriet\u00e0 - doppia verifica dei valori e debug\n            var containerPropertyId = $('.lb-smoobu-booking-widget-container').data('property-id') || 0;\n            var hiddenFieldPropertyId = $('.lb-smoobu-booking-form input[name=\"property_id\"]').val() || 0;\n            var phpPropertyId = 2057101;\n            \n            \/\/ Usa il valore effettivo PHP come fonte principale\n            var propertyId = phpPropertyId;\n            \n            \/\/ Log esteso per debug\n            console.log(\"Debug ID propriet\u00e0 Smoobu:\");\n            console.log(\"- ID da PHP: \" + phpPropertyId);\n            console.log(\"- ID da contenitore: \" + containerPropertyId);\n            console.log(\"- ID da campo nascosto: \" + hiddenFieldPropertyId);\n            \n            \/\/ Usa il valore pi\u00f9 alto disponibile se quello PHP \u00e8 0\n            if (propertyId <= 0) {\n                if (containerPropertyId > 0) {\n                    propertyId = containerPropertyId;\n                    console.log(\"Usando ID da contenitore invece di PHP\");\n                } else if (hiddenFieldPropertyId > 0) {\n                    propertyId = hiddenFieldPropertyId;\n                    console.log(\"Usando ID da campo nascosto invece di PHP\");\n                }\n            }\n            \n            \/\/ Ultima risorsa: Cerca nell'URL \n            if (propertyId <= 0) {\n                var urlParams = new URLSearchParams(window.location.search);\n                var urlPropertyId = parseInt(urlParams.get('property_id'), 10) || 0;\n                if (urlPropertyId > 0) {\n                    propertyId = urlPropertyId;\n                    console.log(\"Usando ID dalla URL: \" + propertyId);\n                }\n            }\n\n            \/\/ Verifica che l'ID sia valido\n            if (isNaN(propertyId) || propertyId <= 0) {\n                console.error('ID propriet\u00e0 Smoobu non valido: ' + propertyId);\n                $('.lb-smoobu-error-message').html('ID propriet\u00e0 non valido. Contattare l\\'amministratore.').show();\n                return;\n            }\n\n            \/\/ Aggiorna tutti i form per includere l'ID propriet\u00e0 come campo nascosto\n            $('.lb-smoobu-booking-widget-container form').each(function() {\n                if ($(this).find('input[name=\"property_id\"]').length === 0) {\n                    $(this).append('<input type=\"hidden\" name=\"property_id\" value=\"' + propertyId + '\">');\n                } else {\n                    $(this).find('input[name=\"property_id\"]').val(propertyId);\n                }\n            });\n            \n            \/\/ Aggiorna l'attributo data-property-id del contenitore\n            $('.lb-smoobu-booking-widget-container').attr('data-property-id', propertyId);\n            \n            \/\/ Aggiorno l'oggetto lb_smoobu_params.property_id se disponibile\n            if (typeof lb_smoobu_params !== 'undefined') {\n                lb_smoobu_params.property_id = propertyId;\n                console.log(\"Aggiornato lb_smoobu_params.property_id = \" + propertyId);\n            }\n        });\n    <\/script>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I&#8217;m a bike messenger [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2"}],"version-history":[{"count":1,"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":7,"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=\/wp\/v2\/pages\/2\/revisions\/7"}],"wp:attachment":[{"href":"https:\/\/www.mieloteca.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}