Skip to content

(VCST-4715): Add default option support#880

Open
ToxaKZ wants to merge 4 commits into
devfrom
feat/VCST-4715
Open

(VCST-4715): Add default option support#880
ToxaKZ wants to merge 4 commits into
devfrom
feat/VCST-4715

Conversation

@ToxaKZ
Copy link
Copy Markdown
Contributor

@ToxaKZ ToxaKZ commented May 4, 2026

Description

Implemented support for default options in configurable products across Catalog, XCart GraphQL, and Storefront. The feature allows a product configuration option to be marked as default in admin, exposes that flag through XCart GraphQL, and makes the storefront automatically preselect default values, including defaults in dependent configuration sections.

Implementation Details

Added backend and manager support for default configuration options.

Changes include:

Added IsDefault to ProductConfigurationOption.
Added IsDefault to ProductConfigurationOptionEntity.
Mapped IsDefault between entity and domain model.
Added EF configuration with default value false.
Added DB migrations for:

SQL Server
PostgreSQL
MySQL

Added manager UI support in product configuration option lists:

new Default checkbox column
works for both product options and text options
selecting one option as default clears other defaults in the same section

Added save-time normalization in ProductConfigurationService:

each configuration section can have only one default option
if multiple options are submitted as default, only the first one is preserved
Added unit coverage for the “single default option per section” rule.
Migration cleanup was done so the migration is scoped to IsDefault only and does not introduce unrelated schema changes.

References

QA-test:

Jira-link:

https://virtocommerce.atlassian.net/browse/VCST-4715

Artifact URL:

https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.Catalog_3.1023.0-alpha.2513-vcst-4715.zip

@ToxaKZ ToxaKZ requested review from OlegoO and artem-dudarev May 4, 2026 10:34
@OlegoO
Copy link
Copy Markdown
Contributor

OlegoO commented May 7, 2026

cursor review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 7, 2026

Bugbot couldn't run

Bugbot is not enabled for your user on this team.

Ask your team administrator to increase your team's hard limit for Bugbot seats or add you to the allowlist in the Cursor dashboard.

@sonarqubecloud
Copy link
Copy Markdown

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.

2 participants