{"id":7882,"date":"2024-01-17T03:41:09","date_gmt":"2024-01-17T02:41:09","guid":{"rendered":"https:\/\/animals-cocoon.ch\/commander\/"},"modified":"2024-03-04T06:31:53","modified_gmt":"2024-03-04T05:31:53","slug":"commander","status":"publish","type":"page","link":"https:\/\/animals-cocoon.ch\/en\/commander\/","title":{"rendered":"Order validation"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"7882\" class=\"elementor elementor-7882\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-959758c e-flex e-con-boxed e-con e-parent\" data-id=\"959758c\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-bf39cd2 elementor-widget elementor-widget-heading\" data-id=\"bf39cd2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Order validation<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-5437c9ef jedv-enabled--yes e-flex e-con-boxed e-con e-parent\" data-id=\"5437c9ef\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ffe3224 e-checkout-layout-two-column elementor-widget elementor-widget-woocommerce-checkout-page\" data-id=\"ffe3224\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"woocommerce-checkout-page.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"woocommerce\"><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c397ff1 elementor-widget elementor-widget-html\" data-id=\"c397ff1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<script>\r\n        (function( $ ) {\r\n        'use strict';\r\n        \t \tfunction appel_autocompl( id_searchbacr, localite, codePostal, commune, canton, rret = 'localite' ) {\r\n\t \t\tvar searchData =  [];\r\n\t    \t$.getJSON(\"\/wp-content\/themes\/hello-theme-child-master\/localite_suisse.json\", function(jsonData) {\r\n\r\n\t    \t\tsearchData  = jsonData;\r\n\r\n\t\t    \t$(id_searchbacr).autocomplete({\r\n\t\t      \t\tsource: function(request, response) {\r\n\t\t        \t\tvar term = request.term.toLowerCase();\r\n\t\t        \t\tvar filteredData = searchData .filter(function(item) {\r\n\t\t\t          \t\tvar localite = item.Localite.toLowerCase();\r\n\t\t\t          \t\tvar codePostal = item.CodePostal.toString();\r\n\t\t\t          \t\tvar commune = item.Commune.toLowerCase();\r\n\t\t\t          \t\tvar cantonNom = item.CantonNom.toLowerCase();\r\n\r\n\t\t\t          \t\t\/\/ Filtrer les donn\u00e9es en fonction du terme de recherche\r\n\t\t\t          \t\treturn localite.includes(term) || codePostal.includes(term) || commune.includes(term) || cantonNom.includes(term);\r\n\t\t\t        \t});\r\n\r\n\t\t\t\t        var suggestions = filteredData.map(function(item) {\r\n\t\t\t        \t\tif ( rret == 'localite' ) {\r\n\t\t\t        \t\t\treturn {\r\n\t\t\t\t            \t\tvalue\t\t: item.Localite,\r\n\t\t\t\t            \t\tlabel\t\t: item.Localite + ', ' + item.CodePostal + ', ' + item.Commune + ', ' + item.CantonNom,\r\n\t\t\t\t            \t\tcodePostal \t: item.CodePostal,\r\n\t\t\t\t            \t\tlongitude \t: item.Longitude,\r\n\t\t\t\t            \t\tlatitude \t: item.Latitude,\r\n\t\t\t\t            \t\tlocalite \t: item.Localite,\r\n\t\t\t\t            \t\tcommune \t: item.Commune,\r\n\t\t\t\t            \t\tcanton \t\t: item.CantonNom,\r\n\t\t\t\t            \t\tcantoncode\t: item.Canton,\r\n\t\t\t\t            \t}\r\n\t\t\t            \t}\r\n\t\t\t        \t\tif ( rret == 'codePostal' ) {\r\n\t\t\t        \t\t\treturn {\r\n\t\t\t\t            \t\tvalue\t\t: item.CodePostal,\r\n\t\t\t\t            \t\tlabel\t\t: item.Localite + ', ' + item.CodePostal + ', ' + item.Commune + ', ' + item.CantonNom,\r\n\t\t\t\t            \t\tcodePostal \t: item.CodePostal,\r\n\t\t\t\t            \t\tlongitude \t: item.Longitude,\r\n\t\t\t\t            \t\tlatitude \t: item.Latitude,\r\n\t\t\t\t            \t\tlocalite \t: item.Localite,\r\n\t\t\t\t            \t\tcommune \t: item.Commune,\r\n\t\t\t\t            \t\tcanton \t\t: item.CantonNom,\r\n\t\t\t\t            \t\tcantoncode\t: item.Canton,\r\n\t\t\t\t            \t}\r\n\t\t\t            \t}\r\n\t\t\t        \t\tif ( rret == 'commune' ) {\r\n\t\t\t        \t\t\treturn {\r\n\t\t\t\t            \t\tvalue\t\t: item.Commune,\r\n\t\t\t\t            \t\tlabel\t\t: item.Localite + ', ' + item.CodePostal + ', ' + item.Commune + ', ' + item.CantonNom,\r\n\t\t\t\t            \t\tcodePostal \t: item.CodePostal,\r\n\t\t\t\t            \t\tlongitude \t: item.Longitude,\r\n\t\t\t\t            \t\tlatitude \t: item.Latitude,\r\n\t\t\t\t            \t\tlocalite \t: item.Localite,\r\n\t\t\t\t            \t\tcommune \t: item.Commune,\r\n\t\t\t\t            \t\tcanton \t\t: item.CantonNom,\r\n\t\t\t\t            \t\tcantoncode\t: item.Canton,\r\n\t\t\t\t            \t}\r\n\t\t\t            \t}\r\n\t\t\t        \t\tif ( rret == 'canton' ) {\r\n\t\t\t        \t\t\treturn {\r\n\t\t\t\t            \t\tvalue\t\t: item.CantonNom,\r\n\t\t\t\t            \t\tlabel\t\t: iitem.Localite + ', ' + item.CodePostal + ', ' + item.Commune + ', ' + item.CantonNom,\r\n\t\t\t\t            \t\tcodePostal \t: item.CodePostal,\r\n\t\t\t\t            \t\tlongitude \t: item.Longitude,\r\n\t\t\t\t            \t\tlatitude \t: item.Latitude,\r\n\t\t\t\t            \t\tlocalite \t: item.Localite,\r\n\t\t\t\t            \t\tcommune \t: item.Commune,\r\n\t\t\t\t            \t\tcanton \t\t: item.CantonNom,\r\n\t\t\t\t            \t\tcantoncode\t: item.Canton,\r\n\t\t\t\t            \t}\r\n\t\t\t            \t}\r\n\t\t\t\t        });\r\n\r\n\t\t\t\t        response(suggestions);\r\n\t\t\t      \t},\r\n\t\t\t      \tselect: function(event, ui) {\r\n\t\t\t        \tvar selectedCodePostal = ui.item.codePostal;\r\n\t\t\t        \tconsole.log('Code Postal s\u00e9lectionn\u00e9 : ' + selectedCodePostal);\r\n\r\n\t\t\t        \tvar selectedLongitude = ui.item.longitude;\r\n\t\t\t        \tvar selectedLatitude = ui.item.latitude;\r\n\t\t\t        \t$(localite).val(ui.item.localite);\r\n\t\t\t        \t$(codePostal).val(ui.item.codePostal);\r\n\t\t\t        \t$(commune).val(ui.item.commune);\r\n\t\t\t        \t$(canton).val(ui.item.cantoncode).trigger('change');;\r\n\t\t\t        \t\r\n\t\t\t      \t},\r\n\t\t\t      \tminLength: 2,\r\n\t\t\t      \tclasses: {\r\n\t\t\t\t\t    \"ui-autocomplete\": \"completion_more unhausse_zindex\"\r\n\t\t\t\t\t}\r\n\t\t\t    });\r\n\r\n\t\t\t});\r\n\t \t}\r\n        $(function() {\r\n            \r\n            appel_autocompl( '#billing_city', '#billing_city', '#billing_postcode', '#billing_commune', '#billing_state', 'localite' );\r\n            appel_autocompl( '#billing_postcode', '#billing_city', '#billing_postcode', '#billing_commune', '#billing_state', 'codePostal' );\r\n            \r\n        });\r\n    })( jQuery );\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Validation de la commande Votre compte gestionnaire ne peut pas \u00eatre associ\u00e9 \u00e0 un compte professionnel. Merci de choisir un autre compte ou de cr\u00e9er un nouveau. D\u00e9tails de facturation Pr\u00e9nom&nbsp;* Nom&nbsp;* Nom de l\u2019entreprise&nbsp;(facultatif) Pays\/r\u00e9gion&nbsp;*S\u00e9lectionner un pays\/r\u00e9gion\u2026AfghanistanAfrique du Sud\u00c5land IslandsAlbanieAlg\u00e9rieAllemagneAmerican SamoaAndorreAngolaAnguillaAntarctiqueAntigua-et-BarbudaArabie SaouditeArgentineArm\u00e9nieArubaAustralieAutricheAzerbaijanBahamasBahrainBangladeshBarbadesBelauBelgiqueBelizeBeninBermudesBhutanBi\u00e9lorussieBolivieBosnie-Herz\u00e9govineBotswanaBr\u00e9silBruneiBulgarieBurkina FasoBurundiCambodgeCamerounCanadaCap VertChiliChineChristmas IslandChypreColombieComoresCongo (Brazzaville)Congo (Kinshasa)Cor\u00e9e du NordCor\u00e9e du SudCosta RicaC\u00f4te-d\u2019IvoireCroatieCubaCura\u00e7aoDanemarkDjiboutiDominique\u00c9gypte\u00c9mirats Arabes Unis\u00c9quateurErythr\u00e9eEspagneEstonieEswatiniEtats-Unis [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"pmpro_default_level":"","footnotes":""},"class_list":["post-7882","page","type-page","status-publish","hentry","pmpro-has-access"],"_links":{"self":[{"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/pages\/7882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/comments?post=7882"}],"version-history":[{"count":34,"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/pages\/7882\/revisions"}],"predecessor-version":[{"id":8950,"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/pages\/7882\/revisions\/8950"}],"wp:attachment":[{"href":"https:\/\/animals-cocoon.ch\/en\/wp-json\/wp\/v2\/media?parent=7882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}