Repository navigation
[FEATURE] Store whether an ordered product is shippable, cancelable and returnable - #898
Merged
Merged
Conversation
This was referenced Nov 24, 2026
d-g-codappix
force-pushed
the
order-product-properties
branch
from
November 24, 2026 12:49
0854525 to
bf8cc8a
Compare
This was referenced Nov 24, 2026
…nd returnable Ordered products get the fields shippable, cancelable and returnable. They are set once when the order is persisted and are not changed afterwards. Shippable defaults to the inverse of the virtual product flag of the cart product, cancelable and returnable default to true. The new BeforePersistOrderProductEvent is dispatched per ordered product (or backend variant) before it is stored, so product extensions can change the values without new methods in the ProductInterface. The order details in the backend module mark products that are not shippable, not cancelable or not returnable. Resolves: #895 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d-g-codappix
force-pushed
the
order-product-properties
branch
from
November 24, 2026 17:05
bf8cc8a to
a7ae1ef
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.
Resolves: #895
Ordered products get the fields
shippable,cancelableandreturnableas a snapshot at order time. They are needed later for partial deliveries, cancellations and returns per ordered product.tx_cart_domain_model_order_product:shippable,cancelable,returnable(database default 1, read only in the TCA), getters inOrder\Product.PersistOrder\Productssets them before an ordered product (or backend variant) is stored. Defaults:shippable= not a virtual product,cancelableandreturnable= true.BeforePersistOrderProductEvent(order item, order product, cart product, backend variant), so product extensions can change the three values.ProductInterfacegets no new methods.PersistOrder\Products, so subclasses calling the constructor with three arguments keep working.shippablefor old orders depends on the product extension.Tests: unit tests for
Order\Product, functional tests for the persisted values (physical, virtual, backend variant, listener, constructor without event dispatcher) and the badges.The changelog of 12.8 is also added by #897; the second PR to be merged needs a rebase of
Documentation/Changelog/12.8/Index.rst. extcode/cart_products#315 uses the new event.