-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrderItem / Order: problem with Fluent #748
Comments
Unfortunately our fix for Fluent4 isn't compatible with Fluent 5 any more. For others that have the same problems, here is how we solved it for Fluent5 with an injected class over OrderItem:
|
We have solved this problem with the following change in a custom OrderItem subclass:
That is by setting source query parameters to none, FluentExtension will just skip the augmentSQL functionality, and the correct version will be returned, regardless of locale. |
When an Order is finished, the OrderItem tries to get the exact version of the product to show in the order summary (e.g. on /account/order/).
Unfortunately with fluent installed, this only works if the Product was saved in the current locale. Otherwise Fluent augments the SQl in a way that it doesn't find the Product and therefor the link to the product or a product image is not shown after checkout.
While this is definitely a fluent bug, does anything speak against adding an extension point in OrderItems's
Product()
method to work around this problem until the fluent bug is finally solved? Working with Injecctors is pretty painful, as OrderItem has many used Subclasses (e.g. GiftVoucherOrderItem...)Related issues:
tractorcow-farm/silverstripe-fluent#583
silverstripe/silverstripe-versioned#252
The text was updated successfully, but these errors were encountered: