init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
init', { pid: pid, elFound: !!el, ajaxUrl: ajaxU }); if(!el){ console.error('
conteneur introuvable'); return; } // Prépare payload var data = new FormData(); data.append('action', 'dnd_inter_price'); data.append('pid', pid); data.append('_wpnonce', nonce); // Cache-busting param (utile si proxy/CDN) var url = ajaxU + (ajaxU.indexOf('?') === -1 ? '?' : '&') + 't=' + Date.now(); console.log('
fetch start'); fetch(url, { method: 'POST', body: data, credentials: 'same-origin' }).then(function(resp){ console.log('
fetch response', { ok: resp.ok, status: resp.status }); return resp.text().then(function(txt){ console.log('
raw text', txt); var json = null; try { json = JSON.parse(txt); } catch(e){ console.error('
JSON.parse error', e); } return { resp: resp, txt: txt, json: json }; }); }).then(function(payload){ if(!payload){ console.error('
payload vide'); el.innerHTML = '
Prix indisponible.
'; return; } var json = payload.json; if(!json || !json.success || !json.data || !json.data.html){ console.error('
réponse JSON invalide', payload); el.innerHTML = '
Prix indisponible.
'; return; } console.log('
success', json.data.debug || {}); el.innerHTML = json.data.html; }).catch(function(err){ console.error('
fetch error', err); el.innerHTML = '
Prix indisponible.
'; }); } catch(ex){ console.error('
runtime error', ex); } }); runtime error', ex); } });