feat: add customer group registration page #2420
feat: add customer group registration page #2420Maciej D (mdanilowicz) merged 8 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds/centralizes a customer-group-specific registration page component and updates registration forms to support “company-only” registration flows, while also adjusting SEO meta handling and template configuration.
Changes:
- Add SEO meta description support and company-only registration wiring for the customer group registration CMS page.
- Extend registration forms with a
companyOnlyprop to default to business accounts and hide the account type selector when enforced. - Update template usage to the renamed
<AccountRegistrationForm />and adjust starter template dev storefront URL.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| templates/vue-starter-template/nuxt.config.ts | Updates devStorefrontUrl to point at the figma demo environment. |
| templates/vue-starter-template/app/components/account/RegistrationForm.vue | Adds companyOnly prop, defaults account type accordingly, hides account type selector when company-only. |
| templates/vue-starter-template/app/components/FrontendAccountCustomerGroupRegistrationPage.vue | Removes the starter-template-specific customer group registration page component (now consolidated elsewhere). |
| templates/vue-demo-store/app/pages/register.vue | Switches to <AccountRegistrationForm /> usage. |
| templates/vue-demo-store/app/components/account/RegistrationForm.vue | Adds companyOnly prop support and refines validation error rendering; hides account type selector when company-only. |
| packages/cms-base-layer/app/components/public/cms/FrontendAccountCustomerGroupRegistrationPage.vue | Enhances CMS registration page with SEO meta description, renders introduction content, and passes companyOnly to the registration form. |
| .changeset/social-paths-fail.md | Declares a minor release for @shopware/cms-base-layer for the new/updated component behavior. |
Comments suppressed due to low confidence (3)
packages/cms-base-layer/app/components/public/cms/FrontendAccountCustomerGroupRegistrationPage.vue:50
- There is no
v-else/fallback UI whenregistrationResponse.registrationActiveis false or when the async request returns{}. This currently leaves the page without any guidance for users (regression vs the previous template component that showed an alert). Add an inactive/error state message (and optionally a loading state) so the page is not empty in these cases.
templates/vue-demo-store/app/components/account/RegistrationForm.vue:171 - When
companyOnlyis true, the<select>is hidden but the account type label with a required marker (*) still renders. This creates a confusing form state (required field shown without an input). Consider moving thev-ifto the whole account-type field container (label + select), or conditionally hide/adjust the label when company-only registrations are enforced.
packages/cms-base-layer/app/components/public/cms/FrontendAccountCustomerGroupRegistrationPage.vue:43 v-htmlrenders HTML coming fromregistrationResponse.translated.registrationIntroduction(Store API). Unless this content is guaranteed to be sanitized upstream, this introduces a stored-XSS vector. Prefer rendering as plain text or sanitize/whitelist allowed tags before passing intov-html(and document the trust boundary).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Maciek Kucmus (mkucmus)
left a comment
There was a problem hiding this comment.
nice improvement 💪🏼
I saw you prepared shopware/shopware#16463 that solves the inconsistency in translated properties 👌🏼
| v-if="registrationResponse.translated.registrationIntroduction" | ||
| class="px-6 sm:px-4 mb-6" | ||
| v-html="registrationResponse?.translated.registrationIntroduction" |
There was a problem hiding this comment.
maybe in other way around it's safer?
| v-if="registrationResponse.translated.registrationIntroduction" | |
| class="px-6 sm:px-4 mb-6" | |
| v-html="registrationResponse?.translated.registrationIntroduction" | |
| v-if="registrationResponse?.translated.registrationIntroduction" | |
| class="px-6 sm:px-4 mb-6" | |
| v-html="registrationResponse.translated.registrationIntroduction" |
This pull request introduces a new
FrontendAccountCustomerGroupRegistrationPagecomponent to support customer group-specific registration flows in the frontend. It refactors and enhances the registration form to handle company-only registrations, improves SEO meta handling, and updates the visual presentation and validation logic. Several files are renamed for clarity, and redundant or outdated files are removed.New Feature: Customer Group Registration Page
FrontendAccountCustomerGroupRegistrationPagecomponent, enabling customer group-specific registration with dynamic content and SEO meta description support. [1] [2]Registration Form Enhancements
companyOnlyprop, defaulting the account type accordingly and hiding the account type selector for company-only registrations. [1] [2] [3] [4] [5] [6]Codebase Cleanup and Refactoring
AccountRegisterFormtoAccountRegistrationForm, etc.).FrontendAccountCustomerGroupRegistrationPage.vuefrom the starter template, as this logic is now consolidated in the base layer.Styling and UI Improvements
closes #1845