mkfashion-sdk 2.7.3 → 2.7.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/mkfashion-sdk-2.7.4.tgz +0 -0
- package/package.json +1 -1
- package/src/mkfashion.js +5 -2
|
Binary file
|
package/package.json
CHANGED
package/src/mkfashion.js
CHANGED
|
@@ -72,7 +72,7 @@ const mkfashion = {
|
|
|
72
72
|
return
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
const raw =
|
|
75
|
+
const raw = options.projectId || options.projectid || options.store
|
|
76
76
|
const projectId = this._resolveProjectId(raw)
|
|
77
77
|
const identifier = (options.identifier || options.sku || '').trim()
|
|
78
78
|
|
|
@@ -414,6 +414,9 @@ const mkfashion = {
|
|
|
414
414
|
},
|
|
415
415
|
|
|
416
416
|
_resolveProjectId(projectId) {
|
|
417
|
+
// Override de QA via ?mkProjectId= — força esse projeto em TODOS os caminhos
|
|
418
|
+
// (open, init, getAvailability, getProduct), ignorando o que a página passa.
|
|
419
|
+
if (this._projectIdOverride) return this._projectIdOverride
|
|
417
420
|
if (!projectId) return '698c7e791d3129430f15dddd'
|
|
418
421
|
const key = String(projectId).toLowerCase()
|
|
419
422
|
return this._storeAliases[key] || projectId
|
|
@@ -824,7 +827,7 @@ const mkfashion = {
|
|
|
824
827
|
async init(options = {}) {
|
|
825
828
|
const fail = reason => ({ ok: false, reason, element: null })
|
|
826
829
|
|
|
827
|
-
const raw =
|
|
830
|
+
const raw = options.projectId || options.projectid || options.store
|
|
828
831
|
const projectId = this._resolveProjectId(raw)
|
|
829
832
|
const identifier = (options.identifier || options.sku || '').trim()
|
|
830
833
|
const target = options.target
|