From 7efeb560282edd7f7f4a24ad67e0136bc908bf06 Mon Sep 17 00:00:00 2001 From: Kevin Gorjan Date: Thu, 27 Jan 2022 15:43:42 +0100 Subject: [PATCH 1/3] fix(theme): don't redirect with empty cart on thank-you step during the checkout --- packages/theme/pages/Checkout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/theme/pages/Checkout.vue b/packages/theme/pages/Checkout.vue index 32373b09f..9ca3e8446 100644 --- a/packages/theme/pages/Checkout.vue +++ b/packages/theme/pages/Checkout.vue @@ -91,7 +91,7 @@ export default defineComponent({ onMounted(async () => { await load(); - if (products.value.length === 0) { + if (products.value.length === 0 && currentStep.value !== 'thank-you') { await router.push(app.localePath('/')); } From 024b4e22aab921fc7be9a56ab673782dbc6258d7 Mon Sep 17 00:00:00 2001 From: Kevin Gorjan Date: Thu, 27 Jan 2022 15:45:48 +0100 Subject: [PATCH 2/3] fix(theme): fix on billing step when address for shipping and billing are the same When addresses are the same, hide the form on the billing-step so users can't fill in a new address --- packages/theme/pages/Checkout/Billing.vue | 55 ++++++++++++++++++----- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/packages/theme/pages/Checkout/Billing.vue b/packages/theme/pages/Checkout/Billing.vue index fe308ef2b..ef8e5c80d 100644 --- a/packages/theme/pages/Checkout/Billing.vue +++ b/packages/theme/pages/Checkout/Billing.vue @@ -9,23 +9,30 @@
- +
+
+
+ +
+
+
+
- Go back + {{ $t('Go back') }} @@ -259,6 +266,7 @@ import { SfSelect, SfCheckbox, } from '@storefront-ui/vue'; +import UserAddressDetails from '~/components/UserAddressDetails.vue'; import { useUserBilling, userBillingGetters, @@ -309,6 +317,7 @@ export default defineComponent({ ValidationProvider, ValidationObserver, UserBillingAddresses: () => import('~/components/Checkout/UserBillingAddresses.vue'), + UserAddressDetails, }, setup() { const router = useRouter(); @@ -398,7 +407,6 @@ export default defineComponent({ oldBilling = { ...billingDetails.value }; billingDetails.value = { ...formatAddressReturnToData(shippingDetails.value) }; currentAddressId.value = NOT_SELECTED_ADDRESS; - canAddNewAddress.value = true; setAsDefault.value = false; if (billingDetails.value.country_code) { await searchCountry({ id: billingDetails?.value.country_code }); @@ -519,6 +527,29 @@ export default defineComponent({ --heading-title-font-weight: var(--font-weight--bold); } +.copy__shipping { + &__address { + margin-bottom: var(--spacer-xs); + @include for-desktop { + margin-right: var(--spacer-sm); + display: flex; + width: 100%; + flex-direction: column; + } + + .sf-address { + padding: var(--spacer-xs); + } + } + + &__addresses { + margin-bottom: var(--spacer-xl); + @include for-desktop { + display: flex; + } + } +} + .form { &__select { display: flex; From fe56b7d271412975969d479da49292437d6b7a6f Mon Sep 17 00:00:00 2001 From: Kevin Gorjan Date: Fri, 28 Jan 2022 09:11:16 +0100 Subject: [PATCH 3/3] chore(theme): added missing translations --- packages/theme/lang/de.js | 3 ++- packages/theme/lang/en.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/theme/lang/de.js b/packages/theme/lang/de.js index baac854ad..50dc98dc5 100644 --- a/packages/theme/lang/de.js +++ b/packages/theme/lang/de.js @@ -56,7 +56,7 @@ export default { "Forgot Password Modal Email": "E-Mail, mit der Sie sich anmelden:", "forgotPasswordConfirmation": "Vielen Dank! Wenn ein Konto mit der E-Mail-Adresse {0} registriert ist, finden Sie in Ihrem Posteingang eine Nachricht mit einem Link zum Zurücksetzen des Passworts.", "Forgotten password?": "Passwort vergessen?", - "Go back": "Go back", + "Go back": "Geh zurück", "Go back shopping": "Zurück einkaufen", "Go back to shop": "Zurück zum Einkaufen", "Go to checkout": "Zur Kasse gehen", @@ -88,6 +88,7 @@ export default { "Manage shipping addresses": "Alle gewünschten Versandadressen verwalten (Arbeitsplatz, Privatadresse ...) Auf diese Weise müssen Sie die Versandadresse nicht bei jeder Bestellung manuell eingeben.", "Match it with": "Kombiniere es mit", "Men fashion": "Herrenmode", + "My billing and shipping address are the same": "Meine Rechnungs- und Lieferadresse sind identisch", "My Cart": "Mein Warenkorb", "No account": "Sie haben noch keinen Account?", "or": "oder", diff --git a/packages/theme/lang/en.js b/packages/theme/lang/en.js index a253abe4f..1aca37811 100644 --- a/packages/theme/lang/en.js +++ b/packages/theme/lang/en.js @@ -86,6 +86,7 @@ export default { "Manage shipping addresses": "Manage all the shipping addresses you want (work place, home address...) This way you won\"t have to enter the shipping address manually with each order.", "Match it with": "Match it with", "Men fashion": "Men fashion", + "My billing and shipping address are the same": "My billing and shipping address are the same", "My Cart": "My Cart", "No account": "Don't have an account yet?", "or": "or",