Product bundles add-on (spec 0085) - #2732
Draft
glennjacobs wants to merge 9 commits into
Draft
glennjacobs wants to merge 9 commits into
glennjacobs wants to merge 9 commits into
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…c 0085, slices 1-2) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… (spec 0085, slice 6) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…(spec 0085, slice 9) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ed-in card and products table badge (spec 0085, slices 7-8) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…equired groups, pricing-switch confirmation, listener tests Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… on a re-run Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
4 tasks
glennjacobs
force-pushed
the
spec/0085-product-bundles
branch
from
September 16, 2026 08:47
b8c9bec to
ac54bbe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements spec 0085: a new first-party
lunarphp/bundlespackage that sells a set of product variants as one product, plus the two small core seams it needs.order_lines.parent_line_idwithOrderLine::parent()/components()/isComponent()and atopLevelscope; the creation stages skip component lines;refundableQuantity()is 0 for components;ProductVariant::getTotalInventory()/canBeFulfilledAtQuantity()now delegate to a newResolvesInventoryaction contract (VariantInventoryDTO), bound inActionServiceProvider. Additive; no contract signatures change. Theorder_linesbaseline migration is edited in place (v2 alpha rule).Sectionis exported from@lunarphp/panel.packages/bundles(slices 3-5):Bundle/BundleGroup/BundleComponenton a variant; fixed and configurable bundles;fixedorcomponentspricing with materialised price rows and repricing listeners pluslunar:bundles:reprice; derived stock through a decorator onResolvesInventory; cart-line selection validator and acart_linespricing stage; an order-creation stage that gives every bundle line zero-priced component lines so fulfilment and stock commitment work unchanged.SectionExtensionon Catalog with the bundle editor on the product and variant pages, an "Included in bundles" sidebar card, a Bundle badge column and "Bundles only" filter on the products table, 16 locales.Docs PR: lunarphp/docs
docs/product-bundles(opened alongside this one).Notes for review
composer.jsonchanges are the sub-package wiring and asuggeston demo-data.GET bundles/products/{product}route, acart_linespipeline stage instead of a cart-line modifier because core never invokescalculating()).OrderLineQuantity::validate()lazy loads$orderLine->order, which tripspreventLazyLoadingon anorderIdToUpdatere-run that changes a line quantity.Test plan
vendor/bin/pest --testsuite core --parallel(1291 passed)vendor/bin/pest --testsuite panel --parallel(937 passed)vendor/bin/pest --testsuite bundles --parallel(71 passed)vendor/bin/pest --testsuite demo-data --parallel(34 passed)vendor/bin/phpstan analyse --no-progress --memory-limit=2Gvendor/bin/pint --dirtynpm run type-check,npm test; add-on and panel bundles rebuilt🤖 Generated with Claude Code