Merge branch 'beta' of git.treelet.net:crane/retailer-vue into dev

This commit is contained in:
anju j 2022-01-31 13:07:00 +05:30
commit ce10ce4d3c
26 changed files with 160 additions and 348 deletions

View File

@ -30,8 +30,6 @@
"lodash-humps": "^3.1.5",
"vue": "^2.6.10",
"vue-cookies": "^1.5.13",
"vue-gtag": "^1.8.0",
"vue-gtm": "3.0.0-vue2",
"vue-meta": "^2.4.0",
"vue-router": "^3.2.0",
"vue-tel-input": "^4.4.0",

View File

@ -39,7 +39,7 @@
<!-- built files will be auto injected -->
<!-- Listrak Analytics Javascript Framework -->
<script type="text/javascript">
<!-- <script type="text/javascript">
var biJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
(function (d, s, id, tid, vid) {
var js, ljs = d.getElementsByTagName(s)[0];
@ -49,9 +49,9 @@
js.src = biJsHost + "cdn.listrakbi.com/scripts/script.js?m=" + tid + "&v=" + vid;
ljs.parentNode.insertBefore(js, ljs);
})(document, 'script', 'ltkSDK', 'yJ3fjhPTdCKx', '1');
</script>
</script>-->
<!--START Pepperjam CODE-->
<script>
<!--<script>
(function () {
var a = document.createElement("script");
a.type = "text/javascript", a.async = !0, a.src = "//container.pepperjam.com/4135755510.js";
@ -62,10 +62,10 @@
b.parentNode.insertBefore(a, b)
}
})();
</script>
</script>-->
<!--END Pepperjam CODE-->
<!-- Criteo Homepage Tag -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<!--<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
@ -75,7 +75,7 @@
{ event: "setSiteType", type: deviceType },
// { event: "viewHome" }
);
</script>
</script>-->
<!-- END Criteo Home Page Tag -->
</body>

View File

@ -99,7 +99,6 @@
<script>
import Header from "@/components/layout/header/Header";
import {
googleAanalyticsEventCategory,
customAttributeValueNew,
getCategoryOne,
} from "@/services/util.service";
@ -165,9 +164,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;
},
@ -291,12 +288,12 @@ export default {
categoryOne.customAttributes,
"url_path"
);
console.log(categoryOne.name, categoryOne);
googleAanalyticsEventCategory(
// console.log(categoryOne.name, categoryOne);
/*googleAanalyticsEventCategory(
"browse_category",
"ecommerce",
categoryOne
);
);*/
let pagePath = this.$route.path;
let isGateModulePage = pagePath.includes("/gate/");
if (isGateModulePage) {
@ -329,16 +326,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);
}
}
},
};

View File

@ -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;
},
@ -633,7 +631,7 @@ export default {
categoryOne.customAttributes,
"url_path"
);*/
console.log(categoryOne.n, categoryOne);
// console.log(categoryOne.n, categoryOne);
let vm = this;
goToCategoryPageRouting(vm, categoryOne);
this.$store
@ -695,12 +693,7 @@ 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;
localStorage.setItem("cr_userVisitCount", userVisits);

View File

@ -118,7 +118,7 @@
<script>
import SnackbarComponent from "@/components/common/SnackbarComponent";
import SubscriptionDialog from "@/components/common/SubscriptionDialog";
import { listrakSubscribe } from "@/services/util.service";
//import { listrakSubscribe } from "@/services/util.service";
export default {
name: "FooterComponent",
components: { SnackbarComponent, SubscriptionDialog },
@ -163,7 +163,7 @@ export default {
},
submit: function () {
if (this.$refs.footerForm.validate()) {
listrakSubscribe(this.email);
// listrakSubscribe(this.email);
this.snackbar = {
message: "you have successfully subscribed.",
color: "success",

View File

@ -645,7 +645,7 @@ import { doFetchCatelogProducts } from "@/services/product.service";
import HeaderPromoBanner from "@/components/layout/header/HeaderPromoBanner";
import {
customAttributeValueNew,
googleAanalyticsEventCategory,
// googleAanalyticsEventCategory,
getCategoryOne,
goToCategoryPageRouting,
} from "@/services/util.service";
@ -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,9 +856,7 @@ export default {
showCartDrawer(flag) {
if (this.userAuth) {
this.$store.dispatch("userCartProduct/cartDrawer", flag);
} else {
this.$store.dispatch("cartProduct/cartDrawer", flag);
}
}
},
showMessage(obj) {
@ -960,7 +956,7 @@ export default {
getCustomAttributeValue(customAttributes, attributeCode) {
return customAttributeValueNew(customAttributes, attributeCode);
},
async categoryProducts(categoryId, categoryDetails) {
async categoryProducts(categoryId) {
if (this.categoryDetailsList) {
let categoryOne = await getCategoryOne(
this.categoryDetailsList,
@ -971,11 +967,11 @@ export default {
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
this.activeCategoryMenu = categoryId;
console.log(categoryOne.n, categoryOne);
googleAanalyticsEventCategory(
/* googleAanalyticsEventCategory(
"browse_category",
"ecommerce",
categoryDetails
);
);*/
localStorage.setItem("cr_mainCategoryId", categoryId);
localStorage.removeItem("cr_subCategoryItemId");
localStorage.removeItem("cr_subCategoryId");

View File

@ -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,9 +215,7 @@ 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/");
if (isGateModulePage) {
@ -249,9 +245,7 @@ export default {
// this.cartDrawer=false;
if (this.userAuth) {
this.$store.dispatch("userCartProduct/cartDrawer", false);
} else {
this.$store.dispatch("cartProduct/cartDrawer", false);
}
}
},
stopPropogation(event) {
event.stopPropagation();
@ -259,9 +253,7 @@ export default {
closeCartDrawer(flag) {
if (this.userAuth) {
this.$store.dispatch("userCartProduct/cartDrawer", flag);
} else {
this.$store.dispatch("cartProduct/cartDrawer", flag);
}
}
},
resizeCart() {
return this.sideBarHeight() && this.productListHeight();

View File

@ -17,7 +17,7 @@
"
>
<p
@click="subCategory(subcategorys.id, subcategorys)"
@click="subCategory(subcategorys.id)"
:class="subcategorys.childrenData != '' ? '' : 'mb-1'"
class="cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text"
>
@ -44,8 +44,7 @@
@click="
subCategoryProducts(
items.id,
subcategorys.id,
items
subcategorys.id
)
"
>{{ items.name }}</v-list-item-title
@ -68,7 +67,7 @@
"
>
<p
@click="subCategory(subcategorys.id, subcategorys)"
@click="subCategory(subcategorys.id)"
class="pb-0 cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text"
>
{{ subcategorys.name }}
@ -112,7 +111,7 @@
</v-card>
</template>
<script>
import { googleAanalyticsEventCategory } from "@/services/util.service";
//import { googleAanalyticsEventCategory } from "@/services/util.service";
export default {
name: "subMenu",
props: ["subCategoryList", "mainMenu", "subMenuItem"],
@ -131,14 +130,14 @@ export default {
pageName() {
return this.$route.name;
},
subCategory(subCategoryId, categoryDetails) {
subCategory(subCategoryId) {
// let subCategoryIdItem = "";
this.$emit("onActionScrollSub");
googleAanalyticsEventCategory(
"browse_category",
"ecommerce",
categoryDetails
);
// googleAanalyticsEventCategory(
// "browse_category",
// "ecommerce",
// categoryDetails
// );
this.$emit("action", {
mainMenu: this.mainMenu,
subMenu: subCategoryId,
@ -156,14 +155,14 @@ export default {
});
},
subCategoryProducts(subCategoryIdItem, subCategoryId, categoryDetails) {
subCategoryProducts(subCategoryIdItem, subCategoryId) {
//this.subMenu = categoryId;
this.$emit("onActionScrollSub");
googleAanalyticsEventCategory(
"browse_category",
"ecommerce",
categoryDetails
);
// googleAanalyticsEventCategory(
// "browse_category",
// "ecommerce",
// categoryDetails
// );
this.$emit("action", {
mainMenu: this.mainMenu,
subMenu: subCategoryId,

View File

@ -42,9 +42,7 @@ export default {
verifyAddress: function() {
if (this.userAuth) {
return this.$store.state.accountOne.address;
} else {
return this.$store.state.guestInfo.address;
}
}
},
countryAndStatesList() {
return this.$store.state.accountOne.allCountries;

View File

@ -66,16 +66,12 @@ 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() {
return this.$store.state.accountOne.allCountries;
@ -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;
}
},
},

View File

@ -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 ''
}
},
},

View File

@ -23,7 +23,7 @@ import {
customAttributeValue,
goToCategoryPageRouting,
getCategoryOne,
googleAanalyticsEventCategory,
// googleAanalyticsEventCategory,
} from "@/services/util.service";
import { mapState } from "vuex";
@ -123,10 +123,10 @@ export default {
this.$store.dispatch("layout/setHeroContent", categoryOne);
console.log(categoryOne.n, categoryOne);
let vm = this;
googleAanalyticsEventCategory("browse_category", "ecommerce", {
name: categoryOne.n,
id: categoryId,
});
// googleAanalyticsEventCategory("browse_category", "ecommerce", {
// name: categoryOne.n,
// id: categoryId,
// });
goToCategoryPageRouting(vm, categoryOne);
this.$store
.dispatch("catalogBrowser/search", {

View File

@ -561,7 +561,7 @@ import {
customAttributeValue,
priceFormatter,
checkPromotion,
googleAanalyticsEventRemoveCart
// googleAanalyticsEventRemoveCart
} from "@/services/util.service";
import ConfirmationDialog from "@/components/common/ConfirmationDialog";
import { doFetchProductTags } from "@/services/product.service";
@ -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;
},*/
@ -642,19 +640,15 @@ export default {
},
watch: {
cartItems() {
this.calledListrakCartList();
// this.calledListrakCartList();
},
},
methods: {
calledListrakCartList() {
/* calledListrakCartList() {
if (this.userAuth) {
this.$store.dispatch("userCartProduct/setListrakCartList");
} else {
if (this.guestQuoteId) {
this.$store.dispatch("cartProduct/setListrakCartList");
}
}
},
}
},*/
changeCheckoutFlag(flag) {
this.$emit("stockFlag", flag);
},
@ -1136,7 +1130,7 @@ export default {
await this.$store.dispatch("userCartProduct/removeCartProduct", {
productId: this.productId,
});
googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
// googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
removeCookieByName(this.productId);
this.snackbar = {
message: "Product Removed Successfully",
@ -1158,9 +1152,8 @@ export default {
await this.$store.dispatch(
"cartProduct/removeCartProduct",
this.productId
//guestQuoteId: this.guestQuoteId
);
googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
//googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
removeCookieByName(this.productId);
this.snackbar = {
message: "Product Removed Successfully",

View File

@ -195,7 +195,7 @@
import { doFetchCatelogProducts } from "@/services/product.service";
import {
customAttributeValueNew,
googleAanalyticsEventCategory,
//googleAanalyticsEventCategory,
goToCategoryPageRouting,
getCategoryOne,
} from "@/services/util.service";
@ -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;
},
@ -352,7 +350,7 @@ export default {
this.search = null;
}
},
async categoryProducts(categoryId, categoryDetails) {
async categoryProducts(categoryId) {
if (this.categoryDetailsList) {
let categoryOne = await getCategoryOne(
this.categoryDetailsList,
@ -363,11 +361,11 @@ export default {
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
console.log(categoryOne.n, categoryOne);
this.activeCategoryMenu = categoryId;
googleAanalyticsEventCategory(
"browse_category",
"ecommerce",
categoryDetails
);
// googleAanalyticsEventCategory(
// "browse_category",
// "ecommerce",
// categoryDetails
// );
localStorage.setItem("cr_mainCategoryId", categoryId);
localStorage.removeItem("cr_subCategoryItemId");
localStorage.removeItem("cr_subCategoryId");

View File

@ -383,7 +383,7 @@ const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
const retailorId = process.env.VUE_APP_RETAILOR_ID;
import * as easings from "vuetify/es5/services/goto/easing-patterns";
import SnackbarComponent from "@/components/common/SnackbarComponent";
import { getLable, customAttributeValue ,googleAanalytics,setCategoryNameInLocal} from "@/services/util.service";
import { getLable, customAttributeValue ,setCategoryNameInLocal} from "@/services/util.service";
//import { getAuthUser } from "@/services/auth";
export default {
productDefaultImage:require('@/assets/defaultProduct.jpg'),
@ -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;
@ -606,7 +604,7 @@ export default {
optionValue: this.optionValue
})
.then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId)
{
setCategoryNameInLocal(this.categoryId,res);
@ -651,7 +649,7 @@ export default {
optionValue: this.optionValue
})
.then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId)
{
setCategoryNameInLocal(this.categoryId,res);
@ -736,7 +734,6 @@ export default {
.dispatch("cartProduct/updateToConfiguredCart", {
sku: sku,
qty: this.selectedQty,
//guestQuote: this.guestQuoteId,
itemId: this.itemId,
typeId: typeId,
optionId: optionId,

View File

@ -492,7 +492,7 @@
<script>
//const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
import SnackbarComponent from "@/components/common/SnackbarComponent";
import { getLable ,googleAanalytics,customAttributeValue,setCategoryNameInLocal} from "@/services/util.service";
import { getLable ,customAttributeValue,setCategoryNameInLocal} from "@/services/util.service";
import { createHelpers } from "vuex-map-fields";
import * as easings from "vuetify/es5/services/goto/easing-patterns";
@ -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;
@ -694,7 +692,7 @@ export default {
senderEmail: this.one.email
})
.then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId)
{
setCategoryNameInLocal(this.categoryId,res);
@ -724,7 +722,7 @@ export default {
qty: this.selectedQty
})
.then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId)
{
setCategoryNameInLocal(this.categoryId,res);
@ -774,31 +772,7 @@ export default {
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,
color: "error",
show: true,
timeout: 3000
};
}
}
}
if(this.$route.name == productName)
this.$router.push({
name: productName,
@ -831,12 +805,7 @@ export default {
await this.$store.dispatch("userCartProduct/fetchGiftMessage", {
itemId: this.itemId
});
} else {
this.$store.dispatch("cartProduct/fetchGiftMessage", {
guestQuote: this.guestQuoteId,
itemId: this.itemId
});
}
}
}
}
},

View File

@ -450,7 +450,7 @@ const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
const retailorId = process.env.VUE_APP_RETAILOR_ID;
import * as easings from "vuetify/es5/services/goto/easing-patterns";
import SnackbarComponent from "@/components/common/SnackbarComponent";
import { priceFormatter, getLable, customAttributeValue ,googleAanalytics,googleAanalyticsEvent, criteoForCurrentProduct ,setCategoryNameInLocal} from "@/services/util.service";
import { priceFormatter, getLable, customAttributeValue , /*criteoForCurrentProduct, */setCategoryNameInLocal} from "@/services/util.service";
//import { getAuthUser } from "@/services/auth";
/* eslint-disable no-alert, no-console , no-debugger */
export default {
@ -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;
@ -602,7 +600,7 @@ export default {
watch: {
productDetails() {
this.imagepath = this.productDetails.mediaGalleryEntries && this.productDetails.mediaGalleryEntries.length ? this.productDetails.mediaGalleryEntries[0].file:"";
criteoForCurrentProduct(this.productDetails.id);
// criteoForCurrentProduct(this.productDetails.id);
}
/* qtyPriceOptions()
{
@ -632,7 +630,7 @@ export default {
personalizeDetails: null
})
.then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId)
{
setCategoryNameInLocal(this.categoryId,res);
@ -678,7 +676,7 @@ export default {
personalizeDetails: null
})
.then((res) => {
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
if(this.categoryId)
{
setCategoryNameInLocal(this.categoryId,res);
@ -761,7 +759,6 @@ export default {
.dispatch("cartProduct/updateToCart", {
sku: sku,
qty: this.selectedQty,
//guestQuote: this.guestQuoteId,
itemId: this.itemId,
ccid: null,
price: null,
@ -837,7 +834,7 @@ export default {
"builder_version"
) === ""
) {
googleAanalyticsEvent('personalize_cc', 'ecommerce', productDetails);
// googleAanalyticsEvent('personalize_cc', 'ecommerce', productDetails);
this.$router.push({
name: "CraneConnection",
params: {
@ -848,7 +845,7 @@ export default {
});
} else {
let itemCode = this.itemId ? this.itemId : "new";
googleAanalyticsEvent('personalize_builder', 'ecommerce', productDetails);
//googleAanalyticsEvent('personalize_builder', 'ecommerce', productDetails);
debugger
if(this.categoryId)
{

View File

@ -213,7 +213,7 @@
sm="4"
cols="12"
class="pr-lg-4 cursor-pointer pt-lg-6"
@click="gotoProductDetails(product.n,product)"
@click="gotoProductDetails(product.n)"
>
<v-img
:src="imageBasePathUrl + product.i + imageBaseParams"
@ -325,10 +325,7 @@ import { createHelpers } from "vuex-map-fields";
import { mapState } from "vuex";
import CategoryHeroContent from "@/components/retailer/category/CategoryHeroContent";
import FilterComponent from "../filter/FilterComponent";
import {
googleAanalyticsEventCategoryPage,
googleAanalyticsEventSelectContent
} from "@/services/util.service";
const { mapFields } = createHelpers({
getterType: "catalogBrowser/getField",
mutationType: "catalogBrowser/updateField"
@ -409,13 +406,13 @@ export default {
}
},
searchResults(){
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
keywords(){
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
categoryId(){
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
pageSize() {
if (this.pageSize != "ALL" && this.totalProducts) {
@ -455,7 +452,7 @@ export default {
});
this.pageNumber=1;
this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
setFilterValue() {
@ -466,7 +463,7 @@ export default {
this.closeFilterMenu = true;
this.pageNumber=1;
this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
async actionClear() {
@ -480,8 +477,8 @@ export default {
}
}, 200);
},
gotoProductDetails(productName,product) {
googleAanalyticsEventSelectContent('select_content',product,this.categoryId)
gotoProductDetails(productName) {
// googleAanalyticsEventSelectContent('select_content',product,this.categoryId)
this.$router.push({
name: productName,
query: {
@ -491,16 +488,16 @@ export default {
},
pageViewChange() {
this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
//googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
pageSizeWiseProduct() {
this.updatePageNumber();
this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
sortAndNextPage() {
this.$emit("criteriaChanged");
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
//googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
},
scrollToTop() {
window.scrollTo(0, 0);
@ -523,7 +520,7 @@ export default {
created() {
if(this.searchTerms)
{
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
}
if (this.totalProducts)
this.totalVisiblePages = Math.ceil(

View File

@ -6,12 +6,9 @@ import vuetify from './plugins/vuetify'
import "vuetify/dist/vuetify.min.css";
import router from './multipages'
import store from '@/stores';
import VueGtag from "vue-gtag";
import VueGtm from 'vue-gtm';
import VueMeta from 'vue-meta'
const gtagId = process.env.VUE_APP_GTAG_ID;
const gaId = process.env.VUE_APP_GA_ID;
Vue.use(VueCookies);
// Vue.use(VueTelInput);
@ -19,36 +16,14 @@ Vue.use(VueCookies);
// Vue.use(VueGoogleMaps, {
// load: { key: 'AIzaSyDmHp0PPuKHD1KGHCDmLq1qQKr_03XKEHo', libraries: ['places', 'geometry'] }
// });
Vue.use(VueGtm, {
id: gtagId, // Your GTM single container ID or array of container ids ['GTM-xxxxxx', 'GTM-yyyyyy']
// queryParams: { // Add url query string when load gtm.js with GTM ID (optional)
// gtm_auth:'AB7cDEf3GHIjkl-MnOP8qr',
// gtm_preview:'env-4',
// gtm_cookies_win:'x'
// },
defer: false, // defaults to false. Script can be set to `defer` to increase page-load-time at the cost of less accurate results (in case visitor leaves before script is loaded, which is unlikely but possible)
enabled: true, // defaults to true. Plugin can be disabled by setting this to false for Ex: enabled: !!GDPR_Cookie (optional)
debug: false, // Whether or not display console logs debugs (optional)
loadScript: true, // Whether or not to load the GTM Script (Helpful if you are including GTM manually, but need the dataLayer functionality in your components) (optional)
vueRouter: router, // Pass the router instance to automatically sync with router (optional)
// ignoredViews: ['main', 'homepage'], // Don't trigger events for specified router names (case insensitive) (optional)
trackOnNextTick: false, // Whether or not call trackView in Vue.nextTick
});
Vue.use(VueMeta, {
// optional pluginOptions
refreshOnceOnNavigation: true
})
Vue.use(VueGtag, {
config: {
id: gaId, params: {
send_page_view: true
}
}
}, router);
Vue.config.productionTip = false

View File

@ -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;
@ -286,19 +283,15 @@ export default {
watch: {
cartProductsItem() {
this.stockFlagHideShow();
this.calledCriteoViewBasket();
// this.calledCriteoViewBasket();
},
},
methods: {
calledCriteoViewBasket() {
/* calledCriteoViewBasket() {
if (this.userAuth) {
this.$store.dispatch("userCartProduct/setCriteoViewBasket");
} else {
if (this.guestQuoteId) {
this.$store.dispatch("cartProduct/setCriteoViewBasket");
}
}
},
},*/
removeMinus(val) {
if (val) return val.toString().substring(1);
},

View File

@ -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,16 +1170,15 @@ 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,
// googleAanalyticsPurchase,
// googleAanalyticsCheckout,
// checkEncodeURI,
priceFormatter,
fetchStates,
googleAanalyticsCheckoutAddShippingInfo,
googleAanalyticsCheckoutAddPaymentInfo,
// googleAanalyticsCheckoutAddShippingInfo,
// googleAanalyticsCheckoutAddPaymentInfo,
} from "@/services/util.service";
const braintreeAuthKey = process.env.VUE_APP_BRAINTREE_AUTH_KEY;
@ -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;
},
@ -1433,11 +1429,11 @@ export default {
let cartList = [];
if (this.userAuth) {
cartList = this.$store.state.userCartProduct.cartProductList;
googleAanalyticsCheckout("begin_checkout", { items: cartList });
// googleAanalyticsCheckout("begin_checkout", { items: cartList });
return cartList;
} else {
cartList = this.$store.state.cartProduct.cartProductList;
googleAanalyticsCheckout("begin_checkout", { items: cartList });
// googleAanalyticsCheckout("begin_checkout", { items: cartList });
return cartList;
}
},
@ -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;
}
@ -1974,11 +1914,11 @@ export default {
googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1,
checkout_option: "shipping method",
});*/
});
googleAanalyticsCheckoutAddShippingInfo(
"add_shipping_info",
this.cartProductsItem
);
);*/
this.valid = true;
this.tabs = "reviewTab";
}
@ -1993,11 +1933,11 @@ export default {
googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1,
checkout_option: "shipping method",
});*/
});
googleAanalyticsCheckoutAddShippingInfo(
"add_shipping_info",
this.cartProductsItem
);
);*/
this.valid = true;
this.tabs = "reviewTab";
}
@ -2022,11 +1962,11 @@ export default {
googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1,
checkout_option: "shipping method",
});*/
});
googleAanalyticsCheckoutAddShippingInfo(
"add_shipping_info",
this.cartProductsItem
);
);*/
this.$store.dispatch("guestInfo/setShippingInformation", {
method: this.estimatedShipping,
@ -2180,13 +2120,13 @@ export default {
googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1,
checkout_option: "payment",
});*/
});
googleAanalyticsCheckoutAddPaymentInfo(
"add_payment_info",
resp
);
googleAanalyticsPurchase(resp, resp.incrementId);
googleAanalyticsPurchase(resp, resp.incrementId);*/
let shippingAddress = [];
let ccid = "";
let webOrderNumber = resp.incrementId;
@ -2294,13 +2234,13 @@ export default {
googleAanalyticsCheckout("set_checkout_option", {
checkout_step: 1,
checkout_option: "payment",
});*/
});
googleAanalyticsCheckoutAddPaymentInfo(
"add_payment_info",
resp
);
googleAanalyticsPurchase(resp, resp.incrementId);
googleAanalyticsPurchase(resp, resp.incrementId);*/
let shippingAddress = [];
let ccid = "";
let webOrderNumber = resp.incrementId;

View File

@ -118,11 +118,11 @@
</v-col>
</v-row>
</v-container>
<img
<!--<img
src="https://fp.listrakbi.com/fp/yJ3fjhPTdCKx.jpg"
height="1"
width="1"
/>
/>-->
<FooterComponent />
</div>
</template>
@ -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,13 +234,7 @@ 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);
}
}
},
};
</script>

View File

@ -57,7 +57,7 @@ import ProductDetailComponent from "@/components/retailer/product-detail/Product
import ConfiguredProductDetailComponent from "@/components/retailer/product-detail/ConfiguredProductDetailComponent";
import GiftCardDetailsComponent from "@/components/retailer/product-detail/GiftCardDetailsComponent";
import FooterComponent from "@/components/layout/footer/FooterComponent";
import { getMeta, googleAanalyticsEventPDP } from "@/services/util.service";
import { getMeta } from "@/services/util.service";
export default {
name: "ProductPage",
components: {
@ -144,11 +144,11 @@ export default {
},
productDetails() {
if (this.productDetails.name) {
googleAanalyticsEventPDP(
this.productDetails,
"view_item",
this.categoryId
);
// googleAanalyticsEventPDP(
// this.productDetails,
// "view_item",
// this.categoryId
// );
if (
this.productDetails.stockDetails.backorders == 0 &&
this.productDetails.stockDetails.qty <= 0

View File

@ -41,11 +41,11 @@ const beforeEachRoute = (to, from, next) =>{
}
try {
let path = to.path;
console.log("to path", to);
// console.log("to path", to);
if (path.includes("shop/category")) {
let routeSplit = path.split("/");
let newCategoryRoute = routeSplit.slice(3, routeSplit.length - 5).join("/");
console.log("new route", newCategoryRoute);
// console.log("new route", newCategoryRoute);
next({ path: "/" + newCategoryRoute });
}
} catch (error) {

View File

@ -4,7 +4,7 @@ import { invalidPoBoxAddress } from '@/services/util.service';
import { doFetchQuote } from '@/services/user_cart.service';
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
import { criteoUpdateUserEmail } from "@/services/util.service";
//import { criteoUpdateUserEmail } from "@/services/util.service";
/*eslint-disable*/
const addresses = {
@ -74,7 +74,7 @@ export const accountOne = {
state.countryWiseStates = countryWiseStates
},
setOne(state, one) {
criteoUpdateUserEmail(one.email)
// criteoUpdateUserEmail(one.email)
state.one = Object.assign({}, state.one, defaultAddress, one);
let customerNumber=state.one.customAttributes
.filter((customAttribute)=>customAttribute.attributeCode==="customer_number")[0]

View File

@ -20,7 +20,7 @@ import {
import { getField, updateField } from 'vuex-map-fields';
import humps from 'lodash-humps';
import { getAuthUser } from '@/services/auth';
import { criteoViewBasket ,listrakCartList,listrakCartListClear} from "@/services/util.service";
//import { criteoViewBasket ,listrakCartList,listrakCartListClear} from "@/services/util.service";
/* eslint-disable no-alert, no-console , no-debugger */
export const userCartProduct = {
namespaced: true,
@ -77,15 +77,15 @@ export const userCartProduct = {
state.cartProductList = list
// criteoViewBasket(list);
},
setCriteoViewBasket(state) {
/* setCriteoViewBasket(state) {
criteoViewBasket(state.cartProductList);
},
setListrakCartList(state) {
setListrakCartList(state) {
listrakCartList(state.cartProductList);
},
setListrakCartListClear(){
listrakCartListClear()
},
},*/
setCartProductDetails(state, details) {
state.cartProductDetails = details
},
@ -208,7 +208,7 @@ export const userCartProduct = {
commit('cartTotalAmtProgress', false);
commit('setCartDrawer', false);
await dispatch('cartProductList');
dispatch('setListrakCartListClear')
// dispatch('setListrakCartListClear')
}
} catch (err) {
@ -367,13 +367,13 @@ export const userCartProduct = {
}
}, 3000);
},
setCriteoViewBasket: async({ commit ,state}) => {
/* setCriteoViewBasket: async({ commit ,state}) => {
if(state.cartProductList.length > 0)
{
commit('setCriteoViewBasket');
}
},
setListrakCartList: async({ commit ,state}) => {
setListrakCartList: async({ commit ,state}) => {
if(state.cartProductList.length > 0)
{
commit('setListrakCartList');
@ -384,6 +384,6 @@ export const userCartProduct = {
{
commit('setListrakCartListClear');
}
},
},*/
}
}