- catalogo
- corretto logica del RefreshToken che non richiedeva il nuovo token, quindi scadeva tutte le volte, richiedendo sempre l'accesso !
This commit is contained in:
403
docs/libro2.htm
Normal file
403
docs/libro2.htm
Normal file
@@ -0,0 +1,403 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- saved from url=(0067)http://vps-88271abb.vps.ovh.net/apimacro/public/mylinkspao?id=22753 -->
|
||||
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Link Page</title>
|
||||
<style>
|
||||
#loading {
|
||||
display: none;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 5px solid #f3f3f3;
|
||||
border-top: 5px solid #3498db;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Links</h1>
|
||||
<form id="articleForm">
|
||||
<pre> Per vedere la lista -> "LIBRI IN PREVENDITA"
|
||||
in <span style="color: green;">VERDE</span> quelli in PreOrdine
|
||||
in <span style="color: red;">ROSSO</span> quelli ancora non abilitati.
|
||||
cliccare sul link <span style="font-weight: bold;">Imposta in PREORDINE"</span> per abilitarlo.
|
||||
</pre>
|
||||
<label for="article_id">ID Articolo or Ordine:</label>
|
||||
<input type="text" id="article_id" name="id" value="22753">
|
||||
<input type="text" id="action" name="action" value="" hidden="">
|
||||
<br>
|
||||
<button type="button" data-action="search">Cerca Articolo</button>
|
||||
<button type="button" data-action="search_isbn">Cerca ISBN</button>
|
||||
<button type="button" data-action="updateArtFromGM">Aggiorna Articolo da GM</button>
|
||||
<button type="button" data-action="checkPrevendita">E' in PreVendita?</button>
|
||||
<button type="button" data-action="setPreOrder">Impostalo in PreVendita!</button>
|
||||
<button type="button" data-action="setDataPubblicazione">Aggiorna Data Pubblicazione</button>
|
||||
<button type="button" data-action="showDettSingleOrdine">Dett. Ordine</button>
|
||||
<button type="button" data-action="showDettSingleOrdineWeb">Dett. Ordine Web</button>
|
||||
<br><br>
|
||||
|
||||
<button type="button" data-action="showTest">Test</button>
|
||||
<button type="button" data-action="inprevendita">Libri in Prevendita</button>
|
||||
<button type="button" data-action="cartolibri">Cartolibri</button>
|
||||
<button type="button" data-action="riviste">Riviste</button>
|
||||
<button type="button" data-action="showOrdini">Mostra Ordini</button>
|
||||
<button type="button" data-action="showOrdiniWeb">Mostra Ordini Web</button>
|
||||
<button type="button" data-action="showArticoliFatturatiWeb">Mostra Fatturati</button>
|
||||
<button type="button" data-action="Vendite">Vendite</button>
|
||||
|
||||
<button type="button" data-action="showDettOrdini">Dettaglio Ordini</button>
|
||||
<button type="button" data-action="showDettOrdiniWeb">Dettaglio Ordini Web</button>
|
||||
</form>
|
||||
<div>
|
||||
<a href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-articles-sales" target="_blank">Vedi Articoli Venduti e Fatturati</a> - <a href="http://vps-88271abb.vps.ovh.net/apimacro/public/export-articles-sales-json" target="_blank">(Esporta)</a><br>
|
||||
|
||||
</div>
|
||||
<div id="result">Articles di 22753 :
|
||||
<pre>[
|
||||
{
|
||||
"Id": "258799",
|
||||
"IdArticolo": "22753",
|
||||
"Ean13": "9788865934883",
|
||||
"Titolo": "La Storia di Flumeide e la Bambina",
|
||||
"ListaAutori": "4184",
|
||||
"ListaArgomenti": "6",
|
||||
"IdStatoProdotto": "34",
|
||||
"PrezzoIvato": "13.0000",
|
||||
"IdMarchioEditoriale": "34",
|
||||
"IdCollana": "1033",
|
||||
"DataPubblicazione": "2025-01-21 00:00:00.000",
|
||||
"IdTipologia": "1",
|
||||
"IdTipoFormato": "1",
|
||||
"Misure": "cm 28x19",
|
||||
"Pagine": "32",
|
||||
"Sottotitolo": "Una fiaba per grandi",
|
||||
"Durata": "",
|
||||
"Numero": "",
|
||||
"Edizione": "Gennaio 2025",
|
||||
"Ristampa": "",
|
||||
"DataInizioCampagna": "2024-11-15 00:00:00.000",
|
||||
"DataFineCampagna": "2099-11-15 00:00:00.000",
|
||||
"ScontoCampagna": "5.00",
|
||||
"PrezzoIvatoScontatoCampagna": "12.3500",
|
||||
"DataOra": "2024-12-19 11:16:13.993",
|
||||
"Enabled": "0",
|
||||
"IDTagGruppo": "0",
|
||||
"Utente": "AZANGHERI-NOTE",
|
||||
"PercIva": ".00",
|
||||
"IdTitoloOriginale": "13664",
|
||||
"EnabledAlFresco": "1",
|
||||
"CodEdizione": "1",
|
||||
"FasciaEta": "Genitori",
|
||||
"FasciaEta2": "Ragazze e ragazzi",
|
||||
"data": "2024-12-19 11:16:13.993",
|
||||
"DescrizioneStatoProdotto": "In prevendita",
|
||||
"Codice": "22753",
|
||||
"QtaDisponibile": "-2"
|
||||
}
|
||||
]</pre>Product:
|
||||
<pre>{
|
||||
"id": 73612,
|
||||
"name": "La storia di Flumeide e la bambina - Nuovo",
|
||||
"slug": "la-storia-di-flumeide-e-la-bambina-nuovo",
|
||||
"permalink": "https:\/\/www.fioredellavita.it\/?post_type=product&p=73611&attribute_pa_versione=nuovo",
|
||||
"date_created": "2024-11-20T04:49:10",
|
||||
"date_created_gmt": "2024-11-20T03:49:10",
|
||||
"date_modified": "2024-12-20T12:56:24",
|
||||
"date_modified_gmt": "2024-12-20T11:56:24",
|
||||
"type": "variation",
|
||||
"status": "publish",
|
||||
"featured": false,
|
||||
"catalog_visibility": "visible",
|
||||
"description": "",
|
||||
"short_description": "",
|
||||
"sku": "22753",
|
||||
"price": "12.3500",
|
||||
"regular_price": "13.0000",
|
||||
"sale_price": "12.3500",
|
||||
"date_on_sale_from": "2024-11-15T00:00:00",
|
||||
"date_on_sale_from_gmt": "2024-11-14T23:00:00",
|
||||
"date_on_sale_to": "2099-11-15T23:59:59",
|
||||
"date_on_sale_to_gmt": "2099-11-15T22:59:59",
|
||||
"on_sale": true,
|
||||
"purchasable": true,
|
||||
"total_sales": "0",
|
||||
"virtual": false,
|
||||
"downloadable": false,
|
||||
"downloads": [],
|
||||
"download_limit": -1,
|
||||
"download_expiry": -1,
|
||||
"external_url": "",
|
||||
"button_text": "",
|
||||
"tax_status": "taxable",
|
||||
"tax_class": "",
|
||||
"manage_stock": true,
|
||||
"stock_quantity": 10000,
|
||||
"backorders": "no",
|
||||
"backorders_allowed": false,
|
||||
"backordered": false,
|
||||
"low_stock_amount": null,
|
||||
"sold_individually": false,
|
||||
"weight": "",
|
||||
"dimensions": {
|
||||
"length": "",
|
||||
"width": "",
|
||||
"height": ""
|
||||
},
|
||||
"shipping_required": true,
|
||||
"shipping_taxable": true,
|
||||
"shipping_class": "",
|
||||
"shipping_class_id": 0,
|
||||
"reviews_allowed": false,
|
||||
"average_rating": "0.00",
|
||||
"rating_count": 0,
|
||||
"upsell_ids": [],
|
||||
"cross_sell_ids": [],
|
||||
"parent_id": 73611,
|
||||
"purchase_note": "",
|
||||
"categories": [],
|
||||
"tags": [],
|
||||
"images": [],
|
||||
"attributes": [
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Versione",
|
||||
"slug": "pa_versione",
|
||||
"option": "Nuovo"
|
||||
}
|
||||
],
|
||||
"default_attributes": [],
|
||||
"variations": [],
|
||||
"grouped_products": [],
|
||||
"menu_order": 1,
|
||||
"price_html": "<del aria-hidden="\"true\""><span class="\"woocommerce-Price-amount" amount\"=""><bdi>13,00<span class="\"woocommerce-Price-currencySymbol\"">€<\/span><\/bdi><\/span><\/del> <span class="\"screen-reader-text\"">Il prezzo originale era: 13,00€.<\/span><ins aria-hidden="\"true\""><span class="\"woocommerce-Price-amount" amount\"=""><bdi>12,35<span class="\"woocommerce-Price-currencySymbol\"">€<\/span><\/bdi><\/span><\/ins><span class="\"screen-reader-text\"">Il prezzo attuale \u00e8: 12,35€.<\/span>",
|
||||
"related_ids": [],
|
||||
"meta_data": [
|
||||
{
|
||||
"id": 1501793,
|
||||
"key": "ISBN",
|
||||
"value": "9788865934883"
|
||||
},
|
||||
{
|
||||
"id": 1501794,
|
||||
"key": "misure",
|
||||
"value": "cm 28x19"
|
||||
},
|
||||
{
|
||||
"id": 1501795,
|
||||
"key": "formato",
|
||||
"value": "Brossura"
|
||||
},
|
||||
{
|
||||
"id": 1501796,
|
||||
"key": "pagine",
|
||||
"value": "32"
|
||||
},
|
||||
{
|
||||
"id": 1501798,
|
||||
"key": "_wpro_variable_is_preorder",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"id": 1501799,
|
||||
"key": "_is_pre_order",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"id": 1521636,
|
||||
"key": "_pre_order_date",
|
||||
"value": "2025-01-21"
|
||||
},
|
||||
{
|
||||
"id": 1521637,
|
||||
"key": "_wpro_date_label_variable",
|
||||
"value": "Prenotalo per riceverlo entro il 21 gennaio 2025"
|
||||
},
|
||||
{
|
||||
"id": 1521638,
|
||||
"key": "_wpro_no_date_label_variable",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521639,
|
||||
"key": "_wpro_manage_price_variable",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521640,
|
||||
"key": "_wpro_price_variable",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521641,
|
||||
"key": "_wpro_label_variable",
|
||||
"value": "Pre Ordinalo!"
|
||||
},
|
||||
{
|
||||
"id": 1521642,
|
||||
"key": "_wpro_price_type_variable",
|
||||
"value": "manual"
|
||||
},
|
||||
{
|
||||
"id": 1521643,
|
||||
"key": "_wpro_amount_price_variable",
|
||||
"value": "fixed"
|
||||
},
|
||||
{
|
||||
"id": 1521644,
|
||||
"key": "_wpro_date_variable",
|
||||
"value": "2025-01-21"
|
||||
},
|
||||
{
|
||||
"id": 1521645,
|
||||
"key": "_wpro_time_variable",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521646,
|
||||
"key": "_rank_math_gtin_code",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521698,
|
||||
"key": "_ywpo_preorder",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"id": 1521699,
|
||||
"key": "_ywpo_availability_date_mode",
|
||||
"value": "date"
|
||||
},
|
||||
{
|
||||
"id": 1521700,
|
||||
"key": "_ywpo_for_sale_date",
|
||||
"value": "1736809200"
|
||||
},
|
||||
{
|
||||
"id": 1521701,
|
||||
"key": "_ywpo_price_mode",
|
||||
"value": "default"
|
||||
},
|
||||
{
|
||||
"id": 1521702,
|
||||
"key": "_ywpo_preorder_price",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"id": 1521703,
|
||||
"key": "_ywpo_preorder_discount_percentage",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521704,
|
||||
"key": "_ywpo_preorder_discount_fixed",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521705,
|
||||
"key": "_ywpo_preorder_increase_percentage",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521706,
|
||||
"key": "_ywpo_preorder_increase_fixed",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": 1521707,
|
||||
"key": "edizione",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"stock_status": "instock",
|
||||
"has_options": false,
|
||||
"post_password": "",
|
||||
"global_unique_id": "",
|
||||
"jetpack_sharing_enabled": true,
|
||||
"jetpack-related-posts": [],
|
||||
"builder_content": "",
|
||||
"_links": {
|
||||
"self": [
|
||||
{
|
||||
"href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/73612",
|
||||
"targetHints": {
|
||||
"allow": [
|
||||
"GET",
|
||||
"POST",
|
||||
"PUT",
|
||||
"PATCH",
|
||||
"DELETE"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"collection": [
|
||||
{
|
||||
"href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products"
|
||||
}
|
||||
],
|
||||
"up": [
|
||||
{
|
||||
"href": "https:\/\/www.fioredellavita.it\/wp-json\/wc\/v3\/products\/73611"
|
||||
}
|
||||
]
|
||||
}
|
||||
}</span></span></bdi></span></ins></span></span></bdi></span></del></pre></div>
|
||||
<div id="loading" style="display: none;"></div>
|
||||
|
||||
<script>
|
||||
const form = document.getElementById('articleForm');
|
||||
const result = document.getElementById('result');
|
||||
const loading = document.getElementById('loading');
|
||||
|
||||
const buttons = form.querySelectorAll('button');
|
||||
buttons.forEach(button => button.addEventListener('click', handleButtonClick));
|
||||
|
||||
function handleButtonClick(event) {
|
||||
let action = event.target.dataset.action;
|
||||
let id = '0';
|
||||
try {
|
||||
id = form.querySelector('input[name="id"]').value;
|
||||
if (!action) {
|
||||
action = form.querySelector('input[name="action"]').value;
|
||||
}
|
||||
} catch (e) {
|
||||
id = 0;
|
||||
}
|
||||
|
||||
if (!id) {
|
||||
id = 0;
|
||||
}
|
||||
|
||||
loading.style.display = 'block'; // Mostra la clessidra
|
||||
|
||||
let baseUrl = window.location.href;
|
||||
baseUrl = baseUrl.slice(0, baseUrl.lastIndexOf('/'));
|
||||
|
||||
fetch(`${baseUrl}/handle-article-action-pao/${id}/${action}`)
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
result.innerHTML = data;
|
||||
loading.style.display = 'none'; // Nasconde la clessidra una volta completato
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<deepl-input-controller><template shadowrootmode="open"><link rel="stylesheet" href="chrome-extension://cofdbpoegempjloogbagkncekinflcnj/build/content.css"><div dir="ltr" style="visibility: initial !important;"><div class="dl-input-translation-container svelte-95aucy"><div></div></div></div></template></deepl-input-controller></body></html>
|
||||
Reference in New Issue
Block a user