Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit d2eac7a

Browse files
authoredFeb 9, 2021
fix(default-theme): fix missing customer address right after user logs in (#1351)
1 parent b997740 commit d2eac7a

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed
 

‎packages/default-theme/src/components/SwLogin.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
import { SfAlert } from "@storefront-ui/vue"
5252
import { validationMixin } from "vuelidate"
5353
import { required, email } from "vuelidate/lib/validators"
54-
import { useUser } from "@shopware-pwa/composables"
54+
import { useUser, useSessionContext } from "@shopware-pwa/composables"
5555
import SwPluginSlot from "sw-plugins/SwPluginSlot"
5656
import SwButton from "@/components/atoms/SwButton"
5757
import SwInput from "@/components/atoms/SwInput"
@@ -68,10 +68,12 @@ export default {
6868
},
6969
setup(props, { root }) {
7070
const { login, loading, error: userError } = useUser(root)
71+
const { refreshSessionContext } = useSessionContext(root)
7172
return {
7273
clientLogin: login,
7374
isLoading: loading,
7475
userError,
76+
refreshSessionContext,
7577
}
7678
},
7779
validations: {
@@ -93,7 +95,10 @@ export default {
9395
username: this.email,
9496
password: this.password,
9597
})
96-
if (loggedIn) this.$emit("success")
98+
if (loggedIn) {
99+
this.$emit("success")
100+
this.refreshSessionContext()
101+
}
97102
},
98103
},
99104
}

‎packages/default-theme/src/components/checkout/summary/TotalsSummary.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<SfNotification
66
:visible="true"
77
type="info"
8-
:title="$t('You can\'t place the order')"
9-
:message="$t('Your cart is empty.')"
8+
:title="$t('You can not place the order')"
9+
:message="$t('Your cart is empty')"
1010
/>
1111
</div>
1212
<div class="summary__action">

‎packages/default-theme/src/components/gdpr/SwCookieBar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</template>
88
<template #right>
99
<SwButton class="button" data-cy="accept-cookies" @click="acceptCookies">
10-
Got it!
10+
{{ $t("Got it!") }}
1111
</SwButton>
1212
</template>
1313
</SfTopBar>

‎packages/default-theme/src/locales/de-DE.json

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
"View": "Ansicht",
170170
"View details": "Details ansehen",
171171
"Wrong phone number": "Eingabe von Telefonnummer prüfen",
172+
"You can not place the order": "Sie können die Bestellung nicht aufgeben",
172173
"You currently have no orders": "Sie haben derzeit noch keine Bestellungen",
173174
"You should receive a link in a few moments. Please open that link to reset your password.": "Sie sollten in wenigen Augenblicken einen Link erhalten. Bitte öffnen Sie dort den Link, um Ihr Passwort zurückzusetzen.",
174175
"You'll receive dispatch confirmation and an arrival date": "Sie erhalten eine Versandbestätigung und Angaben zur Lieferzeit",

‎packages/default-theme/src/locales/en-GB.json

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
"View": "View",
157157
"View details": "View details",
158158
"Wrong phone number": "Wrong phone number",
159+
"You can not place the order": "You can not place the order",
159160
"You currently have no orders": "You currently have no orders",
160161
"You should receive a link in a few moments. Please open that link to reset your password.": "You should receive a link in a few moments. Please open that link to reset your password.",
161162
"You'll receive dispatch confirmation and an arrival date": "You'll receive dispatch confirmation and an arrival date",

0 commit comments

Comments
 (0)
This repository has been archived.