Merge branch 'beta' of git.treelet.net:crane/retailer-vue into dev
This commit is contained in:
commit
aba7cd3dad
|
@ -1,4 +1,3 @@
|
|||
|
||||
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
||||
VUE_APP_MAGENTO_API_URL=https://retailer-stg.crane.com
|
||||
VUE_APP_CRANE_URL=/shop
|
||||
|
@ -11,7 +10,7 @@ VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
|||
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer-stg.crane.com
|
||||
VUE_APP_NODESLS_API_URL=https://imagelib-sls-stg.crane.com
|
||||
|
||||
VUE_APP_HOME_PAGE_URL=https://www-retailer-stg.crane.com
|
||||
VUE_APP_HOME_PAGE_URL=https://www-stg.crane.com
|
||||
VUE_APP_CC_CONNECTION_URL=https://www.staging.personalized-stationery.com/CranesConnectionRedesign/Personalize.aspx?
|
||||
VUE_APP_MAINTENANCE_MODE=false
|
||||
VUE_APP_MAINTENANCE_PAGE_URL=/maintenance
|
||||
|
@ -21,8 +20,8 @@ VUE_APP_IMAGE_CATEGORY_PARAMS=?height=600&width=600
|
|||
VUE_APP_CRANE_ORDER_URL=https://ordertest.crane.com
|
||||
|
||||
DEPLOY_S3_REGION=us-east-1
|
||||
DEPLOY_S3_BUCKET=
|
||||
DEPLOY_CLOUDFRONT_ID=
|
||||
DEPLOY_S3_BUCKET=retailer-edge-staging-website-bucket
|
||||
DEPLOY_CLOUDFRONT_ID=E1QLFKCOZUDC8P
|
||||
VUE_APP_ASSETS_NODESLS_URL=https://assets-stg-sls.crane.com
|
||||
VUE_APP_IMAGE_LIB_URL=https://imagelib-stg-api.crane.com
|
||||
VUE_APP_BASE_URL=https://www-retailer-stg.crane.com
|
||||
VUE_APP_BASE_URL=https://retailer-stg.crane.com
|
|
@ -1,28 +1,28 @@
|
|||
VUE_APP_BRAINTREE_AUTH_KEY=production_fwr8vmp4_ypgzrntpjcv9vwsf
|
||||
VUE_APP_MAGENTO_API_URL=https://retailer.crane.com
|
||||
NODE_ENV=production
|
||||
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
||||
VUE_APP_MAGENTO_API_URL=https://retailer-stg.crane.com
|
||||
VUE_APP_CRANE_URL=/shop
|
||||
VUE_APP_GATE_URL=/gate
|
||||
VUE_APP_ME_URL=/retailer
|
||||
VUE_APP_ME_URL=/b2b
|
||||
VUE_APP_LOGIN_URL=/gate/sign-in
|
||||
VUE_APP_PERSONALIZE_URL=https://studio.crane.com/personalize
|
||||
VUE_APP_PROVISION_URL=http://manager-daily.crane.com/manager
|
||||
VUE_APP_IMAGE_PATH_URL=https://retailer.crane.com/media/catalog/product
|
||||
VUE_APP_RETAILOR_ID=08c43bbf-3735-4621-85f9-d71dc2cfb41b
|
||||
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer.crane.com
|
||||
VUE_APP_NODESLS_API_URL=https://imagelib-sls.crane.com
|
||||
VUE_APP_HOME_PAGE_URL=https://www.crane.com
|
||||
VUE_APP_CC_CONNECTION_URL=https://www.personalized-stationery.com/CranesConnectionRedesign/Personalize.aspx?
|
||||
VUE_APP_PERSONALIZE_URL=https://studio-stg.crane.com/personalize
|
||||
VUE_APP_IMAGE_PATH_URL=https://retailer-stg.crane.com/media/catalog/product
|
||||
VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
||||
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer-stg.crane.com
|
||||
VUE_APP_NODESLS_API_URL=https://imagelib-sls-stg.crane.com
|
||||
|
||||
VUE_APP_HOME_PAGE_URL=https://www-stg.crane.com
|
||||
VUE_APP_CC_CONNECTION_URL=https://www.staging.personalized-stationery.com/CranesConnectionRedesign/Personalize.aspx?
|
||||
VUE_APP_MAINTENANCE_MODE=false
|
||||
VUE_APP_MAINTENANCE_PAGE_URL=/maintenance
|
||||
VUE_APP_GTAG_ID=GTM-MF96RJX
|
||||
VUE_APP_GA_ID=UA-26415879-2
|
||||
|
||||
VUE_APP_GTAG_ID=GTM-N774RX4
|
||||
VUE_APP_GA_ID=UA-26415879-3
|
||||
VUE_APP_IMAGE_CATEGORY_PARAMS=?height=600&width=600
|
||||
VUE_APP_CRANE_ORDER_URL=https://order.crane.com
|
||||
VUE_APP_CRANE_ORDER_URL=https://ordertest.crane.com
|
||||
|
||||
DEPLOY_S3_REGION=us-east-1
|
||||
DEPLOY_S3_BUCKET=
|
||||
DEPLOY_CLOUDFRONT_ID=
|
||||
VUE_APP_ASSETS_NODESLS_URL=https://assets-sls.crane.com
|
||||
VUE_APP_IMAGE_LIB_URL=https://imagelib-api.crane.com
|
||||
VUE_APP_BASE_URL=https://www.crane.com
|
||||
DEPLOY_S3_BUCKET=retailer-edge-staging-website-bucket
|
||||
DEPLOY_CLOUDFRONT_ID=E1QLFKCOZUDC8P
|
||||
VUE_APP_ASSETS_NODESLS_URL=https://assets-stg-sls.crane.com
|
||||
VUE_APP_IMAGE_LIB_URL=https://imagelib-stg-api.crane.com
|
||||
VUE_APP_BASE_URL=https://retailer-stg.crane.com
|
|
@ -21,8 +21,8 @@ VUE_APP_IMAGE_CATEGORY_PARAMS=?height=600&width=600
|
|||
VUE_APP_CRANE_ORDER_URL=https://ordertest.crane.com
|
||||
|
||||
DEPLOY_S3_REGION=us-east-1
|
||||
DEPLOY_S3_BUCKET=
|
||||
DEPLOY_CLOUDFRONT_ID=
|
||||
DEPLOY_S3_BUCKET=retailer-edge-staging-website-bucket
|
||||
DEPLOY_CLOUDFRONT_ID=E1QLFKCOZUDC8P
|
||||
VUE_APP_ASSETS_NODESLS_URL=https://assets-stg-sls.crane.com
|
||||
VUE_APP_IMAGE_LIB_URL=https://imagelib-stg-api.crane.com
|
||||
VUE_APP_BASE_URL=https://www-stg.crane.com
|
||||
VUE_APP_BASE_URL=https://retailer-stg.crane.com
|
|
@ -3,13 +3,13 @@ rm -Rf git_info.json
|
|||
yarn
|
||||
yarn build:production
|
||||
yarn copy:git-info
|
||||
rm dist/static/js/craneCatalog.js
|
||||
rm dist/static/js/craneRetailerCatalog.js
|
||||
rm dist/static/js/magentoCmsCache.js
|
||||
rm dist/static/js/seoRoutes.js
|
||||
rm dist/static/js/urlRewrites.js
|
||||
# yarn copy:seo-files
|
||||
# yarn copy:cache-files
|
||||
rm dist/static/js/craneCatalog.js
|
||||
rm dist/static/js/craneRetailerCatalog.js
|
||||
rm dist/static/js/craneCategory.js
|
||||
rm dist/static/js/promotions.js
|
||||
yarn deploy:production
|
|
@ -3,8 +3,8 @@ rm -Rf git_info.json
|
|||
yarn
|
||||
yarn build:staging
|
||||
yarn copy:git-info
|
||||
rm dist/static/js/craneCatalog.js
|
||||
rm dist/static/js/magentoCmsCache.js
|
||||
# rm dist/static/js/craneRetailerCatalog.js
|
||||
# rm dist/static/js/magentoCmsCache.js
|
||||
rm dist/static/js/seoRoutes.js
|
||||
rm dist/static/js/urlRewrites.js
|
||||
# yarn copy:seo-files
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"branch_name":"dev","last_commit_date":"2022-01-19T13:21:02.000Z","last_commit_author":"anju j","last_commit_hash":"b1151481d0a45d9a1b73c225b342b160b7ad7f21"}
|
||||
{"branch_name":"dev","last_commit_date":"2022-01-19T13:24:39.000Z","last_commit_author":"rakesh","last_commit_hash":"7e0bb1a971f6a745a599f2eeda74ab1459428f2a"}
|
|
@ -24,10 +24,7 @@
|
|||
</noscript>
|
||||
<div id="app"></div>
|
||||
<script src="/static/js/magentoCmsCache.js"></script>
|
||||
<script src="/static/js/craneCatalog.js"></script>
|
||||
<script src="/static/js/seoRoutes.js"></script>
|
||||
<script src="/static/js/urlRewrites.js"></script>
|
||||
<script src="/static/js/promotions.js"></script>
|
||||
<script src="/static/js/craneRetailerCatalog.js"></script>
|
||||
|
||||
<script>
|
||||
// if (location.hash) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,19 +0,0 @@
|
|||
var catalog={
|
||||
categories: [
|
||||
{id:4, n:'Crane Boxed Stationery', pid 1,
|
||||
products: ['193C', '116C']},
|
||||
{id:6, n:'Crane Boxed Stationery 2', pid: 1},
|
||||
],
|
||||
products: [
|
||||
{ id: 12, sku: '193C', n: 'Ecru Card',
|
||||
p: 22, sp: 19, // price and sales_price
|
||||
|
||||
//TBD - cs:[{4:1}, {6:8}], // categories array {categoryId: position}
|
||||
|
||||
b: 'Vera Wang', //brand
|
||||
pw: 'Medium Size', // paper weight
|
||||
dc: 'Gold', // design color
|
||||
iu:'1312.jpg', // image url,
|
||||
....// add the rest of the attributes}
|
||||
]
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
var promotions=[]
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -41,13 +41,13 @@
|
|||
</v-form>
|
||||
|
||||
<v-row >
|
||||
<v-col cols="12">
|
||||
<!-- <v-col cols="12">
|
||||
Create an account ?
|
||||
<v-hover v-slot:default="{ hover }">
|
||||
<router-link class="text-decoration-none" :to="{name:'SignUpPage'}" :class="hover ? 'content-link-hover-color' : 'primary--text'">Sign Up</router-link>
|
||||
</v-hover>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pt-0 mt-n1">
|
||||
</v-col>-->
|
||||
<v-col cols="12" >
|
||||
Forgot your password?
|
||||
<v-hover v-slot:default="{ hover }">
|
||||
<router-link class="text-decoration-none" :to="{name:'forgot-password'}" :class="hover ? 'content-link-hover-color' : 'primary--text'">Forgot Password</router-link>
|
||||
|
|
|
@ -488,24 +488,7 @@
|
|||
<!------------------------------------------------------------------------------------->
|
||||
<v-row class="mr-1" v-show="checkOut">
|
||||
<v-col align="right">
|
||||
<a
|
||||
class="fontsize-14 black--text text-uppercase cartproductlist-action-link"
|
||||
@click.stop="
|
||||
editProduct(
|
||||
product.name,
|
||||
product.sku,
|
||||
product.itemId,
|
||||
index,
|
||||
product.customAttributes.isPersonalize,
|
||||
product.customAttributes.builderVersion,
|
||||
product.ccid,
|
||||
product.productType,
|
||||
product.parentSku
|
||||
)
|
||||
"
|
||||
>Edit</a
|
||||
>
|
||||
<span class="px-1">|</span>
|
||||
|
||||
<a
|
||||
class="fontsize-14 black--text text-uppercase cartproductlist-action-link"
|
||||
@click.stop="
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
.fontcolor-grey-shade8b {
|
||||
color: #8b8b8b;
|
||||
}
|
||||
|
||||
.categorybaseproducts-select-button {
|
||||
max-width: 300px !important;
|
||||
}
|
||||
|
||||
.categorybaseproduct-cancel-buttons.v-icon.v-icon::after {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
@media screen and (max-width:320px) {
|
||||
.searchproducts-sortby{
|
||||
font-size:14px !important;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,389 @@
|
|||
<template>
|
||||
<div>
|
||||
<v-row v-if="searchResults.page.length" class="mx-4">
|
||||
<v-col cols="12" lg="12" md="12" sm="12" >
|
||||
<v-row v-if="inProgress">
|
||||
<v-col
|
||||
v-for="(i, index) in 9"
|
||||
v-bind:key="index"
|
||||
lg="4"
|
||||
md="4"
|
||||
sm="4"
|
||||
cols="12"
|
||||
class=" cursor-pointer"
|
||||
>
|
||||
<v-skeleton-loader type="card"></v-skeleton-loader>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="searchResults.page.length > 0">
|
||||
<v-col
|
||||
v-for="(product, index) in searchResults.page"
|
||||
v-bind:key="index"
|
||||
lg="4"
|
||||
md="4"
|
||||
sm="4"
|
||||
cols="12"
|
||||
class=" cursor-pointer "
|
||||
|
||||
>
|
||||
<v-img
|
||||
:src="imageBasePathUrl + product.i + imageBaseParams"
|
||||
width="100%"
|
||||
:alt="product.n"
|
||||
:title="product.n"
|
||||
></v-img>
|
||||
<v-row>
|
||||
<v-col cols="6" >
|
||||
<h1
|
||||
class="float-left fontsize-14 body ls-n009 fontcolor-black-darken font-weight-300 word-break"
|
||||
>{{ product.n }}</h1>
|
||||
</v-col>
|
||||
<v-col cols="5" >
|
||||
<p
|
||||
v-if="product.lp"
|
||||
class="float-right fontsize-14 body ls-n009 fontcolor-black-darken font-weight-300"
|
||||
>
|
||||
From ${{ product.lp }}
|
||||
{{ product.u }}
|
||||
</p>
|
||||
<div
|
||||
v-else
|
||||
class="float-right fontsize-14 body ls-n009 fontcolor-black-darken font-weight-300"
|
||||
>
|
||||
<div v-if="product.sp">
|
||||
<s>${{ product.p }}</s>
|
||||
<p class="red--text mb-0">${{ roundUp(product.sp) }}</p> / {{ product.u }}
|
||||
</div>
|
||||
<div v-else-if="product.p != 0">
|
||||
<p>
|
||||
${{ product.p }} / {{ product.u }}
|
||||
</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p>TBD</p>
|
||||
</div>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="12" class="float-right" >
|
||||
<v-hover v-slot:default="{ hover }">
|
||||
<v-btn
|
||||
:disabled="inProgress"
|
||||
block
|
||||
x-large
|
||||
:outlined="!inProgress ? hover:false"
|
||||
:color="hover?'white':'primary'"
|
||||
:class="hover?'primary--text':'white--text'"
|
||||
class="text-uppercase ls-0 body productpage-button"
|
||||
tile
|
||||
depressed
|
||||
@click="addToCart(product.sku)"
|
||||
>
|
||||
<v-progress-circular
|
||||
align="center"
|
||||
:size="40"
|
||||
block
|
||||
color="primary"
|
||||
indeterminate
|
||||
v-if="inProgress"
|
||||
></v-progress-circular>
|
||||
<span v-if="!inProgress">ADD TO CART</span>
|
||||
</v-btn>
|
||||
</v-hover>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-else class="text-center">
|
||||
<v-col
|
||||
lg="12"
|
||||
md="12"
|
||||
sm="12"
|
||||
cols="12">
|
||||
<v-alert type="error" text class="font-weight-300 body-font h3">{{
|
||||
noProducts
|
||||
}}</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
/* eslint-disable no-alert, no-console , no-debugger */
|
||||
//import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
||||
import { mapState } from "vuex";
|
||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
||||
|
||||
export default {
|
||||
name: "RetailerSearchProducts",
|
||||
components: {
|
||||
SnackbarComponent
|
||||
},
|
||||
props: [
|
||||
"criteria",
|
||||
"searchPageContent",
|
||||
"breadcrumbData",
|
||||
"categoryPageContent"
|
||||
],
|
||||
computed: {
|
||||
...mapState({
|
||||
searchResults: state => state.catalogBrowser.searchResults,
|
||||
inProgress: state => state.catalogBrowser.inProgress,
|
||||
}),
|
||||
|
||||
imageBasePathUrl() {
|
||||
return process.env.VUE_APP_IMAGE_PATH_URL;
|
||||
},
|
||||
imageBaseParams() {
|
||||
return process.env.VUE_APP_IMAGE_CATEGORY_PARAMS;
|
||||
},
|
||||
isIpadOrMobile: function() {
|
||||
return this.$vuetify.breakpoint.mdAndDown ? true : false;
|
||||
},
|
||||
isIpad: function() {
|
||||
return this.$vuetify.breakpoint.smOnly || this.$vuetify.breakpoint.mdOnly
|
||||
? true
|
||||
: false;
|
||||
},
|
||||
isMobile: function() {
|
||||
return this.$vuetify.breakpoint.xs ? true : false;
|
||||
},
|
||||
userAuth: function() {
|
||||
return this.$store.state.auth.userAuth;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
data: () => ({
|
||||
menu: false,
|
||||
showDrawarFilter: false,
|
||||
noProducts: "No products found.",
|
||||
snackbar: {
|
||||
show: false,
|
||||
message: null,
|
||||
color: null,
|
||||
timeout: 0
|
||||
},
|
||||
}),
|
||||
methods: {
|
||||
roundUp(num) {
|
||||
var with2Decimals = num.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0];
|
||||
return with2Decimals;
|
||||
},
|
||||
addToCart(sku) {
|
||||
if (sku) {
|
||||
this.errorMessage = "";
|
||||
if (this.userAuth) {
|
||||
this.$store
|
||||
.dispatch("userCartProduct/addToCart", {
|
||||
sku: sku,
|
||||
qty: 1,
|
||||
ccid: null,
|
||||
price: null,
|
||||
personalizeDetails: null
|
||||
})
|
||||
.then(() => {
|
||||
this.$store.dispatch("userCartProduct/cartProductList");
|
||||
|
||||
this.$store.dispatch("userCartProduct/cartDrawer", true);
|
||||
this.snackbar = {
|
||||
message: "Product Added Successfully",
|
||||
color: "success",
|
||||
show: true,
|
||||
timeout: 2000
|
||||
};
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
this.snackbar = {
|
||||
message: 'Unexpected error while communicating with the cloud',
|
||||
color: "error",
|
||||
show: true,
|
||||
timeout: 2000
|
||||
};
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
this.errorMessage = "Please Select Quantity";
|
||||
}
|
||||
},
|
||||
OnResize() {
|
||||
setTimeout(() => {
|
||||
if (this.$vuetify.breakpoint.lgAndUp) {
|
||||
this.showDrawarFilter = false;
|
||||
}
|
||||
}, 200);
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
.sort-button.theme--light.v-text-field--solo
|
||||
> .v-input__control
|
||||
> .v-input__slot {
|
||||
background: transparent !important;
|
||||
}
|
||||
.categorybaseproducts-pagination-button .v-pagination__item--active {
|
||||
outline: #ffffff !important;
|
||||
}
|
||||
.categorybaseproducts-pagination-button .v-pagination__item {
|
||||
outline: #ffffff !important;
|
||||
box-shadow: none !important;
|
||||
padding: 0px !important;
|
||||
margin: 0px !important;
|
||||
}
|
||||
.categorybaseproducts-pagination-button {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.categorybaseproducts-overflow-button .v-select__slot {
|
||||
border-left: 1px solid #dcdddd !important;
|
||||
border-right: 1px solid #dcdddd !important;
|
||||
max-width: 85px !important;
|
||||
max-height: 36px !important;
|
||||
}
|
||||
.categorybaseproducts-overflow-button {
|
||||
max-width: 85px !important;
|
||||
}
|
||||
.categorybaseproducts-overflow-button .v-select__slot .v-input__append-inner {
|
||||
max-height: 36px !important;
|
||||
}
|
||||
.categorybaseproducts-overflow-button .v-overflow-btn .v-select__slot {
|
||||
max-height: 36px !important;
|
||||
}
|
||||
.categorybaseproducts-overflow-button .v-text-field__details {
|
||||
display: none;
|
||||
}
|
||||
.categorybaseproducts-pagination-button
|
||||
.v-pagination__navigation.v-pagination__navigation--disabled {
|
||||
display: none;
|
||||
}
|
||||
.categorybaseproducts-pagination-button
|
||||
.v-pagination__navigation
|
||||
.v-icon.v-icon {
|
||||
font-style: normal !important;
|
||||
color: #1d1d1d !important;
|
||||
text-transform: uppercase !important;
|
||||
font-size: 14px;
|
||||
font-family: "Whyte-Regular", sans-serif;
|
||||
letter-spacing: -0.1px;
|
||||
}
|
||||
.categorybaseproducts-select-button .v-input__control .v-input__slot {
|
||||
border: thin solid #8b8b8b !important;
|
||||
}
|
||||
.categorybaseproducts-select-button:hover .v-input__control .v-input__slot {
|
||||
border: thin solid #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-select-button.v-input--is-label-active.v-input--is-focused
|
||||
.v-input__control
|
||||
.v-input__slot {
|
||||
border: thin solid #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-select-button:hover
|
||||
.v-select__selection.v-select__selection--comma {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-select-button:hover
|
||||
.v-input__append-inner
|
||||
.v-input__icon
|
||||
.v-icon {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-pagination-button .v-pagination__navigation {
|
||||
outline: #ffffff !important;
|
||||
box-shadow: none !important;
|
||||
padding: 0px !important;
|
||||
//margin: 0px 10px !important;
|
||||
}
|
||||
.custom-pagination li:nth-child(1) {
|
||||
margin-right: 15px !important;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.categorybaseproducts-select-button.v-input--is-label-active.v-input--is-focused
|
||||
.v-select__selection.v-select__selection--comma {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button.theme--light.v-select
|
||||
.v-select__selection--comma {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button .v-text-field__details {
|
||||
display: none;
|
||||
}
|
||||
.categorybaseproducts-sortby-button .v-input__control .v-input__slot {
|
||||
border: thin solid #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button:hover .v-input__control .v-input__slot {
|
||||
border: thin solid #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button.v-input--is-label-active.v-input--is-focused
|
||||
.v-input__control
|
||||
.v-input__slot {
|
||||
border: thin solid #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button:hover
|
||||
.v-select__selection.v-select__selection--comma {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button:hover
|
||||
.v-input__append-inner
|
||||
.v-input__icon
|
||||
.v-icon {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button
|
||||
.v-input__append-inner
|
||||
.v-input__icon
|
||||
.v-icon {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button.v-input--is-label-active.v-input--is-focused
|
||||
.v-select__selection.v-select__selection--comma {
|
||||
color: #2850da !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button.v-input--is-label-active.v-input--is-focused.v-text-field.v-text-field--solo
|
||||
.v-input__append-inner,
|
||||
.v-text-field.v-text-field--solo .v-input__prepend-inner {
|
||||
-ms-flex-item-align: center;
|
||||
align-self: center;
|
||||
padding-top: 5px;
|
||||
border-left: 1px solid #2850da;
|
||||
padding-left: 10px;
|
||||
height: 34px;
|
||||
}
|
||||
.categorybaseproducts-select-button.v-input--is-label-active.v-input--is-focused.v-text-field.v-text-field--solo
|
||||
.v-input__append-inner,
|
||||
.v-text-field.v-text-field--solo .v-input__prepend-inner {
|
||||
-ms-flex-item-align: center;
|
||||
align-self: center;
|
||||
padding-top: 5px;
|
||||
border-left: 1px solid #2850da;
|
||||
padding-left: 10px;
|
||||
height: 34px;
|
||||
}
|
||||
.searchproducts-cancel-buttons.v-icon.v-icon::after {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.categorybaseproducts-sortby-button .v-text-field__details {
|
||||
display: none;
|
||||
}
|
||||
.categorybaseproducts-overflow-button .v-text-field__details {
|
||||
display: none;
|
||||
}
|
||||
.categorybaseproducts-filter-button .v-text-field__details {
|
||||
display: none;
|
||||
}
|
||||
.filter-component-width .v-expansion-panels {
|
||||
display: inline-block;
|
||||
}
|
||||
// .v-text-field__details {
|
||||
// display: none;
|
||||
// }
|
||||
</style>
|
||||
<style src="./RetailerSearchProducts.scss" lang="scss" scoped />
|
|
@ -1,5 +1,4 @@
|
|||
<template>
|
||||
<v-container-fluid>
|
||||
<v-row class="pl-10 pr-10">
|
||||
<v-col cols="12" sm="12" md="12" lg="12" class="">
|
||||
<div class="h3 text-capitalize body-font1">Retailer dashboard</div>
|
||||
|
@ -13,7 +12,7 @@
|
|||
<v-hover v-slot:default="{ hover }">
|
||||
<router-link
|
||||
class="text-decoration-none"
|
||||
:to="{ name: 'CheckoutPage' }"
|
||||
:to="{ name: 'CartProducts' }"
|
||||
>
|
||||
<div
|
||||
:class="hover ? 'primary--text' : 'black--text'"
|
||||
|
@ -123,7 +122,6 @@
|
|||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container-fluid>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -16,33 +16,59 @@
|
|||
</v-container>
|
||||
</v-overlay>
|
||||
<div v-show="!cartProductsProgress">
|
||||
<v-row><v-col cols="12" sm="12" md="12">
|
||||
<v-col cols="12" sm="12" md="8">
|
||||
<v-menu offset-y down allow-overflow >
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
prepend-inner-icon="mdi-magnify"
|
||||
placeholder="Enter Item, Name, Keyword"
|
||||
v-model="searchData"
|
||||
v-on="on"
|
||||
@input="searchProducts"
|
||||
>
|
||||
</v-text-field>
|
||||
</template>
|
||||
<div>
|
||||
<v-card tile flat v-if="searchData">
|
||||
<RetailerSearchProducts />
|
||||
</v-card>
|
||||
</div>
|
||||
</v-menu>
|
||||
</v-col>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-show="cartProductsItem.length == 0">
|
||||
<v-col>
|
||||
<v-alert class="alert-box-outline" type="error" text dense
|
||||
>You have no items in your shopping cart.</v-alert
|
||||
>
|
||||
<p>
|
||||
<!-- <p>
|
||||
Click
|
||||
<span
|
||||
class="mr-1 text-decoration-none fontcolor-black-light fontsize-16 guest-shipping-address-login"
|
||||
class="
|
||||
mr-1
|
||||
text-decoration-none
|
||||
fontcolor-black-light
|
||||
fontsize-16
|
||||
guest-shipping-address-login
|
||||
"
|
||||
>
|
||||
<span @click="goToShopping()" class="cursor-pointer"
|
||||
>here</span
|
||||
> </span
|
||||
>to continue shopping.
|
||||
</p>
|
||||
</p>-->
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<div v-show="cartProductsItem.length != 0">
|
||||
<v-row
|
||||
class="mt-12"
|
||||
:class="!isDesktop ? 'd-flex flex-row' : 'd-flex flex-column-reverse'"
|
||||
>
|
||||
<v-col cols="12" sm="12" md="8" class="pt-0 mt-0">
|
||||
<v-divider class="hidden-md-and-up"></v-divider>
|
||||
<v-col cols="12" class="mt-3">
|
||||
<v-row >
|
||||
<v-col cols="12" sm="12" md="8">
|
||||
|
||||
<v-col cols="12">
|
||||
<p
|
||||
class="h3 pl-4 body-font text-uppercase primary--text"
|
||||
class="h3 body-font text-uppercase primary--text"
|
||||
v-if="!cartProductsProgress"
|
||||
>
|
||||
Your Cart ( {{ cartProductsItem.length }} )
|
||||
|
@ -50,7 +76,7 @@
|
|||
</v-col>
|
||||
<v-divider class="hidden-md-and-up"></v-divider>
|
||||
<v-row>
|
||||
<v-col cols="12" sm="11" md="11" class="mt-5">
|
||||
<v-col cols="12" sm="12" md="12" class="mt-5">
|
||||
<CartProductList
|
||||
:checkOut="chekoutFlag"
|
||||
:cartItems="cartProductsItem"
|
||||
|
@ -77,44 +103,13 @@
|
|||
${{ priceFormatter(cartProductTotalAmt.baseSubtotal) }}
|
||||
</p>
|
||||
</v-col>
|
||||
<v-col cols="12" v-show="cartProductTotalAmt.couponCode">
|
||||
<p class="float-left pb-0 mb-0">
|
||||
Discount ({{ cartProductTotalAmt.couponCode }})
|
||||
</p>
|
||||
<p
|
||||
class="float-right pb-0 mb-0"
|
||||
v-if="cartProductTotalAmt.baseDiscountAmount"
|
||||
>
|
||||
-${{
|
||||
priceFormatter(
|
||||
cartProductTotalAmt.baseDiscountAmount
|
||||
.toString()
|
||||
.substring(1)
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
<p class="float-right pb-0 mb-0" v-else>-$0</p>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12">
|
||||
<p class="float-left pb-0 mb-0">Shipping</p>
|
||||
<p class="float-right pb-0 mb-0">
|
||||
${{ priceFormatter(cartProductTotalAmt.baseShippingAmount) }}
|
||||
</p>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<p class="float-left pb-0 mb-0">Estimated Tax</p>
|
||||
<p class="float-right pb-0 mb-0">
|
||||
${{ priceFormatter(cartProductTotalAmt.taxAmount) }}
|
||||
</p>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12">
|
||||
<p class="float-left pb-0 mb-0">Estimated Total</p>
|
||||
<p class="float-right pb-0 mb-0">
|
||||
${{ priceFormatter(cartProductTotalAmt.baseGrandTotal) }}
|
||||
</p>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="stockFlag"
|
||||
cols="12"
|
||||
|
@ -140,7 +135,11 @@
|
|||
<v-btn
|
||||
tile
|
||||
large
|
||||
class="d-none d-sm-flex d-md-none px-12 cart-products-button"
|
||||
class="
|
||||
d-none d-sm-flex d-md-none
|
||||
px-12
|
||||
cart-products-button
|
||||
"
|
||||
:outlined="hover"
|
||||
:color="hover ? 'white' : 'primary'"
|
||||
:class="hover ? 'primary--text' : 'white--text'"
|
||||
|
@ -172,72 +171,6 @@
|
|||
></v-progress-circular>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!-- <v-divider class="hidden-md-and-up"></v-divider>-->
|
||||
<v-divider class="primary"></v-divider>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" align="center" v-if="inProgressDiscountCode">
|
||||
<v-progress-circular
|
||||
:size="60"
|
||||
color="primary"
|
||||
indeterminate
|
||||
></v-progress-circular>
|
||||
</v-col>
|
||||
<v-col cols="12" class="pb-0 mb-0" v-else>
|
||||
<p class="primary--text">Apply Discount Code</p>
|
||||
<v-form
|
||||
ref="discountCodeForm"
|
||||
v-model="validDiscountCode"
|
||||
:lazy-validation="lazy"
|
||||
>
|
||||
<v-row>
|
||||
<v-col cols="8" class="pb-0 mb-0">
|
||||
<v-text-field
|
||||
type="text"
|
||||
dense
|
||||
placeholder="Enter Discount Code"
|
||||
v-model="discountTextCode"
|
||||
outlined
|
||||
@blur="resetValidation"
|
||||
:rules="textRules"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="4" class="pb-0 mb-0">
|
||||
<v-hover v-slot:default="{ hover }">
|
||||
<v-btn
|
||||
v-if="!discountCode"
|
||||
class="text-uppercase checkoutpage-button-height cart-products-button"
|
||||
@click="applyDiscountCode"
|
||||
large
|
||||
dense
|
||||
depressed
|
||||
tile
|
||||
:outlined="hover"
|
||||
:color="hover ? 'white' : 'primary'"
|
||||
:class="hover ? 'primary--text' : 'white--text'"
|
||||
>APPLY</v-btn
|
||||
>
|
||||
</v-hover>
|
||||
<v-hover v-slot:default="{ hover }">
|
||||
<v-btn
|
||||
v-if="discountCode"
|
||||
class="text-uppercase checkoutpage-button-height cart-products-button"
|
||||
@click="removeDiscountCode"
|
||||
large
|
||||
dense
|
||||
:outlined="hover"
|
||||
:color="hover ? 'white' : 'error'"
|
||||
:class="hover ? 'error--text' : 'white--text'"
|
||||
depressed
|
||||
tile
|
||||
>CANCEL</v-btn
|
||||
>
|
||||
</v-hover>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-form>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
|
@ -249,12 +182,15 @@
|
|||
/* eslint-disable no-alert, no-console , no-debugger */
|
||||
const baseUrl = process.env.VUE_APP_BASE_URL;
|
||||
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",
|
||||
data: () => ({
|
||||
searchData: null,
|
||||
priceFormatter: priceFormatter,
|
||||
stockFlag: true,
|
||||
cartProductPage: true,
|
||||
|
@ -265,7 +201,6 @@ export default {
|
|||
dialog: false,
|
||||
chekoutFlag: true,
|
||||
discountTextCode: "",
|
||||
validDiscountCode: true,
|
||||
lazy: false,
|
||||
textRules: [(v) => !!v || "This field is required"],
|
||||
snackbar: {
|
||||
|
@ -278,6 +213,7 @@ export default {
|
|||
components: {
|
||||
CartProductList,
|
||||
SnackbarComponent,
|
||||
RetailerSearchProducts,
|
||||
},
|
||||
computed: {
|
||||
canonical: function () {
|
||||
|
@ -313,13 +249,7 @@ export default {
|
|||
return this.$store.state.cartProduct.cartTotalAmtProgress;
|
||||
}
|
||||
},
|
||||
inProgressDiscountCode() {
|
||||
if (this.userAuth) {
|
||||
return this.$store.state.userCartProduct.fetchInProgress;
|
||||
} else {
|
||||
return this.$store.state.cartProduct.fetchInProgress;
|
||||
}
|
||||
},
|
||||
|
||||
cartProductsProgress: function () {
|
||||
if (this.userAuth) {
|
||||
return this.$store.state.userCartProduct.cartProductsProgress;
|
||||
|
@ -327,13 +257,7 @@ export default {
|
|||
return this.$store.state.cartProduct.cartProductsProgress;
|
||||
}
|
||||
},
|
||||
discountCode() {
|
||||
if (this.userAuth) {
|
||||
return this.$store.state.userCartProduct.discountCode;
|
||||
} else {
|
||||
return this.$store.state.cartProduct.discountCode;
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
|
@ -356,14 +280,7 @@ export default {
|
|||
};
|
||||
},
|
||||
watch: {
|
||||
validDiscountCode() {
|
||||
if (!this.validDiscountCode) {
|
||||
this.$refs.discountCodeForm.reset();
|
||||
}
|
||||
},
|
||||
discountCode() {
|
||||
this.discountTextCode = this.discountCode;
|
||||
},
|
||||
|
||||
cartProductsItem() {
|
||||
this.stockFlagHideShow();
|
||||
this.calledCriteoViewBasket();
|
||||
|
@ -380,7 +297,6 @@ export default {
|
|||
}
|
||||
},
|
||||
removeMinus(val) {
|
||||
debugger;
|
||||
if (val) return val.toString().substring(1);
|
||||
},
|
||||
showSnackBarMessage(obj) {
|
||||
|
@ -413,11 +329,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
resetValidation() {
|
||||
if (!this.validDiscountCode) {
|
||||
this.$refs.discountCodeForm.reset();
|
||||
}
|
||||
},
|
||||
resetValidation() {},
|
||||
goToShopping() {
|
||||
this.$router.push({
|
||||
name: "HomePage",
|
||||
|
@ -430,134 +342,28 @@ export default {
|
|||
params: {},
|
||||
});
|
||||
},
|
||||
setDiscountTextCode() {
|
||||
if (this.userAuth) {
|
||||
this.discountTextCode = this.$store.state.userCartProduct.discountCode;
|
||||
} else {
|
||||
this.discountTextCode = this.$store.state.cartProduct.discountCode;
|
||||
}
|
||||
},
|
||||
applyDiscountCode() {
|
||||
if (this.$refs.discountCodeForm.validate()) {
|
||||
if (this.userAuth) {
|
||||
this.$store
|
||||
.dispatch(
|
||||
"userCartProduct/applyDiscountCode",
|
||||
this.discountTextCode
|
||||
)
|
||||
.then(() => {
|
||||
this.snackbar = {
|
||||
message: "Your coupon was successfully applied",
|
||||
color: "success",
|
||||
show: true,
|
||||
timeout: 2000,
|
||||
};
|
||||
this.$store.dispatch("userCartProduct/productTotalAmt");
|
||||
})
|
||||
.catch((error) => {
|
||||
this.snackbar = {
|
||||
message: error.message,
|
||||
color: "error",
|
||||
show: true,
|
||||
timeout: 2000,
|
||||
};
|
||||
searchProducts() {
|
||||
if (this.searchData) {
|
||||
this.$store.dispatch("catalogBrowser/search", {
|
||||
fullCatalog: window.craneCatalog,
|
||||
keywords: this.searchData,
|
||||
filters: [],
|
||||
pageNumber: 1,
|
||||
pageSize: "ALL",
|
||||
sortBy: "relevance",
|
||||
});
|
||||
} 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(
|
||||
"cartProduct/productTotalAmt",
|
||||
this.guestQuoteId
|
||||
);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.snackbar = {
|
||||
message: error.message,
|
||||
color: "error",
|
||||
show: true,
|
||||
timeout: 2000,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
removeDiscountCode() {
|
||||
if (this.$refs.discountCodeForm.validate()) {
|
||||
if (this.userAuth) {
|
||||
this.$store
|
||||
.dispatch(
|
||||
"userCartProduct/removeDiscountCode",
|
||||
this.discountTextCode
|
||||
)
|
||||
.then(() => {
|
||||
this.snackbar = {
|
||||
message: "Your coupon was successfully removed",
|
||||
color: "success",
|
||||
show: true,
|
||||
timeout: 2000,
|
||||
};
|
||||
this.$store.dispatch("userCartProduct/productTotalAmt");
|
||||
})
|
||||
.catch((error) => {
|
||||
this.snackbar = {
|
||||
message: error,
|
||||
color: "error",
|
||||
show: true,
|
||||
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(
|
||||
"cartProduct/productTotalAmt",
|
||||
this.guestQuoteId
|
||||
);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.snackbar = {
|
||||
message: error,
|
||||
color: "error",
|
||||
show: true,
|
||||
timeout: 2000,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
this.$store.dispatch("catalogBrowser/index", {
|
||||
productsCatalog: window.craneCatalog.products,
|
||||
});
|
||||
if (this.userAuth) {
|
||||
this.$store.dispatch("userCartProduct/fetchCartCoupon");
|
||||
this.setDiscountTextCode();
|
||||
|
||||
this.calledCriteoViewBasket();
|
||||
} else {
|
||||
if (this.guestQuoteId) {
|
||||
this.$store.dispatch("cartProduct/fetchCartCoupon", this.guestQuoteId);
|
||||
this.setDiscountTextCode();
|
||||
this.calledCriteoViewBasket();
|
||||
}
|
||||
}
|
||||
this.stockFlagHideShow();
|
||||
},
|
||||
|
|
|
@ -21,21 +21,7 @@
|
|||
</v-row>
|
||||
</v-container>
|
||||
</v-overlay>
|
||||
<v-overlay :value="storeCreditInProgress" :opacity="0.8">
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col cols="12" class="d-flex justify-center align-center">
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
size="80"
|
||||
color="white"
|
||||
align="center"
|
||||
justify="center"
|
||||
></v-progress-circular>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-overlay>
|
||||
|
||||
<v-container
|
||||
v-if="cartProductsProgress || shippingInformationsInProgress"
|
||||
class="text-center"
|
||||
|
@ -280,17 +266,7 @@
|
|||
<!-- </v-row> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="!userLocalAddressFlag">
|
||||
<v-col cols="auto">
|
||||
<v-btn
|
||||
class="primary"
|
||||
depressed
|
||||
tile
|
||||
@click="openDialogForEditAddress()"
|
||||
>New Address</v-btn
|
||||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<v-row>
|
||||
|
@ -488,11 +464,11 @@
|
|||
v-if="shippingInformations.totals.grandTotal !== 0"
|
||||
>
|
||||
<v-radio
|
||||
:label="shippingInformations.paymentMethods[1].title"
|
||||
:value="shippingInformations.paymentMethods[1].code"
|
||||
:label="shippingInformations.paymentMethods[0].title"
|
||||
:value="shippingInformations.paymentMethods[0].code"
|
||||
class="black--text"
|
||||
></v-radio>
|
||||
<div v-if="paymentMethod === 'braintree'">
|
||||
<div v-if="paymentMethod === 'purchaseorder'">
|
||||
<v-checkbox
|
||||
label="My billing and shipping address are the same"
|
||||
v-model="sameAddress"
|
||||
|
@ -501,7 +477,8 @@
|
|||
:readonly="readOnlyCheckBox"
|
||||
hide-details
|
||||
></v-checkbox>
|
||||
<v-row v-if="sameAddress">
|
||||
<div v-if="sameAddress">
|
||||
<v-row >
|
||||
<v-col cols="12" class="pl-sm-10">
|
||||
<BillingAddressComponent :address="address" />
|
||||
<v-btn
|
||||
|
@ -515,6 +492,34 @@
|
|||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="pl-3">
|
||||
|
||||
<v-col cols="12" align="right">
|
||||
<v-btn
|
||||
class="primary mx-3 text-uppercase"
|
||||
@click="placeOrderFree()"
|
||||
tile
|
||||
depressed
|
||||
>Place Order</v-btn
|
||||
>
|
||||
</v-col>
|
||||
|
||||
<!-- <v-col cols="12" sm="6">
|
||||
<v-braintree
|
||||
:authorization="braintreeAuthKey"
|
||||
:vaultManager="true"
|
||||
@success="onPaymentSuccess"
|
||||
@error="onPaymentError"
|
||||
@load="onGatewayLoad"
|
||||
@loadFail="onGatewayLoadFail"
|
||||
>
|
||||
<template v-slot:button="slotProps">
|
||||
<v-btn @click="slotProps.submit" color="success">Place Order</v-btn>
|
||||
</template>
|
||||
</v-braintree>
|
||||
</v-col>-->
|
||||
</v-row>
|
||||
</div>
|
||||
<v-row v-else>
|
||||
<v-col cols="12" sm="8" v-if="this.userAuth">
|
||||
<v-row v-if="addressLength > 0">
|
||||
|
@ -658,10 +663,10 @@
|
|||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<!-- <v-row>
|
||||
<CardPayment
|
||||
@submitCardPayment="submitCardPayment"
|
||||
/>
|
||||
/>-->
|
||||
<!-- <v-col cols="12" sm="6">
|
||||
<v-braintree
|
||||
:authorization="braintreeAuthKey"
|
||||
|
@ -676,7 +681,7 @@
|
|||
</template>
|
||||
</v-braintree>
|
||||
</v-col>-->
|
||||
</v-row>
|
||||
<!--</v-row>-->
|
||||
</div>
|
||||
<!-- <v-divider class="my-3"></v-divider>
|
||||
<v-radio
|
||||
|
@ -871,23 +876,7 @@
|
|||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="pl-3">
|
||||
<v-col
|
||||
cols="12"
|
||||
v-if="
|
||||
giftCardCreditBalance >
|
||||
shippingInformations.totals.subtotal +
|
||||
shippingInformations.totals
|
||||
.baseShippingInclTax
|
||||
"
|
||||
>
|
||||
<p>
|
||||
Gift Card amount applied to order:${{
|
||||
shippingInformations.totals.subtotal +
|
||||
shippingInformations.totals
|
||||
.baseShippingInclTax
|
||||
}}
|
||||
</p>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" align="right">
|
||||
<v-btn
|
||||
class="primary mx-3 text-uppercase"
|
||||
|
@ -1353,22 +1342,17 @@
|
|||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="pl-3">
|
||||
<v-col
|
||||
cols="12"
|
||||
v-if="
|
||||
giftCardCreditBalance >
|
||||
cartProductTotalAmt.subtotal +
|
||||
cartProductTotalAmt.baseShippingInclTax
|
||||
"
|
||||
>
|
||||
<p>
|
||||
Gift Card amount applied to order:${{
|
||||
cartProductTotalAmt.subtotal +
|
||||
cartProductTotalAmt.baseShippingInclTax
|
||||
}}
|
||||
</p>
|
||||
</v-col>
|
||||
<v-col cols="12" align="right">
|
||||
<v-text-field
|
||||
v-model="poNumber"
|
||||
type="text"
|
||||
dense
|
||||
placeholder="Purchase Order Number"
|
||||
outlined
|
||||
:rules="textRules"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<!-- <v-col cols="12" align="right">
|
||||
<v-btn
|
||||
class="primary mx-3 text-uppercase"
|
||||
@click="placeOrderFree()"
|
||||
|
@ -1376,7 +1360,7 @@
|
|||
depressed
|
||||
>Place Order</v-btn
|
||||
>
|
||||
</v-col>
|
||||
</v-col>-->
|
||||
|
||||
<!-- <v-col cols="12" sm="6">
|
||||
<v-braintree
|
||||
|
@ -1414,7 +1398,7 @@
|
|||
</v-radio-group>
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
<v-col cols="12" class="py-0">
|
||||
<!-- <v-col cols="12" class="py-0">
|
||||
<v-expansion-panels
|
||||
accordion
|
||||
light
|
||||
|
@ -1488,70 +1472,9 @@
|
|||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panels>
|
||||
</v-col>
|
||||
<div v-if="!giftCardProduct">
|
||||
<v-row
|
||||
class="pl-4"
|
||||
v-show="
|
||||
giftCardCreditBalance != 0 &&
|
||||
shippingInformations.totals.grandTotal != 0 &&
|
||||
shippingInformations.totals.totalSegments[5].value ==
|
||||
0 &&
|
||||
this.userAuth &&
|
||||
showStoreCredit
|
||||
"
|
||||
>
|
||||
<hr />
|
||||
<v-col cols="12">
|
||||
<p class="mb-5">Store Credit</p>
|
||||
<p>
|
||||
${{ giftCardCreditBalance }} Store Credit available
|
||||
</p>
|
||||
</v-col>
|
||||
<v-col cols="12" align="right">
|
||||
<v-btn
|
||||
class="primary mx-3 text-uppercase"
|
||||
@click="useStoreCredit()"
|
||||
tile
|
||||
depressed
|
||||
>Use Store Credit</v-btn
|
||||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
giftCardProduct && cartProductTotalAmt.totalSegments
|
||||
"
|
||||
>
|
||||
<v-row
|
||||
class="pl-4"
|
||||
v-show="
|
||||
giftCardCreditBalance != 0 &&
|
||||
cartProductTotalAmt.totalSegments[5].value === 0 &&
|
||||
this.userAuth &&
|
||||
showStoreCredit &&
|
||||
cartProductTotalAmt.grandTotal !== 0
|
||||
"
|
||||
>
|
||||
<hr />
|
||||
<v-col cols="12">
|
||||
<p class="mb-5">Store Credit</p>
|
||||
<p>
|
||||
${{ giftCardCreditBalance }} Store Credit available
|
||||
</p>
|
||||
</v-col>
|
||||
<v-col cols="12" align="right">
|
||||
<v-btn
|
||||
class="primary mx-3 text-uppercase"
|
||||
@click="useStoreCredit()"
|
||||
tile
|
||||
depressed
|
||||
>Use Store Credit</v-btn
|
||||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>-->
|
||||
|
||||
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="5" md="4" class="pl-3 d-none d-sm-block">
|
||||
|
@ -1679,17 +1602,7 @@
|
|||
}}</span
|
||||
>
|
||||
</v-col>
|
||||
<v-col
|
||||
cols="12"
|
||||
class="d-flex justify-space-between"
|
||||
v-if="
|
||||
shippingInformations.totals.totalSegments[5]
|
||||
.value !== 0
|
||||
"
|
||||
>
|
||||
<span>{{ giftCardCreditBalance }} Store Credit</span>
|
||||
<span>-${{ giftCardCreditBalance }}</span>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" class="d-flex justify-space-between">
|
||||
<h3>Estimated Total</h3>
|
||||
<span
|
||||
|
@ -1952,7 +1865,8 @@ export default {
|
|||
sameAddress: true,
|
||||
paymentMethod: "",
|
||||
paymentMethodFree: true,
|
||||
freePaymentMethod: "free",
|
||||
freePaymentMethod: "purchaseorder",
|
||||
poNumber:'',
|
||||
cartItemPanel: [0],
|
||||
saveInAddressBook: false,
|
||||
showAddressDialog: false,
|
||||
|
@ -2070,12 +1984,7 @@ export default {
|
|||
canonical: function () {
|
||||
return this.$route.meta.canonical;
|
||||
},
|
||||
giftCardCreditBalance: function () {
|
||||
return this.$store.state.storeCredit.giftCardCreditBalance;
|
||||
},
|
||||
storeCreditInProgress: function () {
|
||||
return this.$store.state.storeCredit.storeCreditInProgress;
|
||||
},
|
||||
|
||||
hideAndShowFields: function () {
|
||||
//let currentName = this.$router.history.current.name;
|
||||
// if (currentName === "CheckoutPage" && this.tabs == "shippingTab") {
|
||||
|
@ -2852,87 +2761,9 @@ export default {
|
|||
try {
|
||||
let res = await this.$store.dispatch("accountOne/setOrder", {
|
||||
method: this.freePaymentMethod,
|
||||
"poNumber": this.poNumber,
|
||||
});
|
||||
await this.$store.dispatch("accountOne/setPaymentInProgress", true);
|
||||
if (res) {
|
||||
try {
|
||||
let resp = await this.$store.dispatch(
|
||||
"meProductOne/fetchOrderProduct",
|
||||
res
|
||||
);
|
||||
if (resp && resp.items) {
|
||||
/*googleAanalyticsCheckout("checkout_progress", {
|
||||
items: resp.items,
|
||||
});
|
||||
googleAanalyticsCheckout("set_checkout_option", {
|
||||
checkout_step: 1,
|
||||
checkout_option: "payment",
|
||||
});*/
|
||||
|
||||
googleAanalyticsCheckoutAddPaymentInfo(
|
||||
"add_payment_info",
|
||||
resp
|
||||
);
|
||||
googleAanalyticsPurchase(resp, resp.incrementId);
|
||||
let shippingAddress = [];
|
||||
let ccid = "";
|
||||
let webOrderNumber = resp.incrementId;
|
||||
let magentoOrderNumber = res;
|
||||
for (let i = 0; resp.items.length > i; i++) {
|
||||
let obj = resp.items[i];
|
||||
if (obj.extensionAttributes) {
|
||||
ccid = obj.extensionAttributes.ccid;
|
||||
if (ccid) {
|
||||
shippingAddress =
|
||||
resp.extensionAttributes.shippingAssignments[0]
|
||||
.shipping.address;
|
||||
try {
|
||||
let response = await this.$store.dispatch(
|
||||
"accountOne/setCCOrder",
|
||||
{
|
||||
orderNumber: ccid,
|
||||
shippingAddress: shippingAddress,
|
||||
webOrderNumber: webOrderNumber,
|
||||
estimatedShipping: this.estimatedShipping,
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
if (obj.extensionAttributes.personalizeDetails) {
|
||||
await this.placeCraneOrder(
|
||||
resp,
|
||||
obj,
|
||||
webOrderNumber,
|
||||
magentoOrderNumber
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
await this.$store.dispatch(
|
||||
"accountOne/setPaymentInProgress",
|
||||
false
|
||||
);
|
||||
this.isPageLoader = false;
|
||||
this.snackbar = {
|
||||
message: error,
|
||||
color: "error",
|
||||
show: true,
|
||||
timeout: 5000,
|
||||
};
|
||||
}
|
||||
}
|
||||
await this.$store.dispatch(
|
||||
"accountOne/setPaymentInProgress",
|
||||
false
|
||||
);
|
||||
this.$router.push({
|
||||
name: "OrderSuccess",
|
||||
params: { orderNumber: res },
|
||||
});
|
||||
} catch (error) {
|
||||
this.isPageLoader = false;
|
||||
this.snackbar = {
|
||||
|
@ -3567,26 +3398,12 @@ export default {
|
|||
//this.$store.dispatch("userCartProduct/cartProductList");
|
||||
//this.$store.dispatch("userCartProduct/productTotalAmt");
|
||||
this.$store.dispatch("userCartProduct/fetchCartCoupon");
|
||||
if (this.basicInfo) {
|
||||
this.$store
|
||||
.dispatch("storeCredit/fetchGiftCardCreditBalance", this.basicInfo.id)
|
||||
.catch(() => {
|
||||
this.showStoreCredit = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.localStorageInitialOperation();
|
||||
this.setDiscountTextCode();
|
||||
// this.setDiscountTextCode();
|
||||
|
||||
// let checkOutTab = localStorage.getItem("cr_checkOutTab")
|
||||
// if(checkOutTab==='reviewTab') this.tabs = "reviewTab";
|
||||
} else {
|
||||
if (this.guestQuoteId) {
|
||||
//this.$store.dispatch("cartProduct/cartProductList", this.guestQuoteId);
|
||||
this.$store.dispatch("guestInfo/basicInfo");
|
||||
//this.$store.dispatch("cartProduct/productTotalAmt", this.guestQuoteId);
|
||||
this.$store.dispatch("cartProduct/fetchCartCoupon", this.guestQuoteId);
|
||||
this.setDiscountTextCode();
|
||||
}
|
||||
}
|
||||
this.verifyAddress();
|
||||
this.stockFlagHideShow();
|
||||
|
|
|
@ -26,7 +26,7 @@ function doResetPassword(resetOne) { //userId, newPassword, token
|
|||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ "email": "", "resetToken": resetOne.token, "newPassword": resetOne.newPassword })
|
||||
};
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/resetPassword`, requestOptions).then(handleResponse);
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/resetPassword`, requestOptions).then(handleResponse);
|
||||
}
|
||||
|
||||
function doForgotPassword(forgot) {
|
||||
|
@ -39,11 +39,11 @@ function doForgotPassword(forgot) {
|
|||
body: JSON.stringify({
|
||||
"email": forgot.email,
|
||||
"template": "email_reset",
|
||||
"websiteId": 1
|
||||
"websiteId": 2
|
||||
})
|
||||
};
|
||||
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/password`, requestOptions).then(handleResponse);
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/password`, requestOptions).then(handleResponse);
|
||||
}
|
||||
|
||||
/*function doconfirmEmail(token) {
|
||||
|
@ -88,7 +88,7 @@ function doSignUp(registration) {
|
|||
|
||||
// console.log(registration);
|
||||
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers`, requestOptions).then(handleResponse);
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers`, requestOptions).then(handleResponse);
|
||||
}
|
||||
/* eslint-disable no-alert, no-console , no-debugger */
|
||||
export const doUpdateSubscription = meWrapRequest((one) => {
|
||||
|
@ -110,7 +110,7 @@ export const doUpdateSubscription = meWrapRequest((one) => {
|
|||
}
|
||||
})
|
||||
};
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/me`, requestOptions)
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/me`, requestOptions)
|
||||
});
|
||||
////////////////// dummy api //////////////////
|
||||
/*async function doSignUp(firstName, lastName, email, password) {
|
||||
|
|
|
@ -67,8 +67,9 @@ export const doFilterItems = ({ items, enabledFilters, availableFilters, attribu
|
|||
for (var i = 0; i < items.length; i++) {
|
||||
var product = items[i]
|
||||
const isValid = doCheckProductForEnabledFilters({ product, enabledFilters })
|
||||
if (isValid) {
|
||||
if (isValid && product.per =='No') {
|
||||
doCountProductAttributes({ product, availableFilters, attributesMap })
|
||||
|
||||
matchingItems.push(product)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ export const doFetchCountries = wrapRequest(() => {
|
|||
}
|
||||
};
|
||||
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/directory/countries`, requestOptions)
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/directory/countries`, requestOptions)
|
||||
|
||||
});
|
||||
export const doFetchBasicInfo = meWrapRequest(() => {
|
||||
|
@ -215,7 +215,7 @@ export const doChangePassword = meWrapRequest((currentPassword, newPassword) =>
|
|||
"newPassword": newPassword
|
||||
})
|
||||
};
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/customers/retailer/password`, requestOptions)
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/me/password`, requestOptions)
|
||||
});
|
||||
export const doFetchEstimatedShippingMethods = wrapRequest((one, address) => {
|
||||
let streetAddress = [];
|
||||
|
@ -257,7 +257,7 @@ export const doFetchEstimatedShippingMethods = wrapRequest((one, address) => {
|
|||
}),
|
||||
|
||||
};
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/carts/mine/estimate-shipping-methods`, requestOptions)
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/estimate-shipping-methods`, requestOptions)
|
||||
});
|
||||
export const doShippingInformation = wrapRequest((one, address, estimated, suggestedAddress) => {
|
||||
let streetAddress = [];
|
||||
|
@ -295,7 +295,7 @@ export const doShippingInformation = wrapRequest((one, address, estimated, sugge
|
|||
}
|
||||
})
|
||||
};
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/carts/mine/shipping-information`, requestOptions)
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/shipping-information`, requestOptions)
|
||||
});
|
||||
export const doDeleteAddress = wrapRequest((addressId) => {
|
||||
const requestOptions = {
|
||||
|
@ -320,10 +320,10 @@ export const doProductsOrder = meWrapRequest((userQuote, paymentMethod, oneAddre
|
|||
"cartId": userQuote,
|
||||
"billingAddress": oneAddress,
|
||||
"paymentMethod": paymentMethod,
|
||||
"comments": ""
|
||||
"comments": "",
|
||||
})
|
||||
};
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/carts/mine/payment-information`, requestOptions)
|
||||
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/carts/mine/payment-information`, requestOptions)
|
||||
});
|
||||
|
||||
/*export const doProductsOrderOnCC = meWrapRequest((orderNumber, shippingAddress, webOrderNumber) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getField, updateField } from 'vuex-map-fields'
|
||||
import { doFilterItems } from '@/services/search.service'
|
||||
import { criteoForProductList } from "@/services/util.service";
|
||||
import { doFilterItems } from '@/services/search.service'
|
||||
//import { criteoForProductList } from "@/services/util.service";
|
||||
import Fuse from 'fuse.js'
|
||||
export const catalogBrowser = {
|
||||
namespaced: true,
|
||||
|
@ -63,7 +63,7 @@ export const catalogBrowser = {
|
|||
setSearchResults(state, results) {
|
||||
state.searchResults.page = [];
|
||||
state.searchResults.page = results;
|
||||
criteoForProductList(results);
|
||||
// criteoForProductList(results);
|
||||
},
|
||||
setFuseWithIndex(state, index) {
|
||||
state.fuseWithIndex = index
|
||||
|
@ -129,14 +129,16 @@ export const catalogBrowser = {
|
|||
const fuse = new Fuse(productsArray, options)
|
||||
commit('setFuseWithIndex', fuse)
|
||||
},
|
||||
/* eslint-disable no-alert, no-console , no-debugger */
|
||||
|
||||
search: ({ commit, state }, { fullCatalog, keywords, filters, pageNumber, pageSize, sortBy }) => {
|
||||
|
||||
//debugger
|
||||
|
||||
commit('inProgress', true)
|
||||
console.log('searching:', pageNumber)
|
||||
console.log('pageSize:', pageSize)
|
||||
commit('setEnabledFilters', filters)
|
||||
//debugger
|
||||
// commit('setEnabledFilters', filters)
|
||||
// debugger
|
||||
const products = []
|
||||
if (filters !== undefined && filters.length) {
|
||||
const categoryFilter = filters.find((f => f.prop == 'ci'))
|
||||
|
@ -154,6 +156,7 @@ export const catalogBrowser = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (keywords !== null && keywords != '') {
|
||||
products.length = 0
|
||||
const relevantResults = state.fuseWithIndex.search(keywords)
|
||||
|
@ -164,17 +167,12 @@ export const catalogBrowser = {
|
|||
}
|
||||
}
|
||||
}
|
||||
/* else {
|
||||
if (products.length < 1) {
|
||||
for (const [, product] of Object.entries(fullCatalog.products)) {
|
||||
products.push(product)
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
const availableFilters = [];
|
||||
let filteredItems = [];
|
||||
let pageData = [];
|
||||
if (products.length > 0) {
|
||||
|
||||
filteredItems = doFilterItems({
|
||||
items: products, enabledFilters: state.enabledFilters,
|
||||
availableFilters, attributesMap: window.attributesMap
|
||||
|
@ -212,6 +210,7 @@ export const catalogBrowser = {
|
|||
}
|
||||
}
|
||||
commit('setSearchResults', pageData);
|
||||
|
||||
commit('setAvailableFilters', availableFilters);
|
||||
commit('setSearchTerms', { keywords: keywords, pageNumber: pageNumber, pageSize: pageSize, sortBy: sortBy, filters: filters }
|
||||
);
|
||||
|
|
|
@ -2213,9 +2213,9 @@ caniuse-api@^3.0.0:
|
|||
lodash.uniq "^4.5.0"
|
||||
|
||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039:
|
||||
version "1.0.30001137"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001137.tgz"
|
||||
integrity sha512-54xKQZTqZrKVHmVz0+UvdZR6kQc7pJDgfhsMYDG19ID1BWoNnDMFm5Q3uSBSU401pBvKYMsHAt9qhEDcxmk8aw==
|
||||
version "1.0.30001299"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz"
|
||||
integrity sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==
|
||||
|
||||
card-validator@8.1.1:
|
||||
version "8.1.1"
|
||||
|
|
Loading…
Reference in New Issue