Flamingo Commerce v3.1.0 Release Notes
Release Date: 2020-02-26 // about 4 years ago-
๐ The release mainly improves the checkout experience when using the GraphQL interfaces, by introducing a new place order process which is backed by a state machine. This encapsulates all critical parts of the checkout into separate states which are easier to test and allow us to rollback each process part seperatly.
dependencies
- โก๏ธ Update flamingo core to v3.2.0
- โก๏ธ Update dingo to v0.2.9
โ tests
- โ Added GraphQL integration tests for new Place Order Process, run manually with
make integrationtest
- โ
To run the GraphQL Demo project use
make run-integrationtest-demo-project
- โ
To regenerate the GraphQL files used by the integration tests / demo project use
make generate-integrationtest-graphql
cart
โ Add
additionalData
to theAddRequest
used during add to cart- Breaking : Update helper/builder function
BuildAddRequest
๐ฅ Breaking : Change to
EventPublisher
interface,PublishChangedQtyInCartEvent
and
PublishAddToCartEvent
now include a cart as a parameter๐ฅ Breaking : Change to behaviour of
AddToCartEvent
andChangedQtyInCartEvent
, they are now thrown after the cart has been adjusted and written back to cacheEvents deferred from
ModifyBehaviour
are dispatched beforeAddToCartEvent
andChangedQtyInCartEvent
The
AddToCartEvent
includes the current cart (with added product)โก๏ธ The
ChangedQtyInCartEvent
includes the current cart (with updated quantities)โช Mark
CartReceiverService.RestoreCart()
as deprecated, useCartService.RestoreCart()
instead,
the cart adapter therefore needs to implement theCompleteBehaviour
interface.โ Add
CartReceiverService.ModifyBehaviour()
to easily receive the current behaviour (guest/customer)โ Add
CompleteBehaviour
interface which ensures that the cart adapter offers Complete / Restore functionalityโ Add
CartService.CompleteCurrentCart()
andCartService.RestoreCart()
which rely on the newCompleteBehaviour
interface๐ฅ Breaking : Update
CartService.CancelOrder()
to useCartService.RestoreCart()
instead ofCartReceiverService.RestoreCart()
,
๐ if your cart supports completing/restoring please implementCompleteBehaviour
interfaceโ Add
CartService.CancelOrderWithoutRestore()
to allow order cancellation without restoring the cartโช Mark
GuestCartService.RestoreCart
as deprecated, will be replaced byCompleteBehaviour
โช Mark
CustomerCartService.RestoreCart
as deprecated, will be replaced byCompleteBehaviour
โ Add mocks for all behaviours, you can use a specific one e.g.
&mocks.CompleteBehaviour{}
or the all in one&mocks.AllBehaviour{}
โก๏ธ Update
InMemoryBehaviour
to fulfill theCompleteBehaviour
interface (addsComplete()
/Restore()
)โก๏ธ Update
InMemoryCartStorage
, add Mutex to be thread safeโก๏ธ Update
SimplePaymentFormService
to allow gift cards in thePaymentSelection
, please use the
0๏ธโฃ configcommerce.cart.simplePaymentForm.giftCardPaymentMethod
to specify the default payment method for gift cardsโ Add missing
product
module dependency to cart modulecheckout
๐ Move config to commerce namespace, from
checkout
tocommerce.checkout
โ Add legacy config mapping so old mappings can still be used
โ Add cue based config to have config validation in place
โ Add
OrderService.CancelOrderWithoutRestore()
which uses the newCartService
functionโ Add
OrderService.CartPlaceOrder()
to place a provided cart instead of fetching it from theCartService
โ Add new GraphQL Place Order process which relies on a new state machine please referer to the module readme for more details
- Transition all actions of the checkout controller to separate states
- Add new
ContextStore
port to provide a storage for the place order process- Provide InMemory and Redis Adapter
- Add new
TryLocker
port to provide an easy way to sync multiple order processes across different nodes- Provide InMemory and Redis Adapter
- Breaking: Add new GraphQL mutations / queries to start / stop / refresh the place order process
payment
โ Add
PaymentService
to easily work with bound PaymentGateway'sPaymentService.AvailablePaymentGateways()
returns all bound gatewaysPaymentService.PaymentGateway()
gets the payment gateway by gateway code
-
PaymentService.PaymentGatewayByCart()
gets the payment gateway of the cart payment selectionExtend the
FlowStatus
struct with more standardizedFlowActionData
โ Add standardized Flow Actions
PaymentFlowActionShowIframe
,PaymentFlowActionShowHTML
,PaymentFlowActionRedirect
,
PaymentFlowActionPostRedirect
please use these in your payment adapter since the standard place order relies on them.search
- Extend
Suggestion
struct withType
andAdditionalAttributes
to be able to distinguish between product/category suggestions