remove extra code
This commit is contained in:
parent
bb6a9d39dd
commit
df18b3bcef
|
@ -165,9 +165,7 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
userName: function () {
|
userName: function () {
|
||||||
return this.$store.state.accountOne.one.firstname;
|
return this.$store.state.accountOne.one.firstname;
|
||||||
},
|
},
|
||||||
|
@ -329,16 +327,11 @@ export default {
|
||||||
this.$store.dispatch("headerCategoryList/fetchCategoryList");
|
this.$store.dispatch("headerCategoryList/fetchCategoryList");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch("block/fetchHeaderPromoBanner", this.blockId);
|
// this.$store.dispatch("block/fetchHeaderPromoBanner", this.blockId);
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/cartProductList");
|
this.$store.dispatch("userCartProduct/cartProductList");
|
||||||
// this.$store.dispatch("userCartProduct/productTotalAmt");
|
// this.$store.dispatch("userCartProduct/productTotalAmt");
|
||||||
this.$store.dispatch("accountOne/basicInfo");
|
this.$store.dispatch("accountOne/basicInfo");
|
||||||
} else {
|
|
||||||
if (this.guestQuoteId) {
|
|
||||||
this.$store.dispatch("cartProduct/cartProductList", this.guestQuoteId);
|
|
||||||
this.$store.dispatch("cartProduct/productTotalAmt", this.guestQuoteId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -359,9 +359,7 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
userName: function () {
|
userName: function () {
|
||||||
return this.$store.state.accountOne.one.firstname;
|
return this.$store.state.accountOne.one.firstname;
|
||||||
},
|
},
|
||||||
|
@ -695,11 +693,6 @@ export default {
|
||||||
this.$store.dispatch("userCartProduct/cartProductList");
|
this.$store.dispatch("userCartProduct/cartProductList");
|
||||||
// this.$store.dispatch("userCartProduct/productTotalAmt");
|
// this.$store.dispatch("userCartProduct/productTotalAmt");
|
||||||
this.$store.dispatch("accountOne/basicInfo");
|
this.$store.dispatch("accountOne/basicInfo");
|
||||||
} else {
|
|
||||||
if (this.guestQuoteId) {
|
|
||||||
this.$store.dispatch("cartProduct/cartProductList", this.guestQuoteId);
|
|
||||||
this.$store.dispatch("cartProduct/productTotalAmt", this.guestQuoteId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.userVisits) {
|
if (this.userVisits) {
|
||||||
let userVisits = Number(this.userVisits) + 1;
|
let userVisits = Number(this.userVisits) + 1;
|
||||||
|
|
|
@ -733,14 +733,14 @@ export default {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.cartProductsProgress;
|
return this.$store.state.userCartProduct.cartProductsProgress;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.cartProductsProgress;
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inProgress: function () {
|
inProgress: function () {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.inProgress;
|
return this.$store.state.userCartProduct.inProgress;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.inProgress;
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isDesktop: function () {
|
isDesktop: function () {
|
||||||
|
@ -781,14 +781,12 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
cartProductsItem() {
|
cartProductsItem() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.cartProductList;
|
return this.$store.state.userCartProduct.cartProductList;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.cartProductList;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -858,8 +856,6 @@ export default {
|
||||||
showCartDrawer(flag) {
|
showCartDrawer(flag) {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/cartDrawer", flag);
|
this.$store.dispatch("userCartProduct/cartDrawer", flag);
|
||||||
} else {
|
|
||||||
this.$store.dispatch("cartProduct/cartDrawer", flag);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -135,15 +135,13 @@ export default {
|
||||||
userAuth: function() {
|
userAuth: function() {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function() {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
cartDrawer: {
|
cartDrawer: {
|
||||||
get() {
|
get() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.cartDrawer;
|
return this.$store.state.userCartProduct.cartDrawer;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.cartDrawer;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
set() {}
|
set() {}
|
||||||
|
@ -152,14 +150,14 @@ export default {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.cartProductsProgress;
|
return this.$store.state.userCartProduct.cartProductsProgress;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.cartProductsProgress;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inProgress: function() {
|
inProgress: function() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.inProgress;
|
return this.$store.state.userCartProduct.inProgress;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.inProgress;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cartTotalAmtProgress() {
|
cartTotalAmtProgress() {
|
||||||
|
@ -173,14 +171,14 @@ export default {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.cartProductList;
|
return this.$store.state.userCartProduct.cartProductList;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.cartProductList;
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cartProductTotalAmt() {
|
cartProductTotalAmt() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.productTotalAmt;
|
return this.$store.state.userCartProduct.productTotalAmt;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.cartProduct.productTotalAmt;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -217,8 +215,6 @@ export default {
|
||||||
goToCheckout() {
|
goToCheckout() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/cartDrawer", false);
|
this.$store.dispatch("userCartProduct/cartDrawer", false);
|
||||||
} else {
|
|
||||||
this.$store.dispatch("cartProduct/cartDrawer", false);
|
|
||||||
}
|
}
|
||||||
let pagePath = this.$route.path;
|
let pagePath = this.$route.path;
|
||||||
let isGateModulePage = pagePath.includes("/gate/");
|
let isGateModulePage = pagePath.includes("/gate/");
|
||||||
|
@ -249,8 +245,6 @@ export default {
|
||||||
// this.cartDrawer=false;
|
// this.cartDrawer=false;
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/cartDrawer", false);
|
this.$store.dispatch("userCartProduct/cartDrawer", false);
|
||||||
} else {
|
|
||||||
this.$store.dispatch("cartProduct/cartDrawer", false);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stopPropogation(event) {
|
stopPropogation(event) {
|
||||||
|
@ -259,8 +253,6 @@ export default {
|
||||||
closeCartDrawer(flag) {
|
closeCartDrawer(flag) {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/cartDrawer", flag);
|
this.$store.dispatch("userCartProduct/cartDrawer", flag);
|
||||||
} else {
|
|
||||||
this.$store.dispatch("cartProduct/cartDrawer", flag);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resizeCart() {
|
resizeCart() {
|
||||||
|
|
|
@ -42,8 +42,6 @@ export default {
|
||||||
verifyAddress: function() {
|
verifyAddress: function() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.accountOne.address;
|
return this.$store.state.accountOne.address;
|
||||||
} else {
|
|
||||||
return this.$store.state.guestInfo.address;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
countryAndStatesList() {
|
countryAndStatesList() {
|
||||||
|
|
|
@ -66,15 +66,11 @@ export default {
|
||||||
verifyAddress: function() {
|
verifyAddress: function() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.accountOne.address;
|
return this.$store.state.accountOne.address;
|
||||||
} else {
|
|
||||||
return this.$store.state.guestInfo.address;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchInProgress() {
|
fetchInProgress() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.accountOne.inProgress;
|
return this.$store.state.accountOne.inProgress;
|
||||||
} else {
|
|
||||||
return this.$store.state.guestInfo.fetchInProgress;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
countryAndStatesList() {
|
countryAndStatesList() {
|
||||||
|
@ -91,8 +87,6 @@ export default {
|
||||||
userSelectedState: function() {
|
userSelectedState: function() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.accountOne.address.regionId;
|
return this.$store.state.accountOne.address.regionId;
|
||||||
} else {
|
|
||||||
return this.$store.state.guestInfo.address.regionId;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -119,14 +119,14 @@ export default {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.accountOne.address;
|
return this.$store.state.accountOne.address;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.guestInfo.address;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchInProgress() {
|
fetchInProgress() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.accountOne.inProgress;
|
return this.$store.state.accountOne.inProgress;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.guestInfo.fetchInProgress;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
countryAndStatesList() {
|
countryAndStatesList() {
|
||||||
|
@ -144,7 +144,7 @@ export default {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.accountOne.address.regionId;
|
return this.$store.state.accountOne.address.regionId;
|
||||||
} else {
|
} else {
|
||||||
return this.$store.state.guestInfo.address.regionId;
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -613,9 +613,7 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
/*productAttributes: function() {
|
/*productAttributes: function() {
|
||||||
return this.$store.state.productOne.productAttributes;
|
return this.$store.state.productOne.productAttributes;
|
||||||
},*/
|
},*/
|
||||||
|
@ -649,10 +647,6 @@ export default {
|
||||||
calledListrakCartList() {
|
calledListrakCartList() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/setListrakCartList");
|
this.$store.dispatch("userCartProduct/setListrakCartList");
|
||||||
} else {
|
|
||||||
if (this.guestQuoteId) {
|
|
||||||
this.$store.dispatch("cartProduct/setListrakCartList");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeCheckoutFlag(flag) {
|
changeCheckoutFlag(flag) {
|
||||||
|
@ -1158,7 +1152,6 @@ export default {
|
||||||
await this.$store.dispatch(
|
await this.$store.dispatch(
|
||||||
"cartProduct/removeCartProduct",
|
"cartProduct/removeCartProduct",
|
||||||
this.productId
|
this.productId
|
||||||
//guestQuoteId: this.guestQuoteId
|
|
||||||
);
|
);
|
||||||
googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
|
googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
|
||||||
removeCookieByName(this.productId);
|
removeCookieByName(this.productId);
|
||||||
|
|
|
@ -245,9 +245,7 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
categoryList: function () {
|
categoryList: function () {
|
||||||
return this.$store.state.headerCategoryList.categoryList;
|
return this.$store.state.headerCategoryList.categoryList;
|
||||||
},
|
},
|
||||||
|
|
|
@ -517,9 +517,7 @@ export default {
|
||||||
userAuth: function() {
|
userAuth: function() {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function() {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
inProgress: function() {
|
inProgress: function() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.inProgress;
|
return this.$store.state.userCartProduct.inProgress;
|
||||||
|
@ -736,7 +734,6 @@ export default {
|
||||||
.dispatch("cartProduct/updateToConfiguredCart", {
|
.dispatch("cartProduct/updateToConfiguredCart", {
|
||||||
sku: sku,
|
sku: sku,
|
||||||
qty: this.selectedQty,
|
qty: this.selectedQty,
|
||||||
//guestQuote: this.guestQuoteId,
|
|
||||||
itemId: this.itemId,
|
itemId: this.itemId,
|
||||||
typeId: typeId,
|
typeId: typeId,
|
||||||
optionId: optionId,
|
optionId: optionId,
|
||||||
|
|
|
@ -646,9 +646,7 @@ export default {
|
||||||
userAuth: function() {
|
userAuth: function() {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function() {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
inProgress: function() {
|
inProgress: function() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.inProgress;
|
return this.$store.state.userCartProduct.inProgress;
|
||||||
|
@ -766,30 +764,6 @@ export default {
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch(error){
|
|
||||||
this.snackbar = {
|
|
||||||
message: error.message,
|
|
||||||
color: "error",
|
|
||||||
show: true,
|
|
||||||
timeout: 3000
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try{
|
|
||||||
await this.$store.dispatch("cartProduct/updateToGiftCart", {
|
|
||||||
sku: sku,
|
|
||||||
qty: this.selectedQty,
|
|
||||||
guestQuote: this.guestQuoteId,
|
|
||||||
itemId: this.itemId
|
|
||||||
})
|
|
||||||
|
|
||||||
this.snackbar = {
|
|
||||||
message: "Product Updated Successfully",
|
|
||||||
color: "success",
|
|
||||||
show: true,
|
|
||||||
timeout: 3000
|
|
||||||
};
|
|
||||||
}
|
|
||||||
catch(error){
|
catch(error){
|
||||||
this.snackbar = {
|
this.snackbar = {
|
||||||
message: error.message,
|
message: error.message,
|
||||||
|
@ -831,11 +805,6 @@ export default {
|
||||||
await this.$store.dispatch("userCartProduct/fetchGiftMessage", {
|
await this.$store.dispatch("userCartProduct/fetchGiftMessage", {
|
||||||
itemId: this.itemId
|
itemId: this.itemId
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.$store.dispatch("cartProduct/fetchGiftMessage", {
|
|
||||||
guestQuote: this.guestQuoteId,
|
|
||||||
itemId: this.itemId
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -582,9 +582,7 @@ export default {
|
||||||
userAuth: function() {
|
userAuth: function() {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function() {
|
|
||||||
return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
inProgress: function() {
|
inProgress: function() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.inProgress;
|
return this.$store.state.userCartProduct.inProgress;
|
||||||
|
@ -761,7 +759,6 @@ export default {
|
||||||
.dispatch("cartProduct/updateToCart", {
|
.dispatch("cartProduct/updateToCart", {
|
||||||
sku: sku,
|
sku: sku,
|
||||||
qty: this.selectedQty,
|
qty: this.selectedQty,
|
||||||
//guestQuote: this.guestQuoteId,
|
|
||||||
itemId: this.itemId,
|
itemId: this.itemId,
|
||||||
ccid: null,
|
ccid: null,
|
||||||
price: null,
|
price: null,
|
||||||
|
|
|
@ -190,7 +190,6 @@ import CartProductList from "@/components/retailer/cart-product/CartProductList"
|
||||||
import RetailerSearchProducts from "@/components/retailer/retailer-search/RetailerSearchProducts";
|
import RetailerSearchProducts from "@/components/retailer/retailer-search/RetailerSearchProducts";
|
||||||
|
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
||||||
import { getCookieByName } from "@/services/auth";
|
|
||||||
import { priceFormatter } from "@/services/util.service";
|
import { priceFormatter } from "@/services/util.service";
|
||||||
export default {
|
export default {
|
||||||
name: "CartProducts",
|
name: "CartProducts",
|
||||||
|
@ -230,9 +229,7 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return getCookieByName("cr_guestQuoteId");
|
|
||||||
},
|
|
||||||
cartProductsItem() {
|
cartProductsItem() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
return this.$store.state.userCartProduct.cartProductList;
|
return this.$store.state.userCartProduct.cartProductList;
|
||||||
|
@ -293,10 +290,6 @@ export default {
|
||||||
calledCriteoViewBasket() {
|
calledCriteoViewBasket() {
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/setCriteoViewBasket");
|
this.$store.dispatch("userCartProduct/setCriteoViewBasket");
|
||||||
} else {
|
|
||||||
if (this.guestQuoteId) {
|
|
||||||
this.$store.dispatch("cartProduct/setCriteoViewBasket");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeMinus(val) {
|
removeMinus(val) {
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
justify="center"
|
justify="center"
|
||||||
class="py-5"
|
class="py-5"
|
||||||
no-gutters
|
no-gutters
|
||||||
v-if="cartProductsItem.length && (guestQuoteId || userAuth)"
|
v-if="cartProductsItem.length && ( userAuth)"
|
||||||
>
|
>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-tabs hide-slider fixed-tabs v-model="tabs" :height="35">
|
<v-tabs hide-slider fixed-tabs v-model="tabs" :height="35">
|
||||||
|
@ -1161,7 +1161,7 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
var client = require("braintree-web/client");
|
var client = require("braintree-web/client");
|
||||||
const baseUrl = process.env.VUE_APP_BASE_URL;
|
const baseUrl = process.env.VUE_APP_BASE_URL;
|
||||||
const paypalCheckout = require("braintree-web/paypal-checkout");
|
//const paypalCheckout = require("braintree-web/paypal-checkout");
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
||||||
import CartProductList from "@/components/retailer/cart-product/CartProductList";
|
import CartProductList from "@/components/retailer/cart-product/CartProductList";
|
||||||
import ShippingAddressFormComponent from "@/components/retailer/address/ShippingAddressFormComponent";
|
import ShippingAddressFormComponent from "@/components/retailer/address/ShippingAddressFormComponent";
|
||||||
|
@ -1170,12 +1170,11 @@ import BillingAddressComponent from "@/components/retailer/address/BillingAddres
|
||||||
import VerifyAddressComponent from "@/components/retailer/address/VerifyAddressComponent";
|
import VerifyAddressComponent from "@/components/retailer/address/VerifyAddressComponent";
|
||||||
import CardPayment from "@/components/retailer/payment/CardPayment";
|
import CardPayment from "@/components/retailer/payment/CardPayment";
|
||||||
import { createHelpers } from "vuex-map-fields";
|
import { createHelpers } from "vuex-map-fields";
|
||||||
import { getCookieByName } from "@/services/auth";
|
|
||||||
import { VueTelInput } from "vue-tel-input";
|
import { VueTelInput } from "vue-tel-input";
|
||||||
import {
|
import {
|
||||||
googleAanalyticsPurchase,
|
googleAanalyticsPurchase,
|
||||||
googleAanalyticsCheckout,
|
googleAanalyticsCheckout,
|
||||||
checkEncodeURI,
|
// checkEncodeURI,
|
||||||
priceFormatter,
|
priceFormatter,
|
||||||
fetchStates,
|
fetchStates,
|
||||||
googleAanalyticsCheckoutAddShippingInfo,
|
googleAanalyticsCheckoutAddShippingInfo,
|
||||||
|
@ -1364,10 +1363,7 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return getCookieByName("cr_guestQuoteId");
|
|
||||||
// return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
fetchSeletedAddress: function () {
|
fetchSeletedAddress: function () {
|
||||||
return this.$store.state.accountOne.seletedAddress;
|
return this.$store.state.accountOne.seletedAddress;
|
||||||
},
|
},
|
||||||
|
@ -1638,33 +1634,8 @@ export default {
|
||||||
timeout: 2000,
|
timeout: 2000,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.$store
|
|
||||||
.dispatch("cartProduct/applyDiscountCode", {
|
|
||||||
discountTextCode: this.discountTextCode,
|
|
||||||
guestQuoteId: this.guestQuoteId,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.snackbar = {
|
|
||||||
message: "Your coupon was successfully applied",
|
|
||||||
color: "success",
|
|
||||||
show: true,
|
|
||||||
timeout: 2000,
|
|
||||||
};
|
|
||||||
this.$store.dispatch("guestInfo/setShippingInformation", {
|
|
||||||
method: this.estimatedShipping,
|
|
||||||
email: this.email,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
this.snackbar = {
|
|
||||||
message: error.message,
|
|
||||||
color: "error",
|
|
||||||
show: true,
|
|
||||||
timeout: 2000,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeDiscountCode() {
|
removeDiscountCode() {
|
||||||
|
@ -1695,32 +1666,6 @@ export default {
|
||||||
timeout: 2000,
|
timeout: 2000,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.$store
|
|
||||||
.dispatch("cartProduct/removeDiscountCode", {
|
|
||||||
discountTextCode: this.discountTextCode,
|
|
||||||
guestQuoteId: this.guestQuoteId,
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.snackbar = {
|
|
||||||
message: "Your coupon was successfully removed",
|
|
||||||
color: "success",
|
|
||||||
show: true,
|
|
||||||
timeout: 2000,
|
|
||||||
};
|
|
||||||
this.$store.dispatch("guestInfo/setShippingInformation", {
|
|
||||||
method: this.estimatedShipping,
|
|
||||||
email: this.email,
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
this.snackbar = {
|
|
||||||
message: error.message,
|
|
||||||
color: "error",
|
|
||||||
show: true,
|
|
||||||
timeout: 2000,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1918,11 +1863,6 @@ export default {
|
||||||
}*/
|
}*/
|
||||||
if (vm.userAuth) {
|
if (vm.userAuth) {
|
||||||
await vm.$store.dispatch("accountOne/setEstimatedShipping");
|
await vm.$store.dispatch("accountOne/setEstimatedShipping");
|
||||||
} else if (vm.guestQuoteId) {
|
|
||||||
await vm.$store.dispatch(
|
|
||||||
"guestInfo/setEstimatedShipping",
|
|
||||||
vm.email
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
this.addressInProgress = false;
|
this.addressInProgress = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,10 +152,7 @@ export default {
|
||||||
userAuth: function () {
|
userAuth: function () {
|
||||||
return this.$store.state.auth.userAuth;
|
return this.$store.state.auth.userAuth;
|
||||||
},
|
},
|
||||||
guestQuoteId: function () {
|
|
||||||
return getCookieByName("cr_guestQuoteId");
|
|
||||||
// return this.$store.state.guestInfo.guestQuoteId;
|
|
||||||
},
|
|
||||||
orderNo: function () {
|
orderNo: function () {
|
||||||
return this.$route.params.orderNumber;
|
return this.$route.params.orderNumber;
|
||||||
},
|
},
|
||||||
|
@ -237,12 +234,6 @@ export default {
|
||||||
this.$store.dispatch("userCartProduct/cartProductList");
|
this.$store.dispatch("userCartProduct/cartProductList");
|
||||||
// this.$store.dispatch("userCartProduct/productTotalAmt");
|
// this.$store.dispatch("userCartProduct/productTotalAmt");
|
||||||
this.$store.dispatch("meProductOne/fetchOrderProduct", this.orderNo);
|
this.$store.dispatch("meProductOne/fetchOrderProduct", this.orderNo);
|
||||||
} else {
|
|
||||||
if (this.guestQuoteId) {
|
|
||||||
this.$store.dispatch("cartProduct/cartProductList", this.guestQuoteId);
|
|
||||||
this.$store.dispatch("cartProduct/productTotalAmt", this.guestQuoteId);
|
|
||||||
}
|
|
||||||
this.$store.dispatch("meProductOne/fetchOrderProduct", this.orderNo);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue