Merge branch 'beta' of git.treelet.net:crane/retailer-vue into dev
This commit is contained in:
commit
ce10ce4d3c
|
@ -30,8 +30,6 @@
|
||||||
"lodash-humps": "^3.1.5",
|
"lodash-humps": "^3.1.5",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-cookies": "^1.5.13",
|
"vue-cookies": "^1.5.13",
|
||||||
"vue-gtag": "^1.8.0",
|
|
||||||
"vue-gtm": "3.0.0-vue2",
|
|
||||||
"vue-meta": "^2.4.0",
|
"vue-meta": "^2.4.0",
|
||||||
"vue-router": "^3.2.0",
|
"vue-router": "^3.2.0",
|
||||||
"vue-tel-input": "^4.4.0",
|
"vue-tel-input": "^4.4.0",
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
|
|
||||||
<!-- Listrak Analytics – Javascript Framework -->
|
<!-- Listrak Analytics – Javascript Framework -->
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
var biJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
|
var biJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
|
||||||
(function (d, s, id, tid, vid) {
|
(function (d, s, id, tid, vid) {
|
||||||
var js, ljs = d.getElementsByTagName(s)[0];
|
var js, ljs = d.getElementsByTagName(s)[0];
|
||||||
|
@ -49,9 +49,9 @@
|
||||||
js.src = biJsHost + "cdn.listrakbi.com/scripts/script.js?m=" + tid + "&v=" + vid;
|
js.src = biJsHost + "cdn.listrakbi.com/scripts/script.js?m=" + tid + "&v=" + vid;
|
||||||
ljs.parentNode.insertBefore(js, ljs);
|
ljs.parentNode.insertBefore(js, ljs);
|
||||||
})(document, 'script', 'ltkSDK', 'yJ3fjhPTdCKx', '1');
|
})(document, 'script', 'ltkSDK', 'yJ3fjhPTdCKx', '1');
|
||||||
</script>
|
</script>-->
|
||||||
<!--START Pepperjam CODE-->
|
<!--START Pepperjam CODE-->
|
||||||
<script>
|
<!--<script>
|
||||||
(function () {
|
(function () {
|
||||||
var a = document.createElement("script");
|
var a = document.createElement("script");
|
||||||
a.type = "text/javascript", a.async = !0, a.src = "//container.pepperjam.com/4135755510.js";
|
a.type = "text/javascript", a.async = !0, a.src = "//container.pepperjam.com/4135755510.js";
|
||||||
|
@ -62,10 +62,10 @@
|
||||||
b.parentNode.insertBefore(a, b)
|
b.parentNode.insertBefore(a, b)
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>-->
|
||||||
<!--END Pepperjam CODE-->
|
<!--END Pepperjam CODE-->
|
||||||
<!-- Criteo Homepage Tag -->
|
<!-- 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">
|
<script type="text/javascript">
|
||||||
window.criteo_q = window.criteo_q || [];
|
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";
|
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: "setSiteType", type: deviceType },
|
||||||
// { event: "viewHome" }
|
// { event: "viewHome" }
|
||||||
);
|
);
|
||||||
</script>
|
</script>-->
|
||||||
<!-- END Criteo Home Page Tag -->
|
<!-- END Criteo Home Page Tag -->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,6 @@
|
||||||
<script>
|
<script>
|
||||||
import Header from "@/components/layout/header/Header";
|
import Header from "@/components/layout/header/Header";
|
||||||
import {
|
import {
|
||||||
googleAanalyticsEventCategory,
|
|
||||||
customAttributeValueNew,
|
customAttributeValueNew,
|
||||||
getCategoryOne,
|
getCategoryOne,
|
||||||
} from "@/services/util.service";
|
} from "@/services/util.service";
|
||||||
|
@ -165,9 +164,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;
|
||||||
},
|
},
|
||||||
|
@ -291,12 +288,12 @@ export default {
|
||||||
categoryOne.customAttributes,
|
categoryOne.customAttributes,
|
||||||
"url_path"
|
"url_path"
|
||||||
);
|
);
|
||||||
console.log(categoryOne.name, categoryOne);
|
// console.log(categoryOne.name, categoryOne);
|
||||||
googleAanalyticsEventCategory(
|
/*googleAanalyticsEventCategory(
|
||||||
"browse_category",
|
"browse_category",
|
||||||
"ecommerce",
|
"ecommerce",
|
||||||
categoryOne
|
categoryOne
|
||||||
);
|
);*/
|
||||||
let pagePath = this.$route.path;
|
let pagePath = this.$route.path;
|
||||||
let isGateModulePage = pagePath.includes("/gate/");
|
let isGateModulePage = pagePath.includes("/gate/");
|
||||||
if (isGateModulePage) {
|
if (isGateModulePage) {
|
||||||
|
@ -329,16 +326,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;
|
||||||
},
|
},
|
||||||
|
@ -633,7 +631,7 @@ export default {
|
||||||
categoryOne.customAttributes,
|
categoryOne.customAttributes,
|
||||||
"url_path"
|
"url_path"
|
||||||
);*/
|
);*/
|
||||||
console.log(categoryOne.n, categoryOne);
|
// console.log(categoryOne.n, categoryOne);
|
||||||
let vm = this;
|
let vm = this;
|
||||||
goToCategoryPageRouting(vm, categoryOne);
|
goToCategoryPageRouting(vm, categoryOne);
|
||||||
this.$store
|
this.$store
|
||||||
|
@ -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;
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
<script>
|
<script>
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
||||||
import SubscriptionDialog from "@/components/common/SubscriptionDialog";
|
import SubscriptionDialog from "@/components/common/SubscriptionDialog";
|
||||||
import { listrakSubscribe } from "@/services/util.service";
|
//import { listrakSubscribe } from "@/services/util.service";
|
||||||
export default {
|
export default {
|
||||||
name: "FooterComponent",
|
name: "FooterComponent",
|
||||||
components: { SnackbarComponent, SubscriptionDialog },
|
components: { SnackbarComponent, SubscriptionDialog },
|
||||||
|
@ -163,7 +163,7 @@ export default {
|
||||||
},
|
},
|
||||||
submit: function () {
|
submit: function () {
|
||||||
if (this.$refs.footerForm.validate()) {
|
if (this.$refs.footerForm.validate()) {
|
||||||
listrakSubscribe(this.email);
|
// listrakSubscribe(this.email);
|
||||||
this.snackbar = {
|
this.snackbar = {
|
||||||
message: "you have successfully subscribed.",
|
message: "you have successfully subscribed.",
|
||||||
color: "success",
|
color: "success",
|
||||||
|
|
|
@ -645,7 +645,7 @@ import { doFetchCatelogProducts } from "@/services/product.service";
|
||||||
import HeaderPromoBanner from "@/components/layout/header/HeaderPromoBanner";
|
import HeaderPromoBanner from "@/components/layout/header/HeaderPromoBanner";
|
||||||
import {
|
import {
|
||||||
customAttributeValueNew,
|
customAttributeValueNew,
|
||||||
googleAanalyticsEventCategory,
|
// googleAanalyticsEventCategory,
|
||||||
getCategoryOne,
|
getCategoryOne,
|
||||||
goToCategoryPageRouting,
|
goToCategoryPageRouting,
|
||||||
} from "@/services/util.service";
|
} from "@/services/util.service";
|
||||||
|
@ -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);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -960,7 +956,7 @@ export default {
|
||||||
getCustomAttributeValue(customAttributes, attributeCode) {
|
getCustomAttributeValue(customAttributes, attributeCode) {
|
||||||
return customAttributeValueNew(customAttributes, attributeCode);
|
return customAttributeValueNew(customAttributes, attributeCode);
|
||||||
},
|
},
|
||||||
async categoryProducts(categoryId, categoryDetails) {
|
async categoryProducts(categoryId) {
|
||||||
if (this.categoryDetailsList) {
|
if (this.categoryDetailsList) {
|
||||||
let categoryOne = await getCategoryOne(
|
let categoryOne = await getCategoryOne(
|
||||||
this.categoryDetailsList,
|
this.categoryDetailsList,
|
||||||
|
@ -971,11 +967,11 @@ export default {
|
||||||
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
|
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
|
||||||
this.activeCategoryMenu = categoryId;
|
this.activeCategoryMenu = categoryId;
|
||||||
console.log(categoryOne.n, categoryOne);
|
console.log(categoryOne.n, categoryOne);
|
||||||
googleAanalyticsEventCategory(
|
/* googleAanalyticsEventCategory(
|
||||||
"browse_category",
|
"browse_category",
|
||||||
"ecommerce",
|
"ecommerce",
|
||||||
categoryDetails
|
categoryDetails
|
||||||
);
|
);*/
|
||||||
localStorage.setItem("cr_mainCategoryId", categoryId);
|
localStorage.setItem("cr_mainCategoryId", categoryId);
|
||||||
localStorage.removeItem("cr_subCategoryItemId");
|
localStorage.removeItem("cr_subCategoryItemId");
|
||||||
localStorage.removeItem("cr_subCategoryId");
|
localStorage.removeItem("cr_subCategoryId");
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
@click="subCategory(subcategorys.id, subcategorys)"
|
@click="subCategory(subcategorys.id)"
|
||||||
:class="subcategorys.childrenData != '' ? '' : 'mb-1'"
|
:class="subcategorys.childrenData != '' ? '' : 'mb-1'"
|
||||||
class="cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text"
|
class="cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text"
|
||||||
>
|
>
|
||||||
|
@ -44,8 +44,7 @@
|
||||||
@click="
|
@click="
|
||||||
subCategoryProducts(
|
subCategoryProducts(
|
||||||
items.id,
|
items.id,
|
||||||
subcategorys.id,
|
subcategorys.id
|
||||||
items
|
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>{{ items.name }}</v-list-item-title
|
>{{ items.name }}</v-list-item-title
|
||||||
|
@ -68,7 +67,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<p
|
<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"
|
class="pb-0 cursor-pointer text-uppercase regular-font submenu-menu-heading pb-1 primary--text"
|
||||||
>
|
>
|
||||||
{{ subcategorys.name }}
|
{{ subcategorys.name }}
|
||||||
|
@ -112,7 +111,7 @@
|
||||||
</v-card>
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { googleAanalyticsEventCategory } from "@/services/util.service";
|
//import { googleAanalyticsEventCategory } from "@/services/util.service";
|
||||||
export default {
|
export default {
|
||||||
name: "subMenu",
|
name: "subMenu",
|
||||||
props: ["subCategoryList", "mainMenu", "subMenuItem"],
|
props: ["subCategoryList", "mainMenu", "subMenuItem"],
|
||||||
|
@ -131,14 +130,14 @@ export default {
|
||||||
pageName() {
|
pageName() {
|
||||||
return this.$route.name;
|
return this.$route.name;
|
||||||
},
|
},
|
||||||
subCategory(subCategoryId, categoryDetails) {
|
subCategory(subCategoryId) {
|
||||||
// let subCategoryIdItem = "";
|
// let subCategoryIdItem = "";
|
||||||
this.$emit("onActionScrollSub");
|
this.$emit("onActionScrollSub");
|
||||||
googleAanalyticsEventCategory(
|
// googleAanalyticsEventCategory(
|
||||||
"browse_category",
|
// "browse_category",
|
||||||
"ecommerce",
|
// "ecommerce",
|
||||||
categoryDetails
|
// categoryDetails
|
||||||
);
|
// );
|
||||||
this.$emit("action", {
|
this.$emit("action", {
|
||||||
mainMenu: this.mainMenu,
|
mainMenu: this.mainMenu,
|
||||||
subMenu: subCategoryId,
|
subMenu: subCategoryId,
|
||||||
|
@ -156,14 +155,14 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
subCategoryProducts(subCategoryIdItem, subCategoryId, categoryDetails) {
|
subCategoryProducts(subCategoryIdItem, subCategoryId) {
|
||||||
//this.subMenu = categoryId;
|
//this.subMenu = categoryId;
|
||||||
this.$emit("onActionScrollSub");
|
this.$emit("onActionScrollSub");
|
||||||
googleAanalyticsEventCategory(
|
// googleAanalyticsEventCategory(
|
||||||
"browse_category",
|
// "browse_category",
|
||||||
"ecommerce",
|
// "ecommerce",
|
||||||
categoryDetails
|
// categoryDetails
|
||||||
);
|
// );
|
||||||
this.$emit("action", {
|
this.$emit("action", {
|
||||||
mainMenu: this.mainMenu,
|
mainMenu: this.mainMenu,
|
||||||
subMenu: subCategoryId,
|
subMenu: subCategoryId,
|
||||||
|
|
|
@ -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 ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
customAttributeValue,
|
customAttributeValue,
|
||||||
goToCategoryPageRouting,
|
goToCategoryPageRouting,
|
||||||
getCategoryOne,
|
getCategoryOne,
|
||||||
googleAanalyticsEventCategory,
|
// googleAanalyticsEventCategory,
|
||||||
} from "@/services/util.service";
|
} from "@/services/util.service";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
@ -123,10 +123,10 @@ export default {
|
||||||
this.$store.dispatch("layout/setHeroContent", categoryOne);
|
this.$store.dispatch("layout/setHeroContent", categoryOne);
|
||||||
console.log(categoryOne.n, categoryOne);
|
console.log(categoryOne.n, categoryOne);
|
||||||
let vm = this;
|
let vm = this;
|
||||||
googleAanalyticsEventCategory("browse_category", "ecommerce", {
|
// googleAanalyticsEventCategory("browse_category", "ecommerce", {
|
||||||
name: categoryOne.n,
|
// name: categoryOne.n,
|
||||||
id: categoryId,
|
// id: categoryId,
|
||||||
});
|
// });
|
||||||
goToCategoryPageRouting(vm, categoryOne);
|
goToCategoryPageRouting(vm, categoryOne);
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("catalogBrowser/search", {
|
.dispatch("catalogBrowser/search", {
|
||||||
|
|
|
@ -561,7 +561,7 @@ import {
|
||||||
customAttributeValue,
|
customAttributeValue,
|
||||||
priceFormatter,
|
priceFormatter,
|
||||||
checkPromotion,
|
checkPromotion,
|
||||||
googleAanalyticsEventRemoveCart
|
// googleAanalyticsEventRemoveCart
|
||||||
} from "@/services/util.service";
|
} from "@/services/util.service";
|
||||||
import ConfirmationDialog from "@/components/common/ConfirmationDialog";
|
import ConfirmationDialog from "@/components/common/ConfirmationDialog";
|
||||||
import { doFetchProductTags } from "@/services/product.service";
|
import { doFetchProductTags } from "@/services/product.service";
|
||||||
|
@ -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;
|
||||||
},*/
|
},*/
|
||||||
|
@ -642,19 +640,15 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cartItems() {
|
cartItems() {
|
||||||
this.calledListrakCartList();
|
// this.calledListrakCartList();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
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) {
|
||||||
this.$emit("stockFlag", flag);
|
this.$emit("stockFlag", flag);
|
||||||
},
|
},
|
||||||
|
@ -1136,7 +1130,7 @@ export default {
|
||||||
await this.$store.dispatch("userCartProduct/removeCartProduct", {
|
await this.$store.dispatch("userCartProduct/removeCartProduct", {
|
||||||
productId: this.productId,
|
productId: this.productId,
|
||||||
});
|
});
|
||||||
googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
|
// googleAanalyticsEventRemoveCart('remove_from_cart',this.productDetails)
|
||||||
removeCookieByName(this.productId);
|
removeCookieByName(this.productId);
|
||||||
this.snackbar = {
|
this.snackbar = {
|
||||||
message: "Product Removed Successfully",
|
message: "Product Removed Successfully",
|
||||||
|
@ -1158,9 +1152,8 @@ 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);
|
||||||
this.snackbar = {
|
this.snackbar = {
|
||||||
message: "Product Removed Successfully",
|
message: "Product Removed Successfully",
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
import { doFetchCatelogProducts } from "@/services/product.service";
|
import { doFetchCatelogProducts } from "@/services/product.service";
|
||||||
import {
|
import {
|
||||||
customAttributeValueNew,
|
customAttributeValueNew,
|
||||||
googleAanalyticsEventCategory,
|
//googleAanalyticsEventCategory,
|
||||||
goToCategoryPageRouting,
|
goToCategoryPageRouting,
|
||||||
getCategoryOne,
|
getCategoryOne,
|
||||||
} from "@/services/util.service";
|
} from "@/services/util.service";
|
||||||
|
@ -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;
|
||||||
},
|
},
|
||||||
|
@ -352,7 +350,7 @@ export default {
|
||||||
this.search = null;
|
this.search = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async categoryProducts(categoryId, categoryDetails) {
|
async categoryProducts(categoryId) {
|
||||||
if (this.categoryDetailsList) {
|
if (this.categoryDetailsList) {
|
||||||
let categoryOne = await getCategoryOne(
|
let categoryOne = await getCategoryOne(
|
||||||
this.categoryDetailsList,
|
this.categoryDetailsList,
|
||||||
|
@ -363,11 +361,11 @@ export default {
|
||||||
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
|
let path = this.getCustomAttributeValue(categoryOne.ca, "url_path");
|
||||||
console.log(categoryOne.n, categoryOne);
|
console.log(categoryOne.n, categoryOne);
|
||||||
this.activeCategoryMenu = categoryId;
|
this.activeCategoryMenu = categoryId;
|
||||||
googleAanalyticsEventCategory(
|
// googleAanalyticsEventCategory(
|
||||||
"browse_category",
|
// "browse_category",
|
||||||
"ecommerce",
|
// "ecommerce",
|
||||||
categoryDetails
|
// categoryDetails
|
||||||
);
|
// );
|
||||||
localStorage.setItem("cr_mainCategoryId", categoryId);
|
localStorage.setItem("cr_mainCategoryId", categoryId);
|
||||||
localStorage.removeItem("cr_subCategoryItemId");
|
localStorage.removeItem("cr_subCategoryItemId");
|
||||||
localStorage.removeItem("cr_subCategoryId");
|
localStorage.removeItem("cr_subCategoryId");
|
||||||
|
|
|
@ -383,7 +383,7 @@ const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
|
||||||
const retailorId = process.env.VUE_APP_RETAILOR_ID;
|
const retailorId = process.env.VUE_APP_RETAILOR_ID;
|
||||||
import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
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";
|
//import { getAuthUser } from "@/services/auth";
|
||||||
export default {
|
export default {
|
||||||
productDefaultImage:require('@/assets/defaultProduct.jpg'),
|
productDefaultImage:require('@/assets/defaultProduct.jpg'),
|
||||||
|
@ -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;
|
||||||
|
@ -606,7 +604,7 @@ export default {
|
||||||
optionValue: this.optionValue
|
optionValue: this.optionValue
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
||||||
if(this.categoryId)
|
if(this.categoryId)
|
||||||
{
|
{
|
||||||
setCategoryNameInLocal(this.categoryId,res);
|
setCategoryNameInLocal(this.categoryId,res);
|
||||||
|
@ -651,7 +649,7 @@ export default {
|
||||||
optionValue: this.optionValue
|
optionValue: this.optionValue
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
||||||
if(this.categoryId)
|
if(this.categoryId)
|
||||||
{
|
{
|
||||||
setCategoryNameInLocal(this.categoryId,res);
|
setCategoryNameInLocal(this.categoryId,res);
|
||||||
|
@ -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,
|
||||||
|
|
|
@ -492,7 +492,7 @@
|
||||||
<script>
|
<script>
|
||||||
//const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
|
//const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
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 { createHelpers } from "vuex-map-fields";
|
||||||
import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -694,7 +692,7 @@ export default {
|
||||||
senderEmail: this.one.email
|
senderEmail: this.one.email
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
||||||
if(this.categoryId)
|
if(this.categoryId)
|
||||||
{
|
{
|
||||||
setCategoryNameInLocal(this.categoryId,res);
|
setCategoryNameInLocal(this.categoryId,res);
|
||||||
|
@ -724,7 +722,7 @@ export default {
|
||||||
qty: this.selectedQty
|
qty: this.selectedQty
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
||||||
if(this.categoryId)
|
if(this.categoryId)
|
||||||
{
|
{
|
||||||
setCategoryNameInLocal(this.categoryId,res);
|
setCategoryNameInLocal(this.categoryId,res);
|
||||||
|
@ -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
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -450,7 +450,7 @@ const personlizeUrl = process.env.VUE_APP_PERSONALIZE_URL;
|
||||||
const retailorId = process.env.VUE_APP_RETAILOR_ID;
|
const retailorId = process.env.VUE_APP_RETAILOR_ID;
|
||||||
import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
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";
|
//import { getAuthUser } from "@/services/auth";
|
||||||
/* eslint-disable no-alert, no-console , no-debugger */
|
/* eslint-disable no-alert, no-console , no-debugger */
|
||||||
export default {
|
export default {
|
||||||
|
@ -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;
|
||||||
|
@ -602,7 +600,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
productDetails() {
|
productDetails() {
|
||||||
this.imagepath = this.productDetails.mediaGalleryEntries && this.productDetails.mediaGalleryEntries.length ? this.productDetails.mediaGalleryEntries[0].file:"";
|
this.imagepath = this.productDetails.mediaGalleryEntries && this.productDetails.mediaGalleryEntries.length ? this.productDetails.mediaGalleryEntries[0].file:"";
|
||||||
criteoForCurrentProduct(this.productDetails.id);
|
// criteoForCurrentProduct(this.productDetails.id);
|
||||||
}
|
}
|
||||||
/* qtyPriceOptions()
|
/* qtyPriceOptions()
|
||||||
{
|
{
|
||||||
|
@ -632,7 +630,7 @@ export default {
|
||||||
personalizeDetails: null
|
personalizeDetails: null
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
||||||
if(this.categoryId)
|
if(this.categoryId)
|
||||||
{
|
{
|
||||||
setCategoryNameInLocal(this.categoryId,res);
|
setCategoryNameInLocal(this.categoryId,res);
|
||||||
|
@ -678,7 +676,7 @@ export default {
|
||||||
personalizeDetails: null
|
personalizeDetails: null
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
// googleAanalytics(vm,res,productDetails,qtyNew,'add_to_cart' ,'Ecommerce');
|
||||||
if(this.categoryId)
|
if(this.categoryId)
|
||||||
{
|
{
|
||||||
setCategoryNameInLocal(this.categoryId,res);
|
setCategoryNameInLocal(this.categoryId,res);
|
||||||
|
@ -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,
|
||||||
|
@ -837,7 +834,7 @@ export default {
|
||||||
"builder_version"
|
"builder_version"
|
||||||
) === ""
|
) === ""
|
||||||
) {
|
) {
|
||||||
googleAanalyticsEvent('personalize_cc', 'ecommerce', productDetails);
|
// googleAanalyticsEvent('personalize_cc', 'ecommerce', productDetails);
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "CraneConnection",
|
name: "CraneConnection",
|
||||||
params: {
|
params: {
|
||||||
|
@ -848,7 +845,7 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let itemCode = this.itemId ? this.itemId : "new";
|
let itemCode = this.itemId ? this.itemId : "new";
|
||||||
googleAanalyticsEvent('personalize_builder', 'ecommerce', productDetails);
|
//googleAanalyticsEvent('personalize_builder', 'ecommerce', productDetails);
|
||||||
debugger
|
debugger
|
||||||
if(this.categoryId)
|
if(this.categoryId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -213,7 +213,7 @@
|
||||||
sm="4"
|
sm="4"
|
||||||
cols="12"
|
cols="12"
|
||||||
class="pr-lg-4 cursor-pointer pt-lg-6"
|
class="pr-lg-4 cursor-pointer pt-lg-6"
|
||||||
@click="gotoProductDetails(product.n,product)"
|
@click="gotoProductDetails(product.n)"
|
||||||
>
|
>
|
||||||
<v-img
|
<v-img
|
||||||
:src="imageBasePathUrl + product.i + imageBaseParams"
|
:src="imageBasePathUrl + product.i + imageBaseParams"
|
||||||
|
@ -325,10 +325,7 @@ import { createHelpers } from "vuex-map-fields";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import CategoryHeroContent from "@/components/retailer/category/CategoryHeroContent";
|
import CategoryHeroContent from "@/components/retailer/category/CategoryHeroContent";
|
||||||
import FilterComponent from "../filter/FilterComponent";
|
import FilterComponent from "../filter/FilterComponent";
|
||||||
import {
|
|
||||||
googleAanalyticsEventCategoryPage,
|
|
||||||
googleAanalyticsEventSelectContent
|
|
||||||
} from "@/services/util.service";
|
|
||||||
const { mapFields } = createHelpers({
|
const { mapFields } = createHelpers({
|
||||||
getterType: "catalogBrowser/getField",
|
getterType: "catalogBrowser/getField",
|
||||||
mutationType: "catalogBrowser/updateField"
|
mutationType: "catalogBrowser/updateField"
|
||||||
|
@ -409,13 +406,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchResults(){
|
searchResults(){
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
},
|
},
|
||||||
keywords(){
|
keywords(){
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
},
|
},
|
||||||
categoryId(){
|
categoryId(){
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
},
|
},
|
||||||
pageSize() {
|
pageSize() {
|
||||||
if (this.pageSize != "ALL" && this.totalProducts) {
|
if (this.pageSize != "ALL" && this.totalProducts) {
|
||||||
|
@ -455,7 +452,7 @@ export default {
|
||||||
});
|
});
|
||||||
this.pageNumber=1;
|
this.pageNumber=1;
|
||||||
this.$emit("criteriaChanged");
|
this.$emit("criteriaChanged");
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
},
|
},
|
||||||
|
|
||||||
setFilterValue() {
|
setFilterValue() {
|
||||||
|
@ -466,7 +463,7 @@ export default {
|
||||||
this.closeFilterMenu = true;
|
this.closeFilterMenu = true;
|
||||||
this.pageNumber=1;
|
this.pageNumber=1;
|
||||||
this.$emit("criteriaChanged");
|
this.$emit("criteriaChanged");
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
|
|
||||||
},
|
},
|
||||||
async actionClear() {
|
async actionClear() {
|
||||||
|
@ -480,8 +477,8 @@ export default {
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
},
|
},
|
||||||
gotoProductDetails(productName,product) {
|
gotoProductDetails(productName) {
|
||||||
googleAanalyticsEventSelectContent('select_content',product,this.categoryId)
|
// googleAanalyticsEventSelectContent('select_content',product,this.categoryId)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: productName,
|
name: productName,
|
||||||
query: {
|
query: {
|
||||||
|
@ -491,16 +488,16 @@ export default {
|
||||||
},
|
},
|
||||||
pageViewChange() {
|
pageViewChange() {
|
||||||
this.$emit("criteriaChanged");
|
this.$emit("criteriaChanged");
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
//googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
},
|
},
|
||||||
pageSizeWiseProduct() {
|
pageSizeWiseProduct() {
|
||||||
this.updatePageNumber();
|
this.updatePageNumber();
|
||||||
this.$emit("criteriaChanged");
|
this.$emit("criteriaChanged");
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
},
|
},
|
||||||
sortAndNextPage() {
|
sortAndNextPage() {
|
||||||
this.$emit("criteriaChanged");
|
this.$emit("criteriaChanged");
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
//googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
},
|
},
|
||||||
scrollToTop() {
|
scrollToTop() {
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
@ -523,7 +520,7 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
if(this.searchTerms)
|
if(this.searchTerms)
|
||||||
{
|
{
|
||||||
googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
// googleAanalyticsEventCategoryPage(this.searchResults.page,this.categoryId)
|
||||||
}
|
}
|
||||||
if (this.totalProducts)
|
if (this.totalProducts)
|
||||||
this.totalVisiblePages = Math.ceil(
|
this.totalVisiblePages = Math.ceil(
|
||||||
|
|
27
src/main.js
27
src/main.js
|
@ -6,11 +6,8 @@ import vuetify from './plugins/vuetify'
|
||||||
import "vuetify/dist/vuetify.min.css";
|
import "vuetify/dist/vuetify.min.css";
|
||||||
import router from './multipages'
|
import router from './multipages'
|
||||||
import store from '@/stores';
|
import store from '@/stores';
|
||||||
import VueGtag from "vue-gtag";
|
|
||||||
import VueGtm from 'vue-gtm';
|
|
||||||
import VueMeta from 'vue-meta'
|
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(VueCookies);
|
||||||
|
@ -20,21 +17,6 @@ Vue.use(VueCookies);
|
||||||
// load: { key: 'AIzaSyDmHp0PPuKHD1KGHCDmLq1qQKr_03XKEHo', libraries: ['places', 'geometry'] }
|
// 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, {
|
Vue.use(VueMeta, {
|
||||||
// optional pluginOptions
|
// optional pluginOptions
|
||||||
|
@ -42,13 +24,6 @@ Vue.use(VueMeta, {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
Vue.use(VueGtag, {
|
|
||||||
config: {
|
|
||||||
id: gaId, params: {
|
|
||||||
send_page_view: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, router);
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -286,19 +283,15 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
cartProductsItem() {
|
cartProductsItem() {
|
||||||
this.stockFlagHideShow();
|
this.stockFlagHideShow();
|
||||||
this.calledCriteoViewBasket();
|
// this.calledCriteoViewBasket();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
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) {
|
||||||
if (val) return val.toString().substring(1);
|
if (val) return val.toString().substring(1);
|
||||||
},
|
},
|
||||||
|
|
|
@ -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,16 +1170,15 @@ 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,
|
||||||
googleAanalyticsCheckoutAddPaymentInfo,
|
// googleAanalyticsCheckoutAddPaymentInfo,
|
||||||
} from "@/services/util.service";
|
} from "@/services/util.service";
|
||||||
|
|
||||||
const braintreeAuthKey = process.env.VUE_APP_BRAINTREE_AUTH_KEY;
|
const braintreeAuthKey = process.env.VUE_APP_BRAINTREE_AUTH_KEY;
|
||||||
|
@ -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;
|
||||||
},
|
},
|
||||||
|
@ -1433,11 +1429,11 @@ export default {
|
||||||
let cartList = [];
|
let cartList = [];
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
cartList = this.$store.state.userCartProduct.cartProductList;
|
cartList = this.$store.state.userCartProduct.cartProductList;
|
||||||
googleAanalyticsCheckout("begin_checkout", { items: cartList });
|
// googleAanalyticsCheckout("begin_checkout", { items: cartList });
|
||||||
return cartList;
|
return cartList;
|
||||||
} else {
|
} else {
|
||||||
cartList = this.$store.state.cartProduct.cartProductList;
|
cartList = this.$store.state.cartProduct.cartProductList;
|
||||||
googleAanalyticsCheckout("begin_checkout", { items: cartList });
|
// googleAanalyticsCheckout("begin_checkout", { items: cartList });
|
||||||
return cartList;
|
return cartList;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -1974,11 +1914,11 @@ export default {
|
||||||
googleAanalyticsCheckout("set_checkout_option", {
|
googleAanalyticsCheckout("set_checkout_option", {
|
||||||
checkout_step: 1,
|
checkout_step: 1,
|
||||||
checkout_option: "shipping method",
|
checkout_option: "shipping method",
|
||||||
});*/
|
});
|
||||||
googleAanalyticsCheckoutAddShippingInfo(
|
googleAanalyticsCheckoutAddShippingInfo(
|
||||||
"add_shipping_info",
|
"add_shipping_info",
|
||||||
this.cartProductsItem
|
this.cartProductsItem
|
||||||
);
|
);*/
|
||||||
this.valid = true;
|
this.valid = true;
|
||||||
this.tabs = "reviewTab";
|
this.tabs = "reviewTab";
|
||||||
}
|
}
|
||||||
|
@ -1993,11 +1933,11 @@ export default {
|
||||||
googleAanalyticsCheckout("set_checkout_option", {
|
googleAanalyticsCheckout("set_checkout_option", {
|
||||||
checkout_step: 1,
|
checkout_step: 1,
|
||||||
checkout_option: "shipping method",
|
checkout_option: "shipping method",
|
||||||
});*/
|
});
|
||||||
googleAanalyticsCheckoutAddShippingInfo(
|
googleAanalyticsCheckoutAddShippingInfo(
|
||||||
"add_shipping_info",
|
"add_shipping_info",
|
||||||
this.cartProductsItem
|
this.cartProductsItem
|
||||||
);
|
);*/
|
||||||
this.valid = true;
|
this.valid = true;
|
||||||
this.tabs = "reviewTab";
|
this.tabs = "reviewTab";
|
||||||
}
|
}
|
||||||
|
@ -2022,11 +1962,11 @@ export default {
|
||||||
googleAanalyticsCheckout("set_checkout_option", {
|
googleAanalyticsCheckout("set_checkout_option", {
|
||||||
checkout_step: 1,
|
checkout_step: 1,
|
||||||
checkout_option: "shipping method",
|
checkout_option: "shipping method",
|
||||||
});*/
|
});
|
||||||
googleAanalyticsCheckoutAddShippingInfo(
|
googleAanalyticsCheckoutAddShippingInfo(
|
||||||
"add_shipping_info",
|
"add_shipping_info",
|
||||||
this.cartProductsItem
|
this.cartProductsItem
|
||||||
);
|
);*/
|
||||||
|
|
||||||
this.$store.dispatch("guestInfo/setShippingInformation", {
|
this.$store.dispatch("guestInfo/setShippingInformation", {
|
||||||
method: this.estimatedShipping,
|
method: this.estimatedShipping,
|
||||||
|
@ -2180,13 +2120,13 @@ export default {
|
||||||
googleAanalyticsCheckout("set_checkout_option", {
|
googleAanalyticsCheckout("set_checkout_option", {
|
||||||
checkout_step: 1,
|
checkout_step: 1,
|
||||||
checkout_option: "payment",
|
checkout_option: "payment",
|
||||||
});*/
|
});
|
||||||
|
|
||||||
googleAanalyticsCheckoutAddPaymentInfo(
|
googleAanalyticsCheckoutAddPaymentInfo(
|
||||||
"add_payment_info",
|
"add_payment_info",
|
||||||
resp
|
resp
|
||||||
);
|
);
|
||||||
googleAanalyticsPurchase(resp, resp.incrementId);
|
googleAanalyticsPurchase(resp, resp.incrementId);*/
|
||||||
let shippingAddress = [];
|
let shippingAddress = [];
|
||||||
let ccid = "";
|
let ccid = "";
|
||||||
let webOrderNumber = resp.incrementId;
|
let webOrderNumber = resp.incrementId;
|
||||||
|
@ -2294,13 +2234,13 @@ export default {
|
||||||
googleAanalyticsCheckout("set_checkout_option", {
|
googleAanalyticsCheckout("set_checkout_option", {
|
||||||
checkout_step: 1,
|
checkout_step: 1,
|
||||||
checkout_option: "payment",
|
checkout_option: "payment",
|
||||||
});*/
|
});
|
||||||
|
|
||||||
googleAanalyticsCheckoutAddPaymentInfo(
|
googleAanalyticsCheckoutAddPaymentInfo(
|
||||||
"add_payment_info",
|
"add_payment_info",
|
||||||
resp
|
resp
|
||||||
);
|
);
|
||||||
googleAanalyticsPurchase(resp, resp.incrementId);
|
googleAanalyticsPurchase(resp, resp.incrementId);*/
|
||||||
let shippingAddress = [];
|
let shippingAddress = [];
|
||||||
let ccid = "";
|
let ccid = "";
|
||||||
let webOrderNumber = resp.incrementId;
|
let webOrderNumber = resp.incrementId;
|
||||||
|
|
|
@ -118,11 +118,11 @@
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
<img
|
<!--<img
|
||||||
src="https://fp.listrakbi.com/fp/yJ3fjhPTdCKx.jpg"
|
src="https://fp.listrakbi.com/fp/yJ3fjhPTdCKx.jpg"
|
||||||
height="1"
|
height="1"
|
||||||
width="1"
|
width="1"
|
||||||
/>
|
/>-->
|
||||||
<FooterComponent />
|
<FooterComponent />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -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);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,7 +57,7 @@ import ProductDetailComponent from "@/components/retailer/product-detail/Product
|
||||||
import ConfiguredProductDetailComponent from "@/components/retailer/product-detail/ConfiguredProductDetailComponent";
|
import ConfiguredProductDetailComponent from "@/components/retailer/product-detail/ConfiguredProductDetailComponent";
|
||||||
import GiftCardDetailsComponent from "@/components/retailer/product-detail/GiftCardDetailsComponent";
|
import GiftCardDetailsComponent from "@/components/retailer/product-detail/GiftCardDetailsComponent";
|
||||||
import FooterComponent from "@/components/layout/footer/FooterComponent";
|
import FooterComponent from "@/components/layout/footer/FooterComponent";
|
||||||
import { getMeta, googleAanalyticsEventPDP } from "@/services/util.service";
|
import { getMeta } from "@/services/util.service";
|
||||||
export default {
|
export default {
|
||||||
name: "ProductPage",
|
name: "ProductPage",
|
||||||
components: {
|
components: {
|
||||||
|
@ -144,11 +144,11 @@ export default {
|
||||||
},
|
},
|
||||||
productDetails() {
|
productDetails() {
|
||||||
if (this.productDetails.name) {
|
if (this.productDetails.name) {
|
||||||
googleAanalyticsEventPDP(
|
// googleAanalyticsEventPDP(
|
||||||
this.productDetails,
|
// this.productDetails,
|
||||||
"view_item",
|
// "view_item",
|
||||||
this.categoryId
|
// this.categoryId
|
||||||
);
|
// );
|
||||||
if (
|
if (
|
||||||
this.productDetails.stockDetails.backorders == 0 &&
|
this.productDetails.stockDetails.backorders == 0 &&
|
||||||
this.productDetails.stockDetails.qty <= 0
|
this.productDetails.stockDetails.qty <= 0
|
||||||
|
|
|
@ -41,11 +41,11 @@ const beforeEachRoute = (to, from, next) =>{
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let path = to.path;
|
let path = to.path;
|
||||||
console.log("to path", to);
|
// console.log("to path", to);
|
||||||
if (path.includes("shop/category")) {
|
if (path.includes("shop/category")) {
|
||||||
let routeSplit = path.split("/");
|
let routeSplit = path.split("/");
|
||||||
let newCategoryRoute = routeSplit.slice(3, routeSplit.length - 5).join("/");
|
let newCategoryRoute = routeSplit.slice(3, routeSplit.length - 5).join("/");
|
||||||
console.log("new route", newCategoryRoute);
|
// console.log("new route", newCategoryRoute);
|
||||||
next({ path: "/" + newCategoryRoute });
|
next({ path: "/" + newCategoryRoute });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { invalidPoBoxAddress } from '@/services/util.service';
|
||||||
import { doFetchQuote } from '@/services/user_cart.service';
|
import { doFetchQuote } from '@/services/user_cart.service';
|
||||||
import { getField, updateField } from 'vuex-map-fields';
|
import { getField, updateField } from 'vuex-map-fields';
|
||||||
import humps from 'lodash-humps';
|
import humps from 'lodash-humps';
|
||||||
import { criteoUpdateUserEmail } from "@/services/util.service";
|
//import { criteoUpdateUserEmail } from "@/services/util.service";
|
||||||
|
|
||||||
/*eslint-disable*/
|
/*eslint-disable*/
|
||||||
const addresses = {
|
const addresses = {
|
||||||
|
@ -74,7 +74,7 @@ export const accountOne = {
|
||||||
state.countryWiseStates = countryWiseStates
|
state.countryWiseStates = countryWiseStates
|
||||||
},
|
},
|
||||||
setOne(state, one) {
|
setOne(state, one) {
|
||||||
criteoUpdateUserEmail(one.email)
|
// criteoUpdateUserEmail(one.email)
|
||||||
state.one = Object.assign({}, state.one, defaultAddress, one);
|
state.one = Object.assign({}, state.one, defaultAddress, one);
|
||||||
let customerNumber=state.one.customAttributes
|
let customerNumber=state.one.customAttributes
|
||||||
.filter((customAttribute)=>customAttribute.attributeCode==="customer_number")[0]
|
.filter((customAttribute)=>customAttribute.attributeCode==="customer_number")[0]
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {
|
||||||
import { getField, updateField } from 'vuex-map-fields';
|
import { getField, updateField } from 'vuex-map-fields';
|
||||||
import humps from 'lodash-humps';
|
import humps from 'lodash-humps';
|
||||||
import { getAuthUser } from '@/services/auth';
|
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 */
|
/* eslint-disable no-alert, no-console , no-debugger */
|
||||||
export const userCartProduct = {
|
export const userCartProduct = {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
|
@ -77,7 +77,7 @@ export const userCartProduct = {
|
||||||
state.cartProductList = list
|
state.cartProductList = list
|
||||||
// criteoViewBasket(list);
|
// criteoViewBasket(list);
|
||||||
},
|
},
|
||||||
setCriteoViewBasket(state) {
|
/* setCriteoViewBasket(state) {
|
||||||
criteoViewBasket(state.cartProductList);
|
criteoViewBasket(state.cartProductList);
|
||||||
},
|
},
|
||||||
setListrakCartList(state) {
|
setListrakCartList(state) {
|
||||||
|
@ -85,7 +85,7 @@ export const userCartProduct = {
|
||||||
},
|
},
|
||||||
setListrakCartListClear(){
|
setListrakCartListClear(){
|
||||||
listrakCartListClear()
|
listrakCartListClear()
|
||||||
},
|
},*/
|
||||||
setCartProductDetails(state, details) {
|
setCartProductDetails(state, details) {
|
||||||
state.cartProductDetails = details
|
state.cartProductDetails = details
|
||||||
},
|
},
|
||||||
|
@ -208,7 +208,7 @@ export const userCartProduct = {
|
||||||
commit('cartTotalAmtProgress', false);
|
commit('cartTotalAmtProgress', false);
|
||||||
commit('setCartDrawer', false);
|
commit('setCartDrawer', false);
|
||||||
await dispatch('cartProductList');
|
await dispatch('cartProductList');
|
||||||
dispatch('setListrakCartListClear')
|
// dispatch('setListrakCartListClear')
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -367,7 +367,7 @@ export const userCartProduct = {
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
},
|
},
|
||||||
setCriteoViewBasket: async({ commit ,state}) => {
|
/* setCriteoViewBasket: async({ commit ,state}) => {
|
||||||
if(state.cartProductList.length > 0)
|
if(state.cartProductList.length > 0)
|
||||||
{
|
{
|
||||||
commit('setCriteoViewBasket');
|
commit('setCriteoViewBasket');
|
||||||
|
@ -384,6 +384,6 @@ export const userCartProduct = {
|
||||||
{
|
{
|
||||||
commit('setListrakCartListClear');
|
commit('setListrakCartListClear');
|
||||||
}
|
}
|
||||||
},
|
},*/
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue