mkfashion-sdk 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +11 -2
- package/package.json +1 -1
package/index.html
CHANGED
|
@@ -40,9 +40,18 @@
|
|
|
40
40
|
console.error('Erro no provador:', error);
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
// 3.
|
|
43
|
+
// 3. Busca e exibe informações do produto no console
|
|
44
|
+
mkfashion.getProduct('gregory', '306636').then(function(produto) {
|
|
45
|
+
console.log('=== Informações do Produto 306636 ===');
|
|
46
|
+
console.log(produto);
|
|
47
|
+
}).catch(function(error) {
|
|
48
|
+
console.error('Erro ao buscar produto:', error);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// 4. Verifica disponibilidade e configura botão
|
|
44
52
|
mkfashion.isAvailable(306636).then(function(disponivel) {
|
|
45
53
|
if (disponivel) {
|
|
54
|
+
console.log('✅ Produto SKU 306636 disponível para prova virtual');
|
|
46
55
|
var btn = document.getElementById('btn-provar');
|
|
47
56
|
btn.style.display = 'inline-block';
|
|
48
57
|
|
|
@@ -54,7 +63,7 @@
|
|
|
54
63
|
});
|
|
55
64
|
};
|
|
56
65
|
} else {
|
|
57
|
-
console.log('Produto
|
|
66
|
+
console.log('❌ Produto SKU 306636 NÃO disponível para prova virtual');
|
|
58
67
|
}
|
|
59
68
|
});
|
|
60
69
|
</script>
|