From 40a3f6e8e1db034337286c4976cc9135fd357578 Mon Sep 17 00:00:00 2001 From: Anton Sylka Date: Mon, 10 Feb 2025 13:48:16 +0800 Subject: [PATCH 1/3] Refs #33919: Enable creativity kit purchase form and checkout flow --- App.vue | 2 +- components/molecules/m-menu.vue | 114 +----------------- .../o-creativity-kit-product-order-form.vue | 4 +- components/organisms/o-header.vue | 37 +----- config/modules.ts | 16 +++ pages/DetailedCart.vue | 30 ----- router/index.js | 37 ++++++ 7 files changed, 63 insertions(+), 177 deletions(-) diff --git a/App.vue b/App.vue index f78e12a08..327266556 100644 --- a/App.vue +++ b/App.vue @@ -37,7 +37,7 @@ export default { }, computed: { layout () { - return `${get(this.$route, 'meta.layout', 'minimal')}-layout` + return `${get(this.$route, 'meta.layout', 'default')}-layout` } }, mounted () { diff --git a/components/molecules/m-menu.vue b/components/molecules/m-menu.vue index 45534f565..48ed41e0e 100644 --- a/components/molecules/m-menu.vue +++ b/components/molecules/m-menu.vue @@ -14,61 +14,7 @@ :visible="visible" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -201,10 +126,6 @@ export default Vue.extend({ } ], otherProductsItems: [ - { - label: this.$t('Gift Cards'), - url: '/giftcards/' - }, { label: this.$t('Gift Boxes'), url: { @@ -214,39 +135,6 @@ export default Vue.extend({ return this.$route.name === 'configurable-product' && this.$route.params?.parentSku === 'gift_box'; } - }, - { - label: this.$t('Budsies Pals'), - url: '/budsiespals/' - }, - { - label: this.$t('Bulk Orders'), - url: '/plush-production/' - } - ], - usefulLinksItems: [ - { - label: this.$t('Pricing'), - url: '/pricing/' - }, - { - label: this.$t('About'), - url: '/about/' - }, - { - label: this.$t('FAQ\'s'), - url: '//support.budsies.com/', - target: '_blank' - }, - - { - label: this.$t('Blog'), - url: '/blog/', - target: '_blank' - }, - { - label: this.$t('Reviews'), - url: '/reviews/' } ] } diff --git a/components/organisms/CreativityKitProduct/o-creativity-kit-product-order-form.vue b/components/organisms/CreativityKitProduct/o-creativity-kit-product-order-form.vue index 88cbd1650..be4eb2f39 100644 --- a/components/organisms/CreativityKitProduct/o-creativity-kit-product-order-form.vue +++ b/components/organisms/CreativityKitProduct/o-creativity-kit-product-order-form.vue @@ -216,7 +216,9 @@ export default Vue.extend({ Logger.error(error, 'budsies')(); } - this.goToCrossSells(); + this.$router.push({ + name: 'detailed-cart' + }); } catch (error) { Logger.error(error, 'budsies')(); diff --git a/components/organisms/o-header.vue b/components/organisms/o-header.vue index 892b12038..c3a7f3234 100644 --- a/components/organisms/o-header.vue +++ b/components/organisms/o-header.vue @@ -18,38 +18,11 @@ -
- - Order More - - - - - - - {{ action.label }} - - - - -
import(/* webpackChunkName: "vsf-error" */ 'theme/pages/Error'); const StoryblokPage = () => import(/* webpackChunkName: "vsf-storyblok" */ 'src/modules/vsf-storyblok-module/pages/StoryblokPage.vue') +const Checkout = () => + import(/* webpackChunkName: "vsf-checkout" */ 'theme/pages/Checkout'); +const DetailedCart = () => + import(/* webpackChunkName: "vsf-detailed-cart" */ 'theme/pages/DetailedCart'); +const MyAccount = () => + import(/* webpackChunkName: "vsf-my-account" */ 'theme/pages/MyAccount'); +const CreativityKitProduct = () => + import(/* webpackChunkName: "vsf-creativity-kit-product" */ 'theme/pages/CreativityKitProduct'); function makeRoutesStrict (routes) { return routes.map((route) => { @@ -13,6 +21,18 @@ function makeRoutesStrict (routes) { } let routes = [ + { name: 'detailed-cart', path: '/checkout/cart/', component: DetailedCart }, + { + name: 'checkout', + path: '/checkout/onepage/:success?/', + component: Checkout, + props: true + }, + { + name: 'giftbox', + path: '/gift-box/', + component: CreativityKitProduct + }, { name: 'home', path: '/', @@ -30,6 +50,23 @@ let routes = [ } }) }, + { + name: 'terms-of-service', + path: '/terms-of-service/', + redirect: { + name: 'terms-of-service-alias', + params: { + slug: 'terms-of-service' + } + } + }, + + { name: 'my-account', path: '/my-account/', component: MyAccount }, + { + name: 'terms-of-service-alias', + component: StoryblokPage, + path: '/terms-of-service/' + }, { name: 'page-not-found', path: '*', component: ErrorPage }, { name: 'error', path: '/error/', component: ErrorPage } ]; From 53fc19714bb9ba6984f068af36256ce8552fc3a4 Mon Sep 17 00:00:00 2001 From: Anton Sylka Date: Wed, 12 Feb 2025 16:21:59 +0800 Subject: [PATCH 2/3] Refs #33919: Header - add "Home" menu item --- components/molecules/m-menu.vue | 7 +++++++ components/organisms/o-header.vue | 30 +++++++++++++++++++++++------- config/modules.ts | 6 ++++++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/components/molecules/m-menu.vue b/components/molecules/m-menu.vue index 48ed41e0e..cb0086af1 100644 --- a/components/molecules/m-menu.vue +++ b/components/molecules/m-menu.vue @@ -26,6 +26,7 @@ class="_item-link" :to="item.url" :class="{'-active': item.isActive && item.isActive()}" + exact @click.native="$emit('close')" > @@ -126,6 +127,12 @@ export default Vue.extend({ } ], otherProductsItems: [ + { + label: this.$t('Home'), + url: { + name: 'home' + } + }, { label: this.$t('Gift Boxes'), url: { diff --git a/components/organisms/o-header.vue b/components/organisms/o-header.vue index c3a7f3234..f837b21e5 100644 --- a/components/organisms/o-header.vue +++ b/components/organisms/o-header.vue @@ -18,13 +18,23 @@ @@ -136,6 +146,12 @@ export default { } } + ._links { + display: flex; + justify-content: flex-start; + column-gap: var(--spacer-lg); + } + .sf-header-navigation-item { flex: unset; diff --git a/config/modules.ts b/config/modules.ts index 53c6c22f9..e98be5478 100644 --- a/config/modules.ts +++ b/config/modules.ts @@ -9,11 +9,14 @@ import { GoogleTagManagerModule } from 'src/modules/google-tag-manager'; import { UserModule } from '@vue-storefront/core/modules/user' import { StoryblokModule } from 'src/modules/vsf-storyblok-module' import { registerModule } from '@vue-storefront/core/lib/modules' +import { BudsiesModule } from 'src/modules/budsies' +import { GiftCardModule } from 'src/modules/gift-card' import { PaymentBackendMethodsModule } from 'src/modules/payment-backend-methods' import { PaymentAffirm } from 'src/modules/payment-affirm'; import { BackendSettings } from 'src/modules/backend-settings'; import { ErrorLoggingModule } from 'src/modules/error-logging'; import { PageLoadingIndicatorModule } from 'src/modules/page-loading-indicator'; +import { PersistedCustomerDataModule } from 'src/modules/persisted-customer-data' import { TrueVaultModule } from 'src/modules/true-vault'; import registerStoryblokComponents from 'theme/components/storyblok' @@ -31,11 +34,14 @@ export function registerClientModules () { registerModule(UserModule) // Trigger on user icon click registerModule(CatalogNextModule) registerModule(StoryblokModule) + registerModule(BudsiesModule) registerModule(GoogleTagManagerModule) + registerModule(GiftCardModule) registerModule(PaymentBackendMethodsModule) registerModule(PaymentAffirm) registerModule(BackendSettings) registerModule(ErrorLoggingModule) + registerModule(PersistedCustomerDataModule) } // Deprecated API, will be removed in 2.0 From c9b3cb3ee45d6530a76be02a9e50ec74f01de228 Mon Sep 17 00:00:00 2001 From: Anton Sylka Date: Wed, 12 Feb 2025 16:24:23 +0800 Subject: [PATCH 3/3] Refs #33919: Fix routes --- router/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/router/index.js b/router/index.js index 3d8648aef..c3f05ad58 100644 --- a/router/index.js +++ b/router/index.js @@ -60,13 +60,12 @@ let routes = [ } } }, - - { name: 'my-account', path: '/my-account/', component: MyAccount }, { name: 'terms-of-service-alias', component: StoryblokPage, path: '/terms-of-service/' }, + { name: 'my-account', path: '/my-account/', component: MyAccount }, { name: 'page-not-found', path: '*', component: ErrorPage }, { name: 'error', path: '/error/', component: ErrorPage } ];