mkfashion-sdk 1.2.4 → 1.2.5
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 +8 -4
- package/package.json +1 -1
- package/src/mkfashion.js +2 -0
package/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<body>
|
|
24
24
|
|
|
25
25
|
<h1>Produto XYZ</h1>
|
|
26
|
-
<p>SKU:
|
|
26
|
+
<p>SKU: 165230</p>
|
|
27
27
|
|
|
28
28
|
<button class="btn-provar" id="btn-provar">
|
|
29
29
|
Provador Virtual
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
<script>
|
|
33
33
|
// 1. Registra callback do carrinho (ANTES de abrir)
|
|
34
34
|
mkfashion.addToCart(function(payload) {
|
|
35
|
-
console.log('
|
|
35
|
+
console.log('=== PAYLOAD DO PROVADOR ===');
|
|
36
|
+
console.log('SKU:', payload.sku);
|
|
37
|
+
console.log('Tamanho selecionado:', payload.size);
|
|
38
|
+
console.log('Produto completo:', payload.product);
|
|
39
|
+
console.log('Payload completo:', JSON.stringify(payload, null, 2));
|
|
36
40
|
});
|
|
37
41
|
|
|
38
42
|
// 2. Registra callback de erro
|
|
@@ -49,7 +53,7 @@
|
|
|
49
53
|
});
|
|
50
54
|
|
|
51
55
|
// 4. Verifica disponibilidade e configura botão
|
|
52
|
-
mkfashion.isAvailable(
|
|
56
|
+
mkfashion.isAvailable(165230).then(function(disponivel) {
|
|
53
57
|
if (disponivel) {
|
|
54
58
|
console.log('✅ Produto SKU 306636 disponível para prova virtual');
|
|
55
59
|
var btn = document.getElementById('btn-provar');
|
|
@@ -59,7 +63,7 @@
|
|
|
59
63
|
mkfashion.open({
|
|
60
64
|
mode: 'wake',
|
|
61
65
|
store: 'gregory',
|
|
62
|
-
sku: '
|
|
66
|
+
sku: '165230'
|
|
63
67
|
});
|
|
64
68
|
};
|
|
65
69
|
} else {
|
package/package.json
CHANGED
package/src/mkfashion.js
CHANGED
|
@@ -382,6 +382,7 @@ const mkfashion = {
|
|
|
382
382
|
left: 0;
|
|
383
383
|
width: 100%;
|
|
384
384
|
height: 100%;
|
|
385
|
+
height: 100dvh;
|
|
385
386
|
background: rgba(0, 0, 0, 0.8);
|
|
386
387
|
display: flex;
|
|
387
388
|
align-items: center;
|
|
@@ -400,6 +401,7 @@ const mkfashion = {
|
|
|
400
401
|
height: ${typeof height === 'number' ? `${height}px` : height};
|
|
401
402
|
max-width: 100vw;
|
|
402
403
|
max-height: 100vh;
|
|
404
|
+
max-height: 100dvh;
|
|
403
405
|
border-radius: 12px;
|
|
404
406
|
overflow: hidden;
|
|
405
407
|
background: #ffffff;
|