mkfashion-sdk 2.3.1 → 2.3.3
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 +1 -1
- package/package.json +1 -1
- package/src/mkfashion.js +6 -6
package/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Provador Virtual</title>
|
|
7
|
-
<script src="
|
|
7
|
+
<script src="./src/mkfashion.js"></script>
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
|
package/package.json
CHANGED
package/src/mkfashion.js
CHANGED
|
@@ -121,7 +121,7 @@ const mkfashion = {
|
|
|
121
121
|
* Registra callback de adicionar ao carrinho.
|
|
122
122
|
*
|
|
123
123
|
* Payload simplificado (não-Gregory):
|
|
124
|
-
* {
|
|
124
|
+
* { mainIdentifier, selectedIdentifier, name, price, sizePrice, selectedSize, productUrl, tryonImageUrl }
|
|
125
125
|
*
|
|
126
126
|
* Projetos Gregory mantêm estrutura legada completa.
|
|
127
127
|
*/
|
|
@@ -608,7 +608,7 @@ const mkfashion = {
|
|
|
608
608
|
p.cor = p.color
|
|
609
609
|
p.preco = { de: p.compareAtPrice, por: p.price }
|
|
610
610
|
p.sizeSku = p.variantSku || p.produtoVarianteId || identifierValue
|
|
611
|
-
p.productVariantId = p.produtoVarianteId || p.variantSku
|
|
611
|
+
p.productVariantId = p.produtoVarianteId || p.variantSku || identifierValue
|
|
612
612
|
p.imagem = p.originalImageUrl
|
|
613
613
|
p.url = p.productUrl
|
|
614
614
|
}
|
|
@@ -616,14 +616,14 @@ const mkfashion = {
|
|
|
616
616
|
// Fluxo simplificado
|
|
617
617
|
const product = data?.product || {}
|
|
618
618
|
callbackPayload = {
|
|
619
|
-
name: product.name || null,
|
|
620
619
|
mainIdentifier: identifierValue,
|
|
621
620
|
selectedIdentifier: product.variantSku || null,
|
|
622
|
-
|
|
621
|
+
name: product.name || null,
|
|
622
|
+
price: product.price || null,
|
|
623
623
|
sizePrice: product.sizePrice || null,
|
|
624
|
-
|
|
624
|
+
selectedSize: data?.size || null,
|
|
625
625
|
productUrl: product.productUrl || null,
|
|
626
|
-
|
|
626
|
+
tryonImageUrl: product.tryonImageUrl || null
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
|