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 the AddRequest 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 and ChangedQtyInCartEvent, they are now thrown after the cart has been adjusted and written back to cache

    Events deferred from ModifyBehaviour are dispatched before AddToCartEvent and ChangedQtyInCartEvent

    The AddToCartEvent includes the current cart (with added product)

    โšก๏ธ The ChangedQtyInCartEvent includes the current cart (with updated quantities)

    โช Mark CartReceiverService.RestoreCart() as deprecated, use CartService.RestoreCart() instead,
    the cart adapter therefore needs to implement the CompleteBehaviour 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() and CartService.RestoreCart() which rely on the new CompleteBehaviour interface

    ๐Ÿ’ฅ Breaking : Update CartService.CancelOrder() to use CartService.RestoreCart() instead of CartReceiverService.RestoreCart(),
    ๐Ÿ‘ if your cart supports completing/restoring please implement CompleteBehaviour interface

    โž• Add CartService.CancelOrderWithoutRestore() to allow order cancellation without restoring the cart

    โช Mark GuestCartService.RestoreCart as deprecated, will be replaced by CompleteBehaviour

    โช Mark CustomerCartService.RestoreCart as deprecated, will be replaced by CompleteBehaviour

    โž• 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 the CompleteBehaviour interface (adds Complete()/Restore())

    โšก๏ธ Update InMemoryCartStorage, add Mutex to be thread safe

    โšก๏ธ Update SimplePaymentFormService to allow gift cards in the PaymentSelection, please use the
    0๏ธโƒฃ config commerce.cart.simplePaymentForm.giftCardPaymentMethodto specify the default payment method for gift cards

    โž• Add missing product module dependency to cart module

    checkout

    ๐Ÿšš Move config to commerce namespace, from checkout to commerce.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 new CartService function

    โž• Add OrderService.CartPlaceOrder() to place a provided cart instead of fetching it from the CartService

    โž• 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's

    • PaymentService.AvailablePaymentGateways() returns all bound gateways
    • PaymentService.PaymentGateway() gets the payment gateway by gateway code

    - PaymentService.PaymentGatewayByCart() gets the payment gateway of the cart payment selection

    Extend the FlowStatus struct with more standardized FlowActionData

    โž• 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 with Type and AdditionalAttributes to be able to distinguish between product/category suggestions