@ecomplus/storefront-components 1.0.0-beta.183 → 1.0.0-beta.185
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecomplus/storefront-components",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.185",
|
|
4
4
|
"description": "Vue components for E-Com Plus Storefront",
|
|
5
5
|
"main": "dist/storefront-components.min.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@ecomplus/search-engine": "^2.6.1",
|
|
40
40
|
"@ecomplus/shopping-cart": "^2.6.0",
|
|
41
41
|
"@ecomplus/storefront-twbs": "^7.3.6",
|
|
42
|
-
"@glidejs/glide": "^3.
|
|
42
|
+
"@glidejs/glide": "^3.7.1",
|
|
43
43
|
"@linusborg/vue-simple-portal": "^0.1.5",
|
|
44
44
|
"axios": "^0.27.2 || ^1.1.2",
|
|
45
45
|
"cleave.js": "^1.6.0",
|
|
@@ -156,6 +156,7 @@ export default {
|
|
|
156
156
|
|
|
157
157
|
parseDiscountOptions (listResult = []) {
|
|
158
158
|
let extraDiscountValue = 0
|
|
159
|
+
let hasFreebies = false
|
|
159
160
|
if (listResult.length) {
|
|
160
161
|
let discountRule, invalidCouponMsg, invalidAlertVariant
|
|
161
162
|
listResult.forEach(appResult => {
|
|
@@ -193,7 +194,14 @@ export default {
|
|
|
193
194
|
invalidCouponMsg = response.invalid_coupon_message
|
|
194
195
|
}
|
|
195
196
|
if (this.canAddFreebieItems) {
|
|
196
|
-
|
|
197
|
+
const freebieProductIds = response.freebie_product_ids
|
|
198
|
+
if (Array.isArray(freebieProductIds) && freebieProductIds.length) {
|
|
199
|
+
hasFreebies = true
|
|
200
|
+
addFreebieItems(this.ecomCart, freebieProductIds)
|
|
201
|
+
if (this.localCouponCode) {
|
|
202
|
+
this.$emit('update:coupon-code', this.localCouponCode)
|
|
203
|
+
}
|
|
204
|
+
}
|
|
197
205
|
}
|
|
198
206
|
}
|
|
199
207
|
})
|
|
@@ -213,7 +221,7 @@ export default {
|
|
|
213
221
|
}
|
|
214
222
|
this.$emit('set-discount-rule', discountRule)
|
|
215
223
|
} else {
|
|
216
|
-
if (this.localCouponCode) {
|
|
224
|
+
if (this.localCouponCode && !hasFreebies) {
|
|
217
225
|
this.alertText = invalidCouponMsg || this.i19invalidCouponMsg
|
|
218
226
|
this.alertVariant = invalidAlertVariant || 'warning'
|
|
219
227
|
} else {
|
package/src/js/LoginBlock.js
CHANGED
|
@@ -167,7 +167,7 @@ export default {
|
|
|
167
167
|
.then(({ host, baseUri, oauthPath, providers }) => {
|
|
168
168
|
const oauthProviders = []
|
|
169
169
|
for (const provider in providers) {
|
|
170
|
-
if (providers[provider]) {
|
|
170
|
+
if (providers[provider] && provider !== 'facebook') {
|
|
171
171
|
const { faIcon, providerName } = providers[provider]
|
|
172
172
|
let link = host + baseUri + provider + oauthPath
|
|
173
173
|
const referral = typeof window === 'object' &&
|
package/src/js/LoginModal.js
CHANGED
|
@@ -125,7 +125,7 @@ export default {
|
|
|
125
125
|
.then(({ host, baseUri, oauthPath, providers }) => {
|
|
126
126
|
const oauthProviders = []
|
|
127
127
|
for (const provider in providers) {
|
|
128
|
-
if (providers[provider]) {
|
|
128
|
+
if (providers[provider] && provider !== 'facebook') {
|
|
129
129
|
const { faIcon, providerName } = providers[provider]
|
|
130
130
|
let link = host + baseUri + provider + oauthPath
|
|
131
131
|
const referral = typeof window === 'object' &&
|
|
@@ -153,11 +153,6 @@ export default {
|
|
|
153
153
|
|
|
154
154
|
presetOauthProviders () {
|
|
155
155
|
this.oauthProviders = [
|
|
156
|
-
{
|
|
157
|
-
faIcon: 'fa-facebook-f',
|
|
158
|
-
providerName: 'Facebook',
|
|
159
|
-
provider: 'facebook'
|
|
160
|
-
},
|
|
161
156
|
{
|
|
162
157
|
faIcon: 'fa-google',
|
|
163
158
|
providerName: 'Google',
|