Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from Vendic/bugfix/checkout-url
Browse files Browse the repository at this point in the history
Fix checkout url
  • Loading branch information
Tjitse-E authored Mar 26, 2019
2 parents ecd5653 + 12b10f0 commit e8b5792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vsf-external-checkout-module",
"version": "1.1.0",
"version": "1.1.1",
"description": "External checkout module for Vue Storefront",
"main": "index.ts",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions router/beforeEach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export function beforeEach(to: Route, from: Route, next) {

if (multistoreEnabled) {
if (storeCode in stores && to.name === storeCode + '-checkout') {
window.location.replace(stores[storeCode].cmsUrl + '?token=' + userToken + '&cart=' + cartToken)
window.location.replace(stores[storeCode].cmsUrl + '/vue/cart/sync/token/' + userToken + '/cart/' + cartToken)
} else {
next()
}
} else {
if (to.name === 'checkout') {
window.location.replace(cmsUrl + '?token=' + userToken + '&cart=' + cartToken)
window.location.replace(cmsUrl + '/vue/cart/sync/token/' + userToken + '/cart/' + cartToken)
} else {
next()
}
Expand Down

0 comments on commit e8b5792

Please sign in to comment.