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