{"id":435,"date":"2025-03-15T15:49:35","date_gmt":"2025-03-15T14:49:35","guid":{"rendered":"https:\/\/www.otha.fr\/my-account\/"},"modified":"2025-12-05T12:04:02","modified_gmt":"2025-12-05T11:04:02","slug":"mon-compte","status":"publish","type":"page","link":"https:\/\/www.otha.fr\/en\/mon-compte\/","title":{"rendered":"Mon compte"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"435\" class=\"elementor elementor-435\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-6cd9dfc e-con-full hero-moncompte e-flex e-con e-parent\" data-id=\"6cd9dfc\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b2d97d elementor-widget elementor-widget-heading\" data-id=\"b2d97d\" 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<h2 class=\"elementor-heading-title elementor-size-default\">Mon compte<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-24f225a e-con-full otha-myaccount e-flex e-con e-parent\" data-id=\"24f225a\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-6be9dfc e-con-full e-flex e-con e-child\" data-id=\"6be9dfc\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ef6bac5 elementor-widget elementor-widget-html\" data-id=\"ef6bac5\" 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<div class=\"otha-sidebar\">\n  <h2 class=\"welcome\">Bienvenue, <strong><\/strong>.<\/h2>\n\n  <nav class=\"otha-menu\" data-base=\"\/mon-compte\">\n\n    <a href=\"\/mon-compte\/\" data-endpoint=\"dashboard\">\n      <i class=\"fa-solid fa-desktop\"><\/i><span>Tableau de bord<\/span>\n    <\/a>\n\n    <a href=\"\/mon-compte\/edit-account\/\" data-endpoint=\"edit-account\">\n      <i class=\"fa-solid fa-user\"><\/i><span>Profil<\/span>\n    <\/a>\n\n    <a href=\"\/mon-compte\/orders\/\" data-endpoint=\"orders\">\n      <i class=\"fa-solid fa-briefcase\"><\/i><span>Commandes<\/span>\n    <\/a>\n\n    <!-- T\u00e9l\u00e9chargements \u2192 optionnel. Supprime cette ligne si tu ne veux pas afficher cet onglet -->\n    <a href=\"\/mon-compte\/downloads\/\" data-endpoint=\"downloads\">\n      <i class=\"fa-solid fa-download\"><\/i><span>T\u00e9l\u00e9chargements<\/span>\n    <\/a>\n\n    <a href=\"\/mon-compte\/edit-address\/\" data-endpoint=\"edit-address\">\n      <i class=\"fa-solid fa-location-dot\"><\/i><span>Adresses<\/span>\n    <\/a>\n\n    <a href=\"\/mon-compte\/payment-methods\/\" data-endpoint=\"payment-methods\">\n      <i class=\"fa-solid fa-credit-card\"><\/i><span>Moyens de paiement<\/span>\n    <\/a>\n\n    <a href=\"\/?customer-logout=true\" data-endpoint=\"customer-logout\">\n      <i class=\"fa-solid fa-right-from-bracket\"><\/i><span>D\u00e9connexion<\/span>\n    <\/a>\n\n  <\/nav>\n\n  <div class=\"otha-profile-card\">\n    <div class=\"info\">\n      <p><i class=\"fa-solid fa-envelope\"><\/i> <\/p>\n\n      <p class=\"profile-location\">\n        <i class=\"fa-solid fa-location-dot\"><\/i>\n        <span class=\"plines\">\n          <br>\n          <span class=\"country-line\">\n            \n            <span class=\"country-text\"><\/span>\n          <\/span>\n        <\/span>\n      <\/p>\n    <\/div>\n\n    <div class=\"buttons\">\n      <a href=\"\/mon-compte\/edit-account\/\" class=\"btn-line\">Mettre \u00e0 jour le profil<\/a>\n      <a href=\"\/mon-compte\/edit-account\/\" class=\"btn-line\">Modifier mon mot de passe<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7964081 elementor-widget elementor-widget-html\" data-id=\"7964081\" 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>\n(function(){\n  const menu = document.querySelector('.otha-menu');\n  const contentWrap = document.querySelector('#otha-account-content');\n  if(!menu || !contentWrap) return;\n\n  \/\/ S\u00e9lecteurs possibles du bloc Woo \u00e0 extraire\n  const PICK = [\n    '.woocommerce-account .woocommerce', \/\/ le plus fr\u00e9quent\n    'main .woocommerce',\n    '.woocommerce'\n  ];\n\n  function setActive(href){\n    const links = menu.querySelectorAll('a');\n    const clean = (u)=>u.replace(\/\\\/+$\/,'');\n    const target = clean(href);\n    links.forEach(a=>{\n      a.classList.remove('active');\n      if (clean(a.href) === target) a.classList.add('active');\n    });\n  }\n\n  function startLoading(){\n    contentWrap.setAttribute('aria-busy','true');\n    contentWrap.style.opacity = '0.5';\n  }\n  function stopLoading(){\n    contentWrap.removeAttribute('aria-busy');\n    contentWrap.style.opacity = '';\n  }\n\n  async function loadToPanel(url, push=true){\n    try{\n      startLoading();\n      const res = await fetch(url, {credentials:'same-origin'});\n      if(!res.ok) throw new Error(res.status);\n      const html = await res.text();\n      const doc = new DOMParser().parseFromString(html, 'text\/html');\n\n      let block = null;\n      for(const sel of PICK){\n        block = doc.querySelector(sel);\n        if(block) break;\n      }\n      if(!block) throw new Error('Bloc Woo introuvable');\n\n      \/\/ Remplace juste le contenu interne (\u00e9vite de perdre notre wrapper)\n      contentWrap.innerHTML = block.innerHTML;\n\n      \/\/ Met \u00e0 jour l'\u00e9tat actif\n      setActive(url);\n\n      \/\/ Historique\n      if(push) history.pushState({othaAccount:true}, '', url);\n\n      \/\/ Refaire d\u00e9filer en haut du panneau (optionnel)\n      contentWrap.scrollIntoView({behavior:'smooth', block:'start'});\n    }catch(e){\n      \/\/ En cas d\u2019\u00e9chec, on laisse le navigateur suivre le lien\n      window.location.href = url;\n    }finally{\n      stopLoading();\n    }\n  }\n\n  \/\/ Clic sur le menu (AJAX)\n  menu.addEventListener('click', function(e){\n    const a = e.target.closest('a');\n    if(!a) return;\n    \/\/ Laisse passer la d\u00e9connexion (chargement plein)\n    if (a.href.includes('customer-logout')) return;\n    e.preventDefault();\n    loadToPanel(a.href, true);\n  });\n\n  \/\/ Gestion retour\/avancer du navigateur\n  window.addEventListener('popstate', function(){\n    loadToPanel(location.href, false);\n  });\n\n  \/\/ Marque l'item actif au chargement initial\n  setActive(location.href);\n})();\n<\/script>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-6f49a24 e-con-full e-flex e-con e-child\" data-id=\"6f49a24\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f4c9b79 elementor-widget elementor-widget-shortcode\" data-id=\"f4c9b79\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><div id=\"otha-account-content\">\n  <div class=\"woocommerce\"><\/div>\n<\/div>\n<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Mon compte Bienvenue, . Tableau de bord Profil Commandes T\u00e9l\u00e9chargements Adresses Moyens de paiement D\u00e9connexion Mettre \u00e0 jour le profil Modifier mon mot de passe<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-435","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/pages\/435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/comments?post=435"}],"version-history":[{"count":179,"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/pages\/435\/revisions"}],"predecessor-version":[{"id":5034,"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/pages\/435\/revisions\/5034"}],"wp:attachment":[{"href":"https:\/\/www.otha.fr\/en\/wp-json\/wp\/v2\/media?parent=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}