Skip to content

feat: add customer group registration page #2420

Merged
Maciej D (mdanilowicz) merged 8 commits intomainfrom
feat/GH-1845
May 4, 2026
Merged

feat: add customer group registration page #2420
Maciej D (mdanilowicz) merged 8 commits intomainfrom
feat/GH-1845

Conversation

@mdanilowicz
Copy link
Copy Markdown
Contributor

@mdanilowicz Maciej D (mdanilowicz) commented Apr 23, 2026

This pull request introduces a new FrontendAccountCustomerGroupRegistrationPage component 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

  • Added the FrontendAccountCustomerGroupRegistrationPage component, enabling customer group-specific registration with dynamic content and SEO meta description support. [1] [2]

Registration Form Enhancements

  • Refactored the registration form component to accept a companyOnly prop, defaulting the account type accordingly and hiding the account type selector for company-only registrations. [1] [2] [3] [4] [5] [6]
  • Improved error message rendering for form fields to enhance validation feedback. [1] [2] [3] [4]

Codebase Cleanup and Refactoring

  • Renamed components and updated references for consistency (AccountRegisterForm to AccountRegistrationForm, etc.).
  • Removed the old FrontendAccountCustomerGroupRegistrationPage.vue from the starter template, as this logic is now consolidated in the base layer.

Styling and UI Improvements

  • Updated registration page styling to use new color schemes and improved layout.

closes #1845

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontends-starter-template-extended Ready Ready Preview, Comment May 4, 2026 11:49am
frontends-vue-starter-template Building Building Preview, Comment May 4, 2026 11:49am
old-frontends-demo Ready Ready Preview, Comment May 4, 2026 11:49am
shopware-frontends-docs Ready Ready Preview, Comment May 4, 2026 11:49am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 companyOnly prop 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 when registrationResponse.registrationActive is 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 companyOnly is 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 the v-if to 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-html renders HTML coming from registrationResponse.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 into v-html (and document the trust boundary).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@mkucmus Maciek Kucmus (mkucmus) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice improvement 💪🏼

I saw you prepared shopware/shopware#16463 that solves the inconsistency in translated properties 👌🏼

Comment thread examples/adyen-dropin-component/api-types/storeApiTypes.d.ts
Comment on lines +40 to +42
v-if="registrationResponse.translated.registrationIntroduction"
class="px-6 sm:px-4 mb-6"
v-html="registrationResponse?.translated.registrationIntroduction"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe in other way around it's safer?

Suggested change
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"

@mdanilowicz Maciej D (mdanilowicz) merged commit 9e37ab6 into main May 4, 2026
12 checks passed
@mdanilowicz Maciej D (mdanilowicz) deleted the feat/GH-1845 branch May 4, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] FrontendAccountCustomerGroupRegistrationPage.vue refactor

3 participants