feat: Add configuration item pricing, section ID, and product snapshots#489
feat: Add configuration item pricing, section ID, and product snapshots#489
Conversation
…duct snapshot in line items
…variations for improved performance
(cherry picked from commit d40e7bb)
- VirtoCommerce.CartModule.Core: 3.841.0-alpha.773-variation-configuration-type - VirtoCommerce.CatalogModule.Data: 3.913.0-alpha.2458-variation-configuration-type
…ration-type # Conflicts: # src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj # src/VirtoCommerce.OrdersModule.Data/VirtoCommerce.OrdersModule.Data.csproj # src/VirtoCommerce.OrdersModule.Web/Localizations/de.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/es.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/fr.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/it.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/ja.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/pl.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/pt.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/ru.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/Localizations/zh.VirtoCommerce.Orders.json # src/VirtoCommerce.OrdersModule.Web/module.manifest
Update CatalogModule.Data to 3.1001.0-alpha.2468-variation-configuration-type Update CartModule.Core to 3.1001.0-alpha.776-variation-configuration-type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.52
Timestamp: 09-03-2026T16:50:18
…f Data Replace CatalogModule.Data dependency with CatalogModule.Core in OrdersModule.Data. Use ProductJsonSerializer.Serialize instead of IndexDocumentHelper.SerializeObject for product snapshot serialization. This removes the cross-layer dependency (Order.Data → Catalog.Data). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.392
Timestamp: 10-03-2026T09:11:35
…figurationItems - Use ItemInfo|ItemAssets|ItemProperties|ItemEditorialReviews instead of Full & ~Variations to avoid loading Inventory, Associations, SEO, Links, Outlines into snapshots - Extract ProductSnapshotResponseGroup as protected virtual property for downstream override - Add ICloneable to ConfigurationItem - Deep-clone ConfigurationItems in LineItem.Clone() - Modernize all Clone() collections to use CloneTyped().ToList() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.557
Timestamp: 10-03-2026T16:04:04
...Commerce.OrdersModule.Data.MySql/Migrations/20251209111643_AddOrderConfigurationItemPrice.cs
Show resolved
Hide resolved
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.699
Timestamp: 10-03-2026T19:37:22
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.445
Timestamp: 10-03-2026T20:23:24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.85
Timestamp: 11-03-2026T11:22:54
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.633
Timestamp: 12-03-2026T10:50:46
|
vc-ci
left a comment
There was a problem hiding this comment.
Test Suite: Test Suites/Modules/module_Assets
Tests: 13
Failures: 0
Errors: 0
Time: 7.635
Timestamp: 13-03-2026T12:19:32



Summary
Adds configuration item pricing, section identification, product snapshots, and checkout-related filtering to the Orders module — supporting the Configurable Products feature.
Changes
1. ConfigurationItem Model Enhancements
LineItemId— FK to parent line item (set by EF navigation property)SectionId— links configuration item to its product configuration sectionPrice/SalePrice— pricing fields mapped from cart'sListPrice/SalePriceExtendedPrice— computed property (SalePrice * Quantity)ProductSnapshot— serialized JSON of the catalog product at order placement timeICloneableinterface added for proper deep-clone support2. Product Snapshots
ProductSnapshotfield on bothLineItemandConfigurationItem— stores serializedCatalogProductJSON at order placementSaveProductSnapshotsAsyncinCustomerOrderBuilder— batch-loads products viaIItemService.GetNoCloneAsync, serializes once per unique product, assigns to all matching itemsProductSnapshotResponseGroup—protected virtualproperty usingItemInfo | ItemAssets | ItemProperties | ItemEditorialReviews(excludes Inventory, Associations, SEO, Links, Outlines to minimize snapshot size)ProductSnapshotBatchSize—protected virtualproperty (default 50) for batch loadingOrder.ProductSnapshot.Enablesetting (default:false)ProductJsonSerializerfromCatalogModule.Core.Serialization(extracted fromCatalogModule.Datato fix layer violation)3. Cart → Order Conversion Improvements
SelectedForCheckoutfilter: only configuration items withSelectedForCheckout=trueare included in ordersvendorIds.Any()→vendorIds.Count > 0(avoids LINQ enumerator allocation)4. LineItem.Clone() Fix
ConfigurationItemscollection (was missing — shared reference after clone).CloneTyped().ToList()pattern5. Entity Mapping
ConfigurationItemEntity— full ToModel/FromModel/Patch for all new fieldsLineItemEntity— ProductSnapshot mapping in all three methodsConfigurationItemEntityConfigurationfor decimal precisionDependencies
VirtoCommerce.CartModule.Core→3.1001.0-alpha.776-variation-configuration-typeVirtoCommerce.CatalogModule.Core→3.1001.0-alpha.2470-variation-configuration-typeTest Plan
SelectedForCheckout=trueconfiguration items appear in ordersArtifact URL:
https://vc3prerelease.blob.core.windows.net/packages/VirtoCommerce.Orders_3.1002.0-pr-489-aedd.zip
Note
Medium Risk
Adds new persisted fields and EF migrations for
OrderLineItem/OrderConfigurationItem, which can affect database compatibility and downstream serialization/clone behavior. Changes are localized to order models/migrations with a feature flag for snapshots.Overview
Extends order item models to support configurable product checkout details.
ConfigurationItemnow includesSectionId,Price/SalePrice(+ computedExtendedPrice), andProductSnapshot, andLineItemaddsProductSnapshot.Updates behavior/compatibility around cloning and settings.
LineItem.Clone()now deep-clonesConfigurationItems(and usesCloneTyped()for other collections), and a new settingOrder.ProductSnapshot.Enableis introduced.Applies persistence changes and dependency bumps. Adds MySQL/PostgreSQL EF migrations (and MySQL precision configuration) for the new columns, and updates platform/cart/package references to newer
3.1004.0versions.Written by Cursor Bugbot for commit aeddade. This will update automatically on new commits. Configure here.