Merge branch 'beta' of git.treelet.net:crane/retailer-vue into dev
This commit is contained in:
commit
ec3b6b80d1
|
@ -1,13 +1,13 @@
|
||||||
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
||||||
VUE_APP_MAGENTO_API_URL=https://retailer-stg.crane.com
|
VUE_APP_MAGENTO_API_URL=https://m2-stg.crane.com
|
||||||
VUE_APP_CRANE_URL=/shop
|
VUE_APP_CRANE_URL=/shop
|
||||||
VUE_APP_GATE_URL=/gate
|
VUE_APP_GATE_URL=/gate
|
||||||
VUE_APP_ME_URL=/b2b
|
VUE_APP_ME_URL=/b2b
|
||||||
VUE_APP_LOGIN_URL=/gate/sign-in
|
VUE_APP_LOGIN_URL=/gate/sign-in
|
||||||
VUE_APP_PERSONALIZE_URL=https://studio-stg.crane.com/personalize
|
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_IMAGE_PATH_URL=https://m2-stg.crane.com/media/catalog/product
|
||||||
VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
||||||
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer-stg.crane.com
|
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://m2-stg.crane.com
|
||||||
VUE_APP_NODESLS_API_URL=https://imagelib-sls-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_HOME_PAGE_URL=https://www-stg.crane.com
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
VUE_APP_BRAINTREE_AUTH_KEY=sandbox_bn48hmp6_cz6p85sw4dr5tp8h
|
||||||
VUE_APP_MAGENTO_API_URL=https://retailer-stg.crane.com
|
VUE_APP_MAGENTO_API_URL=https://m2-stg.crane.com
|
||||||
VUE_APP_CRANE_URL=/shop
|
VUE_APP_CRANE_URL=/shop
|
||||||
VUE_APP_GATE_URL=/gate
|
VUE_APP_GATE_URL=/gate
|
||||||
VUE_APP_ME_URL=/b2b
|
VUE_APP_ME_URL=/b2b
|
||||||
VUE_APP_LOGIN_URL=/gate/sign-in
|
VUE_APP_LOGIN_URL=/gate/sign-in
|
||||||
VUE_APP_PERSONALIZE_URL=https://studio-stg.crane.com/personalize
|
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_IMAGE_PATH_URL=https://m2-stg.crane.com/media/catalog/product
|
||||||
VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
VUE_APP_RETAILOR_ID=49057567-f789-420c-98b6-2e0443af73f5
|
||||||
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://retailer-stg.crane.com
|
VUE_APP_IMAGE_CATEGORY_PATH_URL=https://m2-stg.crane.com
|
||||||
VUE_APP_NODESLS_API_URL=https://imagelib-sls-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_HOME_PAGE_URL=https://www-stg.crane.com
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"branch_name":"dev","last_commit_date":"2022-01-19T13:25:20.000Z","last_commit_author":"rakesh","last_commit_hash":"aba7cd3dad225652a48ca6e2d596456c455c5db5"}
|
{"branch_name":"dev","last_commit_date":"2022-01-21T06:09:37.000Z","last_commit_author":"anju j","last_commit_hash":"934b913728e33b2c9f6fdfff0b610198132bfe8a"}
|
|
@ -104,7 +104,7 @@ margin-bottom: 0px !important;
|
||||||
.me-header-search-field .theme--dark.v-label {
|
.me-header-search-field .theme--dark.v-label {
|
||||||
color:#1d1d1d;
|
color:#1d1d1d;
|
||||||
}
|
}
|
||||||
.v-menu__content,.v-list{
|
/*.v-menu__content,.v-list{
|
||||||
border-radius: 0px !important;
|
border-radius: 0px !important;
|
||||||
top: 64px !important;
|
top: 64px !important;
|
||||||
}
|
}*/
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
class="text-uppercase ls-0 body productpage-button"
|
class="text-uppercase ls-0 body productpage-button"
|
||||||
tile
|
tile
|
||||||
depressed
|
depressed
|
||||||
@click="addToCart(product.sku)"
|
@click="addToCart(product.sku,product.mq)"
|
||||||
>
|
>
|
||||||
<v-progress-circular
|
<v-progress-circular
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -106,20 +106,17 @@
|
||||||
}}</v-alert>
|
}}</v-alert>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<SnackbarComponent :snackbar="snackbar"></SnackbarComponent>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable no-alert, no-console , no-debugger */
|
/* eslint-disable no-alert, no-console , no-debugger */
|
||||||
//import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
//import * as easings from "vuetify/es5/services/goto/easing-patterns";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import SnackbarComponent from "@/components/common/SnackbarComponent";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RetailerSearchProducts",
|
name: "RetailerSearchProducts",
|
||||||
components: {
|
components: {
|
||||||
SnackbarComponent
|
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
"criteria",
|
"criteria",
|
||||||
|
@ -172,29 +169,29 @@ export default {
|
||||||
var with2Decimals = num.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0];
|
var with2Decimals = num.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0];
|
||||||
return with2Decimals;
|
return with2Decimals;
|
||||||
},
|
},
|
||||||
addToCart(sku) {
|
async addToCart(sku,qty) {
|
||||||
if (sku) {
|
if (sku) {
|
||||||
this.errorMessage = "";
|
debugger
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
this.$store
|
await this.$store
|
||||||
.dispatch("userCartProduct/addToCart", {
|
.dispatch("userCartProduct/addToCart", {
|
||||||
sku: sku,
|
sku: sku,
|
||||||
qty: 1,
|
qty:qty,
|
||||||
ccid: null,
|
ccid: null,
|
||||||
price: null,
|
price: null,
|
||||||
personalizeDetails: null
|
personalizeDetails: null
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$store.dispatch("userCartProduct/cartProductList");
|
this.snackbar = {
|
||||||
|
|
||||||
this.$store.dispatch("userCartProduct/cartDrawer", true);
|
|
||||||
this.snackbar = {
|
|
||||||
message: "Product Added Successfully",
|
message: "Product Added Successfully",
|
||||||
color: "success",
|
color: "success",
|
||||||
show: true,
|
show: true,
|
||||||
timeout: 2000
|
timeout: 2000
|
||||||
};
|
};
|
||||||
|
debugger
|
||||||
|
this.$store.dispatch("userCartProduct/cartProductList");
|
||||||
|
this.$emit("actionClose", this.snackbar);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.snackbar = {
|
this.snackbar = {
|
||||||
|
@ -203,7 +200,7 @@ export default {
|
||||||
show: true,
|
show: true,
|
||||||
timeout: 2000
|
timeout: 2000
|
||||||
};
|
};
|
||||||
|
this.$emit("actionClose", this.snackbar);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,7 @@ export default [
|
||||||
{
|
{
|
||||||
path: '*',
|
path: '*',
|
||||||
name: 'RouteNotFound',
|
name: 'RouteNotFound',
|
||||||
|
redirect: '/b2b',
|
||||||
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/route_not_found.vue'),
|
component: () => import( /* webpackChunkName: "craneMain" */'@/routes/retailer/route_not_found.vue'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,15 @@
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<v-card tile flat v-if="searchData">
|
<v-card tile flat v-if="searchData">
|
||||||
<RetailerSearchProducts />
|
<RetailerSearchProducts
|
||||||
|
@actionClose="showSnackBarMessage"
|
||||||
|
/>
|
||||||
</v-card>
|
</v-card>
|
||||||
</div>
|
</div>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row v-show="cartProductsItem.length == 0">
|
<v-row v-show="cartProductsItem.length == 0">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-alert class="alert-box-outline" type="error" text dense
|
<v-alert class="alert-box-outline" type="error" text dense
|
||||||
|
@ -360,12 +362,12 @@ export default {
|
||||||
this.$store.dispatch("catalogBrowser/index", {
|
this.$store.dispatch("catalogBrowser/index", {
|
||||||
productsCatalog: window.craneCatalog.products,
|
productsCatalog: window.craneCatalog.products,
|
||||||
});
|
});
|
||||||
if (this.userAuth) {
|
/* if (this.userAuth) {
|
||||||
this.$store.dispatch("userCartProduct/fetchCartCoupon");
|
this.$store.dispatch("userCartProduct/fetchCartCoupon");
|
||||||
|
|
||||||
this.calledCriteoViewBasket();
|
this.calledCriteoViewBasket();
|
||||||
}
|
}
|
||||||
this.stockFlagHideShow();
|
this.stockFlagHideShow();*/
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -464,8 +464,8 @@
|
||||||
v-if="shippingInformations.totals.grandTotal !== 0"
|
v-if="shippingInformations.totals.grandTotal !== 0"
|
||||||
>
|
>
|
||||||
<v-radio
|
<v-radio
|
||||||
:label="shippingInformations.paymentMethods[0].title"
|
:label="shippingInformations.paymentMethods[1].title"
|
||||||
:value="shippingInformations.paymentMethods[0].code"
|
:value="shippingInformations.paymentMethods[1].code"
|
||||||
class="black--text"
|
class="black--text"
|
||||||
></v-radio>
|
></v-radio>
|
||||||
<div v-if="paymentMethod === 'purchaseorder'">
|
<div v-if="paymentMethod === 'purchaseorder'">
|
||||||
|
@ -491,34 +491,32 @@
|
||||||
>Edit</v-btn
|
>Edit</v-btn
|
||||||
>
|
>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row> <v-form ref="poNumberForm" v-model="valid" :lazy-validation="lazy">
|
||||||
<v-row class="pl-3">
|
<v-row >
|
||||||
|
<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-col cols="12" align="right">
|
||||||
<v-btn
|
<v-btn
|
||||||
class="primary mx-3 text-uppercase"
|
class="primary mx-3 text-uppercase"
|
||||||
@click="placeOrderFree()"
|
@click="placeOrderFree($event)"
|
||||||
tile
|
tile
|
||||||
depressed
|
depressed
|
||||||
>Place Order</v-btn
|
>Place Order</v-btn
|
||||||
>
|
>
|
||||||
</v-col>
|
</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>
|
</v-row>
|
||||||
|
</v-form>
|
||||||
</div>
|
</div>
|
||||||
<v-row v-else>
|
<v-row v-else>
|
||||||
<v-col cols="12" sm="8" v-if="this.userAuth">
|
<v-col cols="12" sm="8" v-if="this.userAuth">
|
||||||
|
@ -701,226 +699,7 @@
|
||||||
</v-col>
|
</v-col>
|
||||||
</div>-->
|
</div>-->
|
||||||
</v-radio-group>
|
</v-radio-group>
|
||||||
<v-radio-group
|
|
||||||
:mandatory="false"
|
|
||||||
v-model="paymentMethodFree"
|
|
||||||
v-else-if="shippingInformations.totals.grandTotal == 0"
|
|
||||||
>
|
|
||||||
<p class="h3 mb-5">Payment Method</p>
|
|
||||||
<v-radio
|
|
||||||
:label="shippingInformations.paymentMethods[2].title"
|
|
||||||
:value="paymentMethodFree"
|
|
||||||
class="black--text"
|
|
||||||
></v-radio>
|
|
||||||
<div>
|
|
||||||
<v-checkbox
|
|
||||||
label="My billing and shipping address are the same"
|
|
||||||
v-model="sameAddress"
|
|
||||||
@change="resetFields()"
|
|
||||||
dense
|
|
||||||
:readonly="readOnlyCheckBox"
|
|
||||||
hide-details
|
|
||||||
></v-checkbox>
|
|
||||||
<v-row v-if="sameAddress">
|
|
||||||
<v-col cols="12" class="pl-sm-10">
|
|
||||||
<BillingAddressComponent :address="address" />
|
|
||||||
<v-btn
|
|
||||||
class="primary my-3"
|
|
||||||
large
|
|
||||||
v-if="editBillingButton"
|
|
||||||
@click="editBillBook()"
|
|
||||||
>Edit</v-btn
|
|
||||||
>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-row v-else>
|
|
||||||
<v-col cols="12" sm="8" v-if="this.userAuth">
|
|
||||||
<v-row v-if="addressLength > 0">
|
|
||||||
<v-col cols="12">
|
|
||||||
<v-select
|
|
||||||
v-model="selectedBillingAddress"
|
|
||||||
dense
|
|
||||||
:items="billingAddressList"
|
|
||||||
outlined
|
|
||||||
return-object
|
|
||||||
class="billing-address-select"
|
|
||||||
@change="changeBillingAddress()"
|
|
||||||
item-value="id"
|
|
||||||
>
|
|
||||||
<template v-slot:selection="data">
|
|
||||||
<div v-if="data.item.value">
|
|
||||||
<span class>New Address</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="
|
|
||||||
d-inline-block
|
|
||||||
text-truncate
|
|
||||||
pt-sm-0
|
|
||||||
"
|
|
||||||
v-else
|
|
||||||
>
|
|
||||||
<span class
|
|
||||||
>{{ data.item.firstname }}
|
|
||||||
{{ data.item.lastname }}</span
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="body pl-1"
|
|
||||||
v-if="data.item.streetNoOne"
|
|
||||||
>{{ data.item.streetNoOne }},
|
|
||||||
{{ data.item.streetNoTwo }}</span
|
|
||||||
>
|
|
||||||
<span class="body pl-1" v-else
|
|
||||||
>{{ data.item.street[0] }} ,{{
|
|
||||||
data.item.street[1]
|
|
||||||
}}</span
|
|
||||||
>
|
|
||||||
<span class="pl-1"
|
|
||||||
>{{ data.item.city }}
|
|
||||||
{{ data.item.postcode }}</span
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-slot:item="data">
|
|
||||||
<v-list-item-content>
|
|
||||||
<v-list-item-title
|
|
||||||
v-if="data.item.value"
|
|
||||||
>
|
|
||||||
<span class="ml-2">New Address</span>
|
|
||||||
</v-list-item-title>
|
|
||||||
<v-list-item-title v-else>
|
|
||||||
<span class="ml-2"
|
|
||||||
>{{ data.item.firstname }}
|
|
||||||
{{ data.item.lastname }},</span
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="body"
|
|
||||||
v-if="data.item.streetNoOne"
|
|
||||||
>{{ data.item.streetNoOne }},
|
|
||||||
{{ data.item.streetNoTwo }}</span
|
|
||||||
>
|
|
||||||
<span class="body" v-else
|
|
||||||
>{{ data.item.street[0] }} ,{{
|
|
||||||
data.item.street[1]
|
|
||||||
}}</span
|
|
||||||
>
|
|
||||||
<span class
|
|
||||||
>{{ data.item.city }},
|
|
||||||
{{ data.item.postcode }}</span
|
|
||||||
>
|
|
||||||
</v-list-item-title>
|
|
||||||
</v-list-item-content>
|
|
||||||
</template>
|
|
||||||
</v-select>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
class="d-flex justify-end pa-0"
|
|
||||||
v-if="!showNewBillingForm"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="primary ma-3 text-uppercase"
|
|
||||||
@click="cancelBillingAddress"
|
|
||||||
>Cancel</v-btn
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="success ma-3 text-uppercase"
|
|
||||||
@click="updateBillingAddress"
|
|
||||||
>Update</v-btn
|
|
||||||
>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-row v-if="showNewBillingForm">
|
|
||||||
<v-col cols="12">
|
|
||||||
<ShippingAddressFormComponent
|
|
||||||
@actionValid="checkFormValid"
|
|
||||||
:hideAndShowFields="hideAndShowFields"
|
|
||||||
@verifyAddress="verifyAddress"
|
|
||||||
ref="billingForm"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" class="py-0">
|
|
||||||
<v-checkbox
|
|
||||||
label="Save in Address Book"
|
|
||||||
v-model="saveInBillingAddressBook"
|
|
||||||
class="mt-0"
|
|
||||||
dense
|
|
||||||
hide-details
|
|
||||||
></v-checkbox>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" sm="8" v-else>
|
|
||||||
<GuestShippingAddressForm
|
|
||||||
@actionValid="checkGuestFormValid"
|
|
||||||
:hideEmail="hideEmailField"
|
|
||||||
@verifyAddress="verifyAddress"
|
|
||||||
ref="addressForm"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
sm="8"
|
|
||||||
class="d-flex justify-end pa-0"
|
|
||||||
v-if="showNewBillingForm"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="primary ma-3 text-uppercase"
|
|
||||||
@click="cancelBillingAddress"
|
|
||||||
>Cancel</v-btn
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="success ma-3 text-uppercase"
|
|
||||||
@click="newBillingAddress"
|
|
||||||
>Update</v-btn
|
|
||||||
>
|
|
||||||
</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-divider class="my-3"></v-divider>
|
|
||||||
<v-radio
|
|
||||||
:label="shippingInformations.paymentMethods[0].title"
|
|
||||||
:value="shippingInformations.paymentMethods[0].code"
|
|
||||||
class="black--text"
|
|
||||||
></v-radio>
|
|
||||||
<div v-if="paymentMethod === 'braintree_paypal'">
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" class="pr-10 pt-10">
|
|
||||||
<v-btn
|
|
||||||
id="paypal-button"
|
|
||||||
tile
|
|
||||||
class="float-right text-uppercase"
|
|
||||||
color="primary"
|
|
||||||
>Continue To Paypal</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</div>-->
|
|
||||||
</v-radio-group>
|
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" v-else>
|
<v-col cols="12" v-else>
|
||||||
|
@ -969,433 +748,7 @@
|
||||||
>
|
>
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-radio-group
|
|
||||||
:mandatory="false"
|
|
||||||
v-model="paymentMethod"
|
|
||||||
v-if="
|
|
||||||
giftCardProduct &&
|
|
||||||
cartProductTotalAmt.grandTotal !== 0
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<p class="h3 mb-5">Payment Method</p>
|
|
||||||
<v-radio
|
|
||||||
:label="giftCardProductTitle"
|
|
||||||
:value="giftCardProductCode"
|
|
||||||
class="black--text"
|
|
||||||
></v-radio>
|
|
||||||
<div v-if="paymentMethod === 'braintree'">
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" sm="8" v-if="this.userAuth">
|
|
||||||
<v-row v-if="addressLength > 0">
|
|
||||||
<v-col cols="12">
|
|
||||||
<v-select
|
|
||||||
v-model="selectedBillingAddress"
|
|
||||||
dense
|
|
||||||
:items="billingAddressList"
|
|
||||||
outlined
|
|
||||||
return-object
|
|
||||||
class="billing-address-select"
|
|
||||||
@change="changeBillingAddress()"
|
|
||||||
item-value="id"
|
|
||||||
>
|
|
||||||
<template v-slot:selection="data">
|
|
||||||
<div v-if="data.item.value">
|
|
||||||
<span class>New Address</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="
|
|
||||||
d-inline-block
|
|
||||||
text-truncate
|
|
||||||
pt-sm-0
|
|
||||||
"
|
|
||||||
v-else
|
|
||||||
>
|
|
||||||
<span class
|
|
||||||
>{{ data.item.firstname }}
|
|
||||||
{{ data.item.lastname }}</span
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="body pl-1"
|
|
||||||
v-if="data.item.streetNoOne"
|
|
||||||
>{{ data.item.streetNoOne }},
|
|
||||||
{{ data.item.streetNoTwo }}</span
|
|
||||||
>
|
|
||||||
<span class="body pl-1" v-else
|
|
||||||
>{{ data.item.street[0] }} ,{{
|
|
||||||
data.item.street[1]
|
|
||||||
}}</span
|
|
||||||
>
|
|
||||||
<span class="pl-1"
|
|
||||||
>{{ data.item.city }}
|
|
||||||
{{ data.item.postcode }}</span
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-slot:item="data">
|
|
||||||
<v-list-item-content>
|
|
||||||
<v-list-item-title
|
|
||||||
v-if="data.item.value"
|
|
||||||
>
|
|
||||||
<span class="ml-2">New Address</span>
|
|
||||||
</v-list-item-title>
|
|
||||||
<v-list-item-title v-else>
|
|
||||||
<span class="ml-2"
|
|
||||||
>{{ data.item.firstname }}
|
|
||||||
{{ data.item.lastname }},</span
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="body"
|
|
||||||
v-if="data.item.streetNoOne"
|
|
||||||
>{{ data.item.streetNoOne }},
|
|
||||||
{{ data.item.streetNoTwo }}</span
|
|
||||||
>
|
|
||||||
<span class="body" v-else
|
|
||||||
>{{ data.item.street[0] }} ,{{
|
|
||||||
data.item.street[1]
|
|
||||||
}}</span
|
|
||||||
>
|
|
||||||
<span class
|
|
||||||
>{{ data.item.city }},
|
|
||||||
{{ data.item.postcode }}</span
|
|
||||||
>
|
|
||||||
</v-list-item-title>
|
|
||||||
</v-list-item-content>
|
|
||||||
</template>
|
|
||||||
</v-select>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
class="d-flex justify-end pa-0"
|
|
||||||
v-if="!showNewBillingForm"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="primary ma-3 text-uppercase"
|
|
||||||
@click="cancelBillingAddress"
|
|
||||||
>Cancel</v-btn
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="success ma-3 text-uppercase"
|
|
||||||
@click="updateBillingAddress"
|
|
||||||
>Update</v-btn
|
|
||||||
>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-row v-else-if="showNewBillingForm">
|
|
||||||
<v-col cols="12">
|
|
||||||
<ShippingAddressFormComponent
|
|
||||||
@actionValid="checkFormValid"
|
|
||||||
:hideAndShowFields="hideAndShowFields"
|
|
||||||
@verifyAddress="verifyAddress"
|
|
||||||
ref="billingForm"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" class="py-0">
|
|
||||||
<v-checkbox
|
|
||||||
label="Save in Address Book"
|
|
||||||
v-model="saveInBillingAddressBook"
|
|
||||||
class="mt-0"
|
|
||||||
dense
|
|
||||||
hide-details
|
|
||||||
></v-checkbox>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" sm="8" v-else>
|
|
||||||
<GuestShippingAddressForm
|
|
||||||
@actionValid="checkGuestFormValid"
|
|
||||||
:hideHeader="true"
|
|
||||||
:hideEmail="hideEmailFieldGiftCardProduct"
|
|
||||||
@verifyAddress="verifyAddress"
|
|
||||||
ref="addressFormGuest"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
sm="8"
|
|
||||||
class="d-flex justify-end pa-0"
|
|
||||||
v-if="showNewBillingForm"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="primary ma-3 text-uppercase"
|
|
||||||
@click="cancelBillingAddress"
|
|
||||||
>Cancel</v-btn
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="success ma-3 text-uppercase"
|
|
||||||
@click="newBillingAddress"
|
|
||||||
>Update</v-btn
|
|
||||||
>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-row>
|
|
||||||
<CardPayment
|
|
||||||
@submitCardPayment="submitCardPayment"
|
|
||||||
/>
|
|
||||||
<!-- <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-divider class="my-3"></v-divider>
|
|
||||||
<v-radio
|
|
||||||
:label="shippingInformations.paymentMethods[0].title"
|
|
||||||
:value="shippingInformations.paymentMethods[0].code"
|
|
||||||
class="black--text"
|
|
||||||
></v-radio>
|
|
||||||
<div v-if="paymentMethod === 'braintree_paypal'">
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" class="pr-10 pt-10">
|
|
||||||
<v-btn
|
|
||||||
id="paypal-button"
|
|
||||||
tile
|
|
||||||
class="float-right text-uppercase"
|
|
||||||
color="primary"
|
|
||||||
>Continue To Paypal</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</div>-->
|
|
||||||
</v-radio-group>
|
|
||||||
<v-radio-group
|
|
||||||
:mandatory="false"
|
|
||||||
v-model="paymentMethodFree"
|
|
||||||
v-else-if="
|
|
||||||
giftCardProduct && cartProductTotalAmt.grandTotal == 0
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<p class="h3 mb-5">Payment Method</p>
|
|
||||||
<v-radio
|
|
||||||
:label="giftCardFreeProductTitle"
|
|
||||||
:value="paymentMethodFree"
|
|
||||||
class="black--text"
|
|
||||||
></v-radio>
|
|
||||||
<div>
|
|
||||||
<v-checkbox
|
|
||||||
label="My billing and shipping address are the same"
|
|
||||||
v-model="sameAddress"
|
|
||||||
@change="resetFields()"
|
|
||||||
dense
|
|
||||||
:readonly="readOnlyCheckBox"
|
|
||||||
hide-details
|
|
||||||
></v-checkbox>
|
|
||||||
<v-row v-if="sameAddress">
|
|
||||||
<v-col cols="12" class="pl-sm-10">
|
|
||||||
<BillingAddressComponent :address="address" />
|
|
||||||
<v-btn
|
|
||||||
class="primary my-3"
|
|
||||||
large
|
|
||||||
v-if="editBillingButton"
|
|
||||||
@click="editBillBook()"
|
|
||||||
>Edit</v-btn
|
|
||||||
>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-row v-else>
|
|
||||||
<v-col cols="12" sm="8" v-if="this.userAuth">
|
|
||||||
<v-row v-if="addressLength > 0">
|
|
||||||
<v-col cols="12">
|
|
||||||
<v-select
|
|
||||||
v-model="selectedBillingAddress"
|
|
||||||
dense
|
|
||||||
:items="billingAddressList"
|
|
||||||
outlined
|
|
||||||
return-object
|
|
||||||
class="billing-address-select"
|
|
||||||
@change="changeBillingAddress()"
|
|
||||||
item-value="id"
|
|
||||||
>
|
|
||||||
<template v-slot:selection="data">
|
|
||||||
<div v-if="data.item.value">
|
|
||||||
<span class>New Address</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="
|
|
||||||
d-inline-block
|
|
||||||
text-truncate
|
|
||||||
pt-sm-0
|
|
||||||
"
|
|
||||||
v-else
|
|
||||||
>
|
|
||||||
<span class
|
|
||||||
>{{ data.item.firstname }}
|
|
||||||
{{ data.item.lastname }}</span
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="body pl-1"
|
|
||||||
v-if="data.item.streetNoOne"
|
|
||||||
>{{ data.item.streetNoOne }},
|
|
||||||
{{ data.item.streetNoTwo }}</span
|
|
||||||
>
|
|
||||||
<span class="body pl-1" v-else
|
|
||||||
>{{ data.item.street[0] }} ,{{
|
|
||||||
data.item.street[1]
|
|
||||||
}}</span
|
|
||||||
>
|
|
||||||
<span class="pl-1"
|
|
||||||
>{{ data.item.city }}
|
|
||||||
{{ data.item.postcode }}</span
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-slot:item="data">
|
|
||||||
<v-list-item-content>
|
|
||||||
<v-list-item-title
|
|
||||||
v-if="data.item.value"
|
|
||||||
>
|
|
||||||
<span class="ml-2">New Address</span>
|
|
||||||
</v-list-item-title>
|
|
||||||
<v-list-item-title v-else>
|
|
||||||
<span class="ml-2"
|
|
||||||
>{{ data.item.firstname }}
|
|
||||||
{{ data.item.lastname }},</span
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="body"
|
|
||||||
v-if="data.item.streetNoOne"
|
|
||||||
>{{ data.item.streetNoOne }},
|
|
||||||
{{ data.item.streetNoTwo }}</span
|
|
||||||
>
|
|
||||||
<span class="body" v-else
|
|
||||||
>{{ data.item.street[0] }} ,{{
|
|
||||||
data.item.street[1]
|
|
||||||
}}</span
|
|
||||||
>
|
|
||||||
<span class
|
|
||||||
>{{ data.item.city }},
|
|
||||||
{{ data.item.postcode }}</span
|
|
||||||
>
|
|
||||||
</v-list-item-title>
|
|
||||||
</v-list-item-content>
|
|
||||||
</template>
|
|
||||||
</v-select>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
class="d-flex justify-end pa-0"
|
|
||||||
v-if="!showNewBillingForm"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="primary ma-3 text-uppercase"
|
|
||||||
@click="cancelBillingAddress"
|
|
||||||
>Cancel</v-btn
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="success ma-3 text-uppercase"
|
|
||||||
@click="updateBillingAddress"
|
|
||||||
>Update</v-btn
|
|
||||||
>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-row v-if="showNewBillingForm">
|
|
||||||
<v-col cols="12">
|
|
||||||
<ShippingAddressFormComponent
|
|
||||||
@actionValid="checkFormValid"
|
|
||||||
:hideAndShowFields="hideAndShowFields"
|
|
||||||
@verifyAddress="verifyAddress"
|
|
||||||
ref="billingForm"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" class="py-0">
|
|
||||||
<v-checkbox
|
|
||||||
label="Save in Address Book"
|
|
||||||
v-model="saveInBillingAddressBook"
|
|
||||||
class="mt-0"
|
|
||||||
dense
|
|
||||||
hide-details
|
|
||||||
></v-checkbox>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" sm="8" v-else>
|
|
||||||
<GuestShippingAddressForm
|
|
||||||
@actionValid="checkGuestFormValid"
|
|
||||||
:hideEmail="hideEmailField"
|
|
||||||
@verifyAddress="verifyAddress"
|
|
||||||
ref="addressForm"
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
<v-col
|
|
||||||
cols="12"
|
|
||||||
sm="8"
|
|
||||||
class="d-flex justify-end pa-0"
|
|
||||||
v-if="showNewBillingForm"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="primary ma-3 text-uppercase"
|
|
||||||
@click="cancelBillingAddress"
|
|
||||||
>Cancel</v-btn
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
class="success ma-3 text-uppercase"
|
|
||||||
@click="newBillingAddress"
|
|
||||||
>Update</v-btn
|
|
||||||
>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<v-row class="pl-3">
|
|
||||||
<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()"
|
|
||||||
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-divider class="my-3"></v-divider>
|
|
||||||
<v-radio
|
|
||||||
:label="shippingInformations.paymentMethods[0].title"
|
|
||||||
:value="shippingInformations.paymentMethods[0].code"
|
|
||||||
class="black--text"
|
|
||||||
></v-radio>
|
|
||||||
<div v-if="paymentMethod === 'braintree_paypal'">
|
|
||||||
|
|
||||||
<v-col cols="12" sm="12" class="pr-10 pt-10">
|
|
||||||
<v-btn
|
|
||||||
id="paypal-button"
|
|
||||||
tile
|
|
||||||
class="float-right text-uppercase"
|
|
||||||
color="primary"
|
|
||||||
>Continue To Paypal</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</div>-->
|
|
||||||
</v-radio-group>
|
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
</v-col>
|
</v-col>
|
||||||
<!-- <v-col cols="12" class="py-0">
|
<!-- <v-col cols="12" class="py-0">
|
||||||
|
@ -1852,7 +1205,7 @@ export default {
|
||||||
validLogin: false,
|
validLogin: false,
|
||||||
passwordFields: false,
|
passwordFields: false,
|
||||||
showAlert: false,
|
showAlert: false,
|
||||||
valid: false,
|
valid: true,
|
||||||
validDiscountCode: true,
|
validDiscountCode: true,
|
||||||
chekoutFlag: false,
|
chekoutFlag: false,
|
||||||
tabs: "",
|
tabs: "",
|
||||||
|
@ -2754,8 +2107,10 @@ export default {
|
||||||
onGatewayLoadFail(instance) {
|
onGatewayLoadFail(instance) {
|
||||||
console.log("load failed", instance);
|
console.log("load failed", instance);
|
||||||
},
|
},
|
||||||
async placeOrderFree() {
|
async placeOrderFree(e) {
|
||||||
try {
|
try {
|
||||||
|
e.preventDefault();
|
||||||
|
if (this.$refs.poNumberForm.validate()) {
|
||||||
this.isPageLoader = true;
|
this.isPageLoader = true;
|
||||||
if (this.userAuth) {
|
if (this.userAuth) {
|
||||||
try {
|
try {
|
||||||
|
@ -2773,101 +2128,9 @@ export default {
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
let res = await this.$store.dispatch("guestInfo/setOrder", {
|
|
||||||
userEmail: this.email,
|
|
||||||
paymentMethod: {
|
|
||||||
method: this.freePaymentMethod,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
await this.$store.dispatch("guestInfo/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("guestInfo/setPaymentInProgress", false);
|
|
||||||
this.$router.push({
|
|
||||||
name: "OrderSuccess",
|
|
||||||
params: { orderNumber: res },
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
this.isPageLoader = false;
|
|
||||||
this.snackbar = {
|
|
||||||
message: error.message,
|
|
||||||
color: "error",
|
|
||||||
show: true,
|
|
||||||
timeout: 5000,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
},
|
},
|
||||||
async submitCardPayment(payment) {
|
async submitCardPayment(payment) {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
...authHeader()
|
...authHeader()
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crcmsBlock/${blockId}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crcmsBlock/${blockId}`, requestOptions)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const doFetchList = wrapRequest(() => {
|
export const doFetchList = wrapRequest(() => {
|
||||||
|
@ -22,9 +22,9 @@
|
||||||
'Authorization': 'Bearer ' + 'q6u1q4thvtw03ajuo5v6q3cb8vlq623v'
|
'Authorization': 'Bearer ' + 'q6u1q4thvtw03ajuo5v6q3cb8vlq623v'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/cmsBlock/search?searchCriteria[filter_groups][0][filters][0][field]=id&searchCriteria[filter_groups][0][filters][0][value]=10&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/cmsBlock/search?searchCriteria[filter_groups][0][filters][0][field]=id&searchCriteria[filter_groups][0][filters][0][value]=10&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`, requestOptions)
|
||||||
|
|
||||||
// return fetch(`${vueAppMagenotApiUrl}/rest/V1/cmsBlock/search?
|
// return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/cmsBlock/search?
|
||||||
// searchCriteria[filter_groups][0][filters][0][field]=id&
|
// searchCriteria[filter_groups][0][filters][0][field]=id&
|
||||||
// searchCriteria[filter_groups][0][filters][0][value]=10&
|
// searchCriteria[filter_groups][0][filters][0][value]=10&
|
||||||
// searchCriteria[filter_groups][0][filters][0][condition_type]=eq&
|
// searchCriteria[filter_groups][0][filters][0][condition_type]=eq&
|
||||||
|
@ -38,5 +38,5 @@
|
||||||
...authHeader()
|
...authHeader()
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crcmsPage/search?searchCriteria[filter_groups][0][filters][0][field]=identifier&searchCriteria[filter_groups][0][filters][0][value]=${pageUrlKey}&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crcmsPage/search?searchCriteria[filter_groups][0][filters][0][field]=identifier&searchCriteria[filter_groups][0][filters][0][value]=${pageUrlKey}&searchCriteria[filter_groups][0][filters][0][condition_type]=eq`, requestOptions)
|
||||||
});
|
});
|
|
@ -14,7 +14,7 @@ export const doLogin = wrapRequest((loginDetail) => {
|
||||||
password: loginDetail.password
|
password: loginDetail.password
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagentoApiUrl}/rest/V1/integration/customer/token`, requestOptions);
|
return fetch(`${vueAppMagentoApiUrl}/rest/crn_retailer/V1/integration/customer/token`, requestOptions);
|
||||||
});
|
});
|
||||||
|
|
||||||
////////////////// dummy api //////////////////
|
////////////////// dummy api //////////////////
|
||||||
|
|
|
@ -68,7 +68,7 @@ const meHandleError = async errorResponse => {
|
||||||
if (localStorage.getItem("cr_changePassowrd") == "true") {
|
if (localStorage.getItem("cr_changePassowrd") == "true") {
|
||||||
localStorage.clear("cr_changePassowrd")
|
localStorage.clear("cr_changePassowrd")
|
||||||
} else {
|
} else {
|
||||||
//loginInterrupt(window.location.href, 'There was an access violation caused by your request. You need to sign back in please.');
|
loginInterrupt(window.location.href, 'There was an access violation caused by your request. You need to sign back in please.');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -127,9 +127,9 @@ const handleError = async errorResponse => {
|
||||||
if (typeof Vue.$snotify != 'undefined') {
|
if (typeof Vue.$snotify != 'undefined') {
|
||||||
Vue.$snotify.error(data_401.message);
|
Vue.$snotify.error(data_401.message);
|
||||||
}
|
}
|
||||||
throw data_401;
|
// throw data_401;
|
||||||
|
|
||||||
//loginInterrupt(window.location.href, 'There was an access violation caused by your request. You need to sign back in please.');
|
loginInterrupt(window.location.href, 'There was an access violation caused by your request. You need to sign back in please.');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 400:
|
case 400:
|
||||||
|
|
|
@ -15,7 +15,7 @@ export const doFetchOrderProductsList = wrapRequest((emailId) => {
|
||||||
// ...authHeader()
|
// ...authHeader()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crorders?searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value]=${emailId}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crorders?searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value]=${emailId}`, requestOptions)
|
||||||
|
|
||||||
});
|
});
|
||||||
export const doFetchOrderProduct = wrapRequest((orderId) => {
|
export const doFetchOrderProduct = wrapRequest((orderId) => {
|
||||||
|
@ -27,7 +27,7 @@ export const doFetchOrderProduct = wrapRequest((orderId) => {
|
||||||
// ...authHeader()
|
// ...authHeader()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crorders/${orderId}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crorders/${orderId}`, requestOptions)
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ export const doFetchProductsList = wrapRequest(() => {
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts?searchCriteria[current_page]=1&searchCriteria[page_size]=27`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts?searchCriteria[current_page]=1&searchCriteria[page_size]=27`, requestOptions)
|
||||||
});
|
});
|
||||||
export const doFetchProductsMedia = wrapRequest((sku) => {
|
export const doFetchProductsMedia = wrapRequest((sku) => {
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
|
@ -157,7 +157,7 @@ export const doFetchProductsMedia = wrapRequest((sku) => {
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/${sku}?fields=sku,media_gallery_entries[file]`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts/${sku}?fields=sku,media_gallery_entries[file]`, requestOptions)
|
||||||
});
|
});
|
||||||
export const doFetchProductsAttributes = wrapRequest((sku) => {
|
export const doFetchProductsAttributes = wrapRequest((sku) => {
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
|
@ -168,7 +168,7 @@ export const doFetchProductsAttributes = wrapRequest((sku) => {
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/${sku}?fields=sku,custom_attributes`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts/${sku}?fields=sku,custom_attributes`, requestOptions)
|
||||||
});
|
});
|
||||||
export const doFetchAttributeList = wrapRequest(() => {
|
export const doFetchAttributeList = wrapRequest(() => {
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
|
@ -178,7 +178,7 @@ export const doFetchAttributeList = wrapRequest(() => {
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/attributes?searchCriteria=&fields=items[attribute_id,attribute_code,options,frontend_labels]`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts/attributes?searchCriteria=&fields=items[attribute_id,attribute_code,options,frontend_labels]`, requestOptions)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const doFetchFilterOptions = async () => {
|
export const doFetchFilterOptions = async () => {
|
||||||
|
@ -435,7 +435,7 @@ export const doFetchProductDetails = wrapRequest((sku) => {
|
||||||
'Access-Control-Allow-Origin': '*'
|
'Access-Control-Allow-Origin': '*'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/product/${sku}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/product/${sku}`, requestOptions)
|
||||||
|
|
||||||
});
|
});
|
||||||
export const doFetchConfiguredProductDetails = wrapRequest((productId) => {
|
export const doFetchConfiguredProductDetails = wrapRequest((productId) => {
|
||||||
|
@ -446,7 +446,7 @@ export const doFetchConfiguredProductDetails = wrapRequest((productId) => {
|
||||||
'Access-Control-Allow-Origin': '*'
|
'Access-Control-Allow-Origin': '*'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=${productId}?searchCriteria&fields=items[price,sku,media_gallery_entries,custom_attributes]`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=${productId}?searchCriteria&fields=items[price,sku,media_gallery_entries,custom_attributes]`, requestOptions)
|
||||||
|
|
||||||
});
|
});
|
||||||
export const doFetchAttributeFilterProducts = wrapRequest(() => {
|
export const doFetchAttributeFilterProducts = wrapRequest(() => {
|
||||||
|
@ -500,8 +500,8 @@ export const doFetchSortProducts = wrapRequest((pageNo, pageSize, sortBy, catego
|
||||||
//side filter end//
|
//side filter end//
|
||||||
let query = "";
|
let query = "";
|
||||||
query = `?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=${categoryIds}&searchCriteria[filter_groups][0][filters][0][condition_type]=in&searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}`
|
query = `?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=${categoryIds}&searchCriteria[filter_groups][0][filters][0][condition_type]=in&searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}`
|
||||||
console.log('product', `${vueAppMagenotApiUrl}/rest/V1/crproducts/${query}`);
|
console.log('product', `${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts/${query}`);
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/${query}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts/${query}`, requestOptions)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
let nameSearchQuery = "";
|
let nameSearchQuery = "";
|
||||||
|
@ -526,8 +526,8 @@ export const doFetchSortProducts = wrapRequest((pageNo, pageSize, sortBy, catego
|
||||||
|
|
||||||
query = `?${extraAttribute}${nameSearchQuery}${filterQuery}searchCriteria[filter_groups][${increment}][filters][0][field]=status&searchCriteria[filter_groups][${increment}][filters][0][value]=1&searchCriteria[filter_groups][${increment}][filters][0][condition_type]=eq&searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=DESC`;
|
query = `?${extraAttribute}${nameSearchQuery}${filterQuery}searchCriteria[filter_groups][${increment}][filters][0][field]=status&searchCriteria[filter_groups][${increment}][filters][0][value]=1&searchCriteria[filter_groups][${increment}][filters][0][condition_type]=eq&searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=DESC`;
|
||||||
|
|
||||||
console.log('productNames', `${vueAppMagenotApiUrl}/rest/V1/crproducts/${query}`);
|
console.log('productNames', `${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts/${query}`);
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts/${query}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts/${query}`, requestOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -539,7 +539,7 @@ export const doFetchCategoryList = wrapRequest(() => {
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crcategories`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crcategories`, requestOptions)
|
||||||
});
|
});
|
||||||
/*export const doFetchCategoryList = wrapRequest(() => {
|
/*export const doFetchCategoryList = wrapRequest(() => {
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
|
@ -554,7 +554,7 @@ export const dofetchCategoryListIdWise = wrapRequest(() => {
|
||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crcategories/list?searchCriteria&fields=items[id,parent_id,name,custom_attributes]`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crcategories/list?searchCriteria&fields=items[id,parent_id,name,custom_attributes]`, requestOptions)
|
||||||
});
|
});
|
||||||
export const doFetchCatelogProducts = wrapRequest((searchCriteria) => {
|
export const doFetchCatelogProducts = wrapRequest((searchCriteria) => {
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
|
@ -562,7 +562,7 @@ export const doFetchCatelogProducts = wrapRequest((searchCriteria) => {
|
||||||
headers: { 'Content-type': 'application/json' }
|
headers: { 'Content-type': 'application/json' }
|
||||||
};
|
};
|
||||||
|
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/suggestion?q=${searchCriteria}`, requestOptions);
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/suggestion?q=${searchCriteria}`, requestOptions);
|
||||||
});
|
});
|
||||||
|
|
||||||
export const doFetchRecentlyViewedList = wrapRequest((sku) => {
|
export const doFetchRecentlyViewedList = wrapRequest((sku) => {
|
||||||
|
@ -572,7 +572,7 @@ export const doFetchRecentlyViewedList = wrapRequest((sku) => {
|
||||||
'Content-type': 'application/json'
|
'Content-type': 'application/json'
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/crproducts?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=${sku}&searchCriteria[filter_groups][0][filters][0][condition_type]=in&searchCriteria[sortOrders][0][direction]=ASC`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/crproducts?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=${sku}&searchCriteria[filter_groups][0][filters][0][condition_type]=in&searchCriteria[sortOrders][0][direction]=ASC`, requestOptions)
|
||||||
});
|
});
|
||||||
export const doSideBarFilter = wrapRequest((pageNo, pageSize, sortBy, categoryId, sideFilter, search) => {
|
export const doSideBarFilter = wrapRequest((pageNo, pageSize, sortBy, categoryId, sideFilter, search) => {
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
|
@ -601,9 +601,9 @@ export const doSideBarFilter = wrapRequest((pageNo, pageSize, sortBy, categoryId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('searchCat', `${vueAppMagenotApiUrl}/rest/V1/search?searchCriteria[filter_groups][0][filters][0][field]=category_ids&searchCriteria[filter_groups][0][filters][0][value]=${categoryId}&searchCriteria[filter_groups][1][filters][0][field]=visibility&searchCriteria[filter_groups][1][filters][0][value]=4&${nameSearchQuery}${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=catalog_view_container`);
|
console.log('searchCat', `${vueAppMagenotApiUrl}/rest/crn_retailer/V1/search?searchCriteria[filter_groups][0][filters][0][field]=category_ids&searchCriteria[filter_groups][0][filters][0][value]=${categoryId}&searchCriteria[filter_groups][1][filters][0][field]=visibility&searchCriteria[filter_groups][1][filters][0][value]=4&${nameSearchQuery}${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=catalog_view_container`);
|
||||||
|
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/search?searchCriteria[filter_groups][0][filters][0][field]=category_ids&searchCriteria[filter_groups][0][filters][0][value]=${categoryId}&searchCriteria[filter_groups][1][filters][0][field]=visibility&searchCriteria[filter_groups][1][filters][0][value]=4&${nameSearchQuery}${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=catalog_view_container`, requestOptions);
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/search?searchCriteria[filter_groups][0][filters][0][field]=category_ids&searchCriteria[filter_groups][0][filters][0][value]=${categoryId}&searchCriteria[filter_groups][1][filters][0][field]=visibility&searchCriteria[filter_groups][1][filters][0][value]=4&${nameSearchQuery}${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=catalog_view_container`, requestOptions);
|
||||||
|
|
||||||
} else if (search) {
|
} else if (search) {
|
||||||
let nameSearchQuery = "";
|
let nameSearchQuery = "";
|
||||||
|
@ -626,8 +626,8 @@ export const doSideBarFilter = wrapRequest((pageNo, pageSize, sortBy, categoryId
|
||||||
increment++;
|
increment++;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log('search', `${vueAppMagenotApiUrl}/rest/V1/search?${nameSearchQuery}${filterQuery}searchCriteria[filter_groups][${increment}][filters][0][field]=visibility&searchCriteria[filter_groups][${increment}][filters][0][value]=4&${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=quick_search_container`);
|
console.log('search', `${vueAppMagenotApiUrl}/rest/crn_retailer/V1/search?${nameSearchQuery}${filterQuery}searchCriteria[filter_groups][${increment}][filters][0][field]=visibility&searchCriteria[filter_groups][${increment}][filters][0][value]=4&${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=quick_search_container`);
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/search?${nameSearchQuery}${filterQuery}searchCriteria[filter_groups][${increment}][filters][0][field]=visibility&searchCriteria[filter_groups][${increment}][filters][0][value]=4&${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=quick_search_container`, requestOptions);
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/search?${nameSearchQuery}${filterQuery}searchCriteria[filter_groups][${increment}][filters][0][field]=visibility&searchCriteria[filter_groups][${increment}][filters][0][value]=4&${extraAttribute}searchCriteria[sortOrders][0][field]=${sortBy}&searchCriteria[sortOrders][0][direction]=${sortFlag}&searchCriteria[requestName]=quick_search_container`, requestOptions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ export const doFetchBasicInfo = meWrapRequest(() => {
|
||||||
...authHeader()
|
...authHeader()
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/customers/me`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/customers/me`, requestOptions)
|
||||||
});
|
});
|
||||||
/*
|
/*
|
||||||
export const doFetchChangePassword = wrapRequest((token) => {
|
export const doFetchChangePassword = wrapRequest((token) => {
|
||||||
|
|
|
@ -178,7 +178,7 @@ export const doFetchCartProducts = wrapRequest((userCartId) => {
|
||||||
...authHeader()
|
...authHeader()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/cart/data?cartid=${userCartId}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/cart/data?cartid=${userCartId}`, requestOptions)
|
||||||
});
|
});
|
||||||
export const doFetchTotalAmt = wrapRequest(() => {
|
export const doFetchTotalAmt = wrapRequest(() => {
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ export const doFetchGiftMessage = wrapRequest((quoteId, itemId) => {
|
||||||
...authHeader()
|
...authHeader()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return fetch(`${vueAppMagenotApiUrl}/rest/V1/item/data?itemId=${itemId}&cartid=${quoteId}`, requestOptions)
|
return fetch(`${vueAppMagenotApiUrl}/rest/crn_retailer/V1/item/data?itemId=${itemId}&cartid=${quoteId}`, requestOptions)
|
||||||
});
|
});
|
||||||
export const doPutCConectionCartItem = wrapRequest((sku, qty, ccid) => {
|
export const doPutCConectionCartItem = wrapRequest((sku, qty, ccid) => {
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const fetchStates = (countryId, countryWiseStates) => {
|
||||||
return states.id == countryId;
|
return states.id == countryId;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (oneCountry.length > 0) {
|
if (oneCountry.length > 0 && oneCountry[0].availableRegions) {
|
||||||
let allStates = oneCountry[0].availableRegions.map(val => {
|
let allStates = oneCountry[0].availableRegions.map(val => {
|
||||||
return {
|
return {
|
||||||
value: val.id,
|
value: val.id,
|
||||||
|
|
Loading…
Reference in New Issue