{"id":54,"date":"2025-08-26T14:35:09","date_gmt":"2025-08-26T14:35:09","guid":{"rendered":"https:\/\/trivio.creamtest.it\/carrello\/"},"modified":"2025-09-29T20:50:41","modified_gmt":"2025-09-29T20:50:41","slug":"carrello","status":"publish","type":"page","link":"https:\/\/trivio.creamtest.it\/en\/carrello\/","title":{"rendered":"Carrello"},"content":{"rendered":"<div class=\"wp-block-group alignwide padded-content bwa-border-radius shadowed has-white-background-color has-background\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">    <div id=\"free-shipping-progress-wrapper\" class=\"\">\n        <p id=\"free-shipping-progress\">...<\/p>\n        <span class=\"free-shipping-icon\"><\/span>\n        <div id=\"free-shipping-bar-container\">\n            <div id=\"free-shipping-bar\" style=\"width: 0%;\"><\/div>\n        <\/div>\n    <\/div>\n    <script>\n    jQuery(document).ready(function($){\n        function formatCurrency(amount) {\n            return new Intl.NumberFormat('it-IT', {\n                style: 'currency',\n                currency: 'EUR',\n                minimumFractionDigits: 2\n            }).format(amount).replace('\u20ac', '');\n        }\n        \/\/ Effettua la richiesta AJAX per aggiornare la barra di progresso\n        function updateFreeShippingProgress(){\n            $.ajax({\n                url: 'https:\/\/trivio.creamtest.it\/wp-admin\/admin-ajax.php',\n                type: 'POST',\n                data: {\n                    action: 'get_fixed_free_shipping_completion',\n                    security: '42b758f328' \/\/ Aggiungi il nonce\n                },\n                success: function(response) {\n                    \/\/console.log(response.data);\n                    if (response.success) {\n                        var percentage = response.data.percentage;\n                        var min_amount = response.data.min_amount;\n                        var total_cart = response.data.total_cart;\n\n                        var diff = response.data.min_amount - response.data.total_cart;\n                        var label = (response.data.total_cart <= 0) ? 'Raggiungi 135\u20ac per la spedizione gratis' : 'Ti mancano <b>' + formatCurrency(diff) + '\u20ac<\/b> per la spedizione gratis';\n\n                        \/\/ Aggiorna la visualizzazione della percentuale\n                        if(percentage < 100){\n                            document.getElementById('free-shipping-progress').innerHTML = label;\n                            document.getElementById('free-shipping-progress-wrapper').classList.remove('reached');\n                        } else {\n                            document.getElementById('free-shipping-progress').innerHTML = '<b>Spedizione gratis ottenuta!<\/b>';\n                            document.getElementById('free-shipping-progress-wrapper').classList.add('reached');\n                        }\n\n                        \/\/ Aggiorna la barra di progresso\n                        document.getElementById('free-shipping-bar').style.width = percentage + '%';\n\n                    }\n                }\n            });\n        }\n        \n        \/\/ Intercetta l'evento quando il carrello viene aggiornato nei nuovi blocchi WooCommerce\n        $( document.body ).on('added_to_cart', function() {\n            updateFreeShippingProgress();\n        });\n\n        \/\/ Intercetta l'evento quando il carrello viene aggiornato nei nuovi blocchi WooCommerce\n        $( document.body ).on('removed_from_cart', function() {\n            updateFreeShippingProgress();\n        });\n        \n        $( document.body ).on('updated_cart_totals', function() {\n            updateFreeShippingProgress();\n        });\n        \/\/ Gestisce il caso quando il carrello diventa vuoto\n        $( document.body ).on('wc_cart_emptied', function() {\n            \/\/ Forza l'aggiornamento anche quando il carrello \u00e8 vuoto\n            updateFreeShippingProgress();\n        });\n\n        \/\/ Esegui il calcolo iniziale quando la pagina viene caricata\n        updateFreeShippingProgress();\n\n    });\n    <\/script>\n    \n\n\n\n<div style=\"height:2em\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart\" class=\"wp-block-woocommerce-cart alignwide is-loading\">\n<div data-block-name=\"woocommerce\/filled-cart-block\" class=\"wp-block-woocommerce-filled-cart-block\">\n<div data-block-name=\"woocommerce\/cart-items-block\" class=\"wp-block-woocommerce-cart-items-block\">\n<div data-block-name=\"woocommerce\/cart-line-items-block\" class=\"wp-block-woocommerce-cart-line-items-block\"><\/div>\n<\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-totals-block\" class=\"wp-block-woocommerce-cart-totals-block\">\n<div data-block-name=\"woocommerce\/cart-order-summary-block\" class=\"wp-block-woocommerce-cart-order-summary-block\">\n<div data-block-name=\"woocommerce\/cart-order-summary-heading-block\" data-content=\"Totale carrello\" class=\"wp-block-woocommerce-cart-order-summary-heading-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-order-summary-coupon-form-block\" class=\"wp-block-woocommerce-cart-order-summary-coupon-form-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-order-summary-totals-block\" class=\"wp-block-woocommerce-cart-order-summary-totals-block\">\n<div data-block-name=\"woocommerce\/cart-order-summary-subtotal-block\" class=\"wp-block-woocommerce-cart-order-summary-subtotal-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-order-summary-fee-block\" class=\"wp-block-woocommerce-cart-order-summary-fee-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-order-summary-discount-block\" class=\"wp-block-woocommerce-cart-order-summary-discount-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-order-summary-shipping-block\" class=\"wp-block-woocommerce-cart-order-summary-shipping-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-order-summary-taxes-block\" class=\"wp-block-woocommerce-cart-order-summary-taxes-block\"><\/div>\n<\/div>\n<\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-express-payment-block\" class=\"wp-block-woocommerce-cart-express-payment-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/proceed-to-checkout-block\" class=\"wp-block-woocommerce-proceed-to-checkout-block\"><\/div>\n\n\n\n<div data-block-name=\"woocommerce\/cart-accepted-payment-methods-block\" class=\"wp-block-woocommerce-cart-accepted-payment-methods-block\"><\/div>\n<\/div>\n<\/div>\n\n\n\n<div data-block-name=\"woocommerce\/empty-cart-block\" class=\"wp-block-woocommerce-empty-cart-block\">\n<h2 class=\"wp-block-heading has-text-align-center with-empty-cart-icon wc-block-cart__empty-cart__title\">Il tuo carrello \u00e8 attualmente vuoto!<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-dots\"\/>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\">Novit\u00e0 in negozio<\/h2>\n\n\n<div data-block-name=\"woocommerce\/product-new\" data-columns=\"4\" data-rows=\"1\" class=\"wc-block-grid wp-block-product-new wp-block-woocommerce-product-new wc-block-product-new has-4-columns\"><ul class=\"wc-block-grid__products\"><li class=\"wc-block-grid__product\">\n\t\t\t\t<a href=\"https:\/\/trivio.creamtest.it\/en\/product\/ogliarola-leccino-coratina\/\" class=\"wc-block-grid__product-link\">\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"wc-block-grid__product-image\"><img width=\"400\" height=\"558\" data-src=\"https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-BLEND-500ML-P-400x558.webp\" class=\"attachment-woocommerce_thumbnail size-woocommerce_thumbnail lazyload bwa-img\" alt=\"Ogliarola, Leccino, Coratina\" srcset=\"https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-BLEND-500ML-P-400x558.webp 400w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-BLEND-500ML-P-215x300.webp 215w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-BLEND-500ML-P-734x1024.webp 734w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-BLEND-500ML-P-768x1071.webp 768w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-BLEND-500ML-P-9x12.webp 9w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-BLEND-500ML-P.webp 900w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/div>\n\t\t\t\t\t<div class=\"wc-block-grid__product-title\">Ogliarola, Leccino, Coratina<\/div>\n\t\t\t\t<\/a>\n\t\t\t\t<div class=\"wc-block-grid__product-price price\"><span class=\"price bwa-var-price\"><small>A partire da<\/small> <span class=\"woocommerce-Price-amount amount\">14,00&nbsp;<span class=\"woocommerce-Price-currencySymbol\">&euro;<\/span><\/span><\/span><\/div>\n\t\t\t\t\n\t\t\t\t<div class=\"wp-block-button wc-block-grid__product-add-to-cart\"><a href=\"https:\/\/trivio.creamtest.it\/en\/product\/ogliarola-leccino-coratina\/\" aria-label=\"Select options for \u201cOgliarola, Leccino, Coratina\u201d\" data-quantity=\"1\" data-product_id=\"132\" data-product_sku=\"OGLIAROLA-LECCINO-CORATINA\" data-price=\"14\" rel=\"nofollow\" class=\"wp-block-button__link  add_to_cart_button\" data-no-translation-aria-label=\"\">Seleziona e acquista<\/a><\/div>\n\t\t\t<\/li><li class=\"wc-block-grid__product\">\n\t\t\t\t<a href=\"https:\/\/trivio.creamtest.it\/en\/product\/coratina\/\" class=\"wc-block-grid__product-link\">\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"wc-block-grid__product-image\"><img width=\"400\" height=\"558\" data-src=\"https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-CORATINA-500ML-P-400x558.webp\" class=\"attachment-woocommerce_thumbnail size-woocommerce_thumbnail lazyload bwa-img\" alt=\"Coratina\" srcset=\"https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-CORATINA-500ML-P-400x558.webp 400w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-CORATINA-500ML-P-215x300.webp 215w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-CORATINA-500ML-P-734x1024.webp 734w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-CORATINA-500ML-P-768x1071.webp 768w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-CORATINA-500ML-P-9x12.webp 9w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-CORATINA-500ML-P.webp 900w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/div>\n\t\t\t\t\t<div class=\"wc-block-grid__product-title\">Coratina<\/div>\n\t\t\t\t<\/a>\n\t\t\t\t<div class=\"wc-block-grid__product-price price\"><span class=\"price bwa-var-price\"><small>A partire da<\/small> <span class=\"woocommerce-Price-amount amount\">15,00&nbsp;<span class=\"woocommerce-Price-currencySymbol\">&euro;<\/span><\/span><\/span><\/div>\n\t\t\t\t\n\t\t\t\t<div class=\"wp-block-button wc-block-grid__product-add-to-cart\"><a href=\"https:\/\/trivio.creamtest.it\/en\/product\/coratina\/\" aria-label=\"Select options for \u201cCoratina\u201d\" data-quantity=\"1\" data-product_id=\"127\" data-product_sku=\"CORATINA\" data-price=\"15\" rel=\"nofollow\" class=\"wp-block-button__link  add_to_cart_button\" data-no-translation-aria-label=\"\">Seleziona e acquista<\/a><\/div>\n\t\t\t<\/li><li class=\"wc-block-grid__product\">\n\t\t\t\t<a href=\"https:\/\/trivio.creamtest.it\/en\/product\/ogliarola-del-bradano\/\" class=\"wc-block-grid__product-link\">\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"wc-block-grid__product-image\"><img width=\"400\" height=\"558\" data-src=\"https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-OGLIAROLA-500ML-P-400x558.webp\" class=\"attachment-woocommerce_thumbnail size-woocommerce_thumbnail lazyload bwa-img\" alt=\"Ogliarola del Bradano\" srcset=\"https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-OGLIAROLA-500ML-P-400x558.webp 400w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-OGLIAROLA-500ML-P-215x300.webp 215w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-OGLIAROLA-500ML-P-734x1024.webp 734w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-OGLIAROLA-500ML-P-768x1071.webp 768w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-OGLIAROLA-500ML-P-9x12.webp 9w, https:\/\/trivio.creamtest.it\/wp-content\/uploads\/2025\/08\/TRIVIO-OGLIAROLA-500ML-P.webp 900w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/div>\n\t\t\t\t\t<div class=\"wc-block-grid__product-title\">Ogliarola del Bradano<\/div>\n\t\t\t\t<\/a>\n\t\t\t\t<div class=\"wc-block-grid__product-price price\"><span class=\"price bwa-var-price\"><small>A partire da<\/small> <span class=\"woocommerce-Price-amount amount\">15,00&nbsp;<span class=\"woocommerce-Price-currencySymbol\">&euro;<\/span><\/span><\/span><\/div>\n\t\t\t\t\n\t\t\t\t<div class=\"wp-block-button wc-block-grid__product-add-to-cart\"><a href=\"https:\/\/trivio.creamtest.it\/en\/product\/ogliarola-del-bradano\/\" aria-label=\"Select options for \u201cOgliarola del Bradano\u201d\" data-quantity=\"1\" data-product_id=\"107\" data-product_sku=\"BRADANO\" data-price=\"15\" rel=\"nofollow\" class=\"wp-block-button__link  add_to_cart_button\" data-no-translation-aria-label=\"\">Seleziona e acquista<\/a><\/div>\n\t\t\t<\/li><\/ul><\/div><\/div>\n<\/div>\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-54","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/pages\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":6,"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/pages\/54\/revisions"}],"predecessor-version":[{"id":484,"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/pages\/54\/revisions\/484"}],"wp:attachment":[{"href":"https:\/\/trivio.creamtest.it\/en\/wp-json\/wp\/v2\/media?parent=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}