commit
f585f853c0
3 changed files with 20 additions and 10 deletions
|
|
@ -2,6 +2,7 @@ const queryStrings = {
|
||||||
FMG_PAGE: "fmgPage",
|
FMG_PAGE: "fmgPage",
|
||||||
START_TYPE: "start_type",
|
START_TYPE: "start_type",
|
||||||
ZIP_CODE: "zipcode",
|
ZIP_CODE: "zipcode",
|
||||||
|
PROMO: "promo",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { queryStrings };
|
export { queryStrings };
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { queryStrings } from "@/constants/query-strings";
|
import { queryStrings } from "@/constants/query-strings";
|
||||||
|
import { getQuerystringParameter } from "@/helpers/querystring-helper";
|
||||||
import { externalUrls } from "@/router/router-constants/externalUrl-values";
|
import { externalUrls } from "@/router/router-constants/externalUrl-values";
|
||||||
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
|
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
|
||||||
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
||||||
|
|
@ -59,12 +60,20 @@ export async function navigateToHeritageFunnel({ shouldSaveSession = true, loadi
|
||||||
loadingModal.showModal();
|
loadingModal.showModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
router.navigateToExternalUrl(externalUrls.HERITAGE_FUNNEL, {
|
var heritageParms = {
|
||||||
corid: store.getters.order.referralCorrelationId,
|
corid: store.getters.order.referralCorrelationId,
|
||||||
src: "concept-funnel",
|
src: "concept-funnel",
|
||||||
conceptsqid: store.getters.applicationUser.savedSessionId,
|
conceptsqid: store.getters.applicationUser.savedSessionId,
|
||||||
isInsurance: store.getters.payment.isInsurance,
|
isInsurance: store.getters.payment.isInsurance,
|
||||||
});
|
};
|
||||||
|
|
||||||
|
const promo = getQuerystringParameter(queryStrings.PROMO);
|
||||||
|
|
||||||
|
if (promo) {
|
||||||
|
heritageParms["promo"] = promo;
|
||||||
|
}
|
||||||
|
|
||||||
|
router.navigateToExternalUrl(externalUrls.HERITAGE_FUNNEL, heritageParms);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function skipVinLookup() {
|
export async function skipVinLookup() {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js"
|
||||||
import { routingTable } from "@/router/router-constants/routing-table.js";
|
import { routingTable } from "@/router/router-constants/routing-table.js";
|
||||||
import { globalEvents, globalEventTypes } from "@/constants/events";
|
import { globalEvents, globalEventTypes } from "@/constants/events";
|
||||||
import { queryStrings } from "@/constants/query-strings";
|
import { queryStrings } from "@/constants/query-strings";
|
||||||
|
import { getQuerystringParameter } from "@/helpers/querystring-helper";
|
||||||
import { getDeviceIdValue } from "@/helpers/heritage-integration/cookie-helper";
|
import { getDeviceIdValue } from "@/helpers/heritage-integration/cookie-helper";
|
||||||
|
|
||||||
// Heritage integration
|
// Heritage integration
|
||||||
|
|
@ -277,14 +278,9 @@ async function navigate(
|
||||||
fmgPage: destinationFmgPageValue,
|
fmgPage: destinationFmgPageValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
const queryString = window.location.search;
|
const hasZip = getQuerystringParameter(queryStrings.ZIP_CODE);
|
||||||
const urlParams = new URLSearchParams(queryString);
|
const zip = getQuerystringParameter(queryStrings.ZIP_CODE);
|
||||||
const lowerCaseParams = new URLSearchParams();
|
const promo = getQuerystringParameter(queryStrings.PROMO);
|
||||||
for (const [name, value] of urlParams) {
|
|
||||||
lowerCaseParams.append(name.toLowerCase(), value);
|
|
||||||
}
|
|
||||||
const hasZip = lowerCaseParams.has(queryStrings.ZIP_CODE);
|
|
||||||
const zip = lowerCaseParams.get(queryStrings.ZIP_CODE);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
hasZip &&
|
hasZip &&
|
||||||
|
|
@ -296,6 +292,10 @@ async function navigate(
|
||||||
queryStringsObject[queryStrings.ZIP_CODE] = zip;
|
queryStringsObject[queryStrings.ZIP_CODE] = zip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (promo) {
|
||||||
|
queryStringsObject[queryStrings.PROMO] = promo;
|
||||||
|
}
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
name: "root",
|
name: "root",
|
||||||
query: Object.assign(optionalQuery, queryStringsObject),
|
query: Object.assign(optionalQuery, queryStringsObject),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue