Flamingo Commerce v3.5.0 Release Notes
-
cart
- ➕ Add convenience function to clone carts
- 0️⃣ DefaultCartBehaviour now returns real cart clones to prevent data races on cart fields
- API
- Breaking: Update
DELETE /api/v1/cartto actually clean the whole cart not only removing the cart items (introduces new route for the previous behaviour, see below) - Add new endpoint
DELETE /api/v1/cart/deliveries/itemsto be able to remove all cart items from all deliveries but keeping delivery info and other cart data untouched
- Breaking: Update
- ➕ Add new method
SumShippingGrossWithDiscountsto the cart domain which returns gross shipping costs for the cart - When using the
ItemSplitterto split items in items with single qty (SplitInSingleQtyItems) the split discounts are reversed to make splitting the row total stable. - 💥 Breaking:
SumTotalTaxAmountnow takes taxes on shipping costs into account - 💥 Breaking: Delivery discount sum calculations
SumTotalDiscountAmount,SumNonItemRelatedDiscountAmount,SumItemRelatedDiscountAmountnow take discount on shipping costs into account- Old calculation is now in
SumSubTotalDiscountAmount.
- Old calculation is now in
CartService- Add
UpdateAdditionalDatato be able to set additional data to cart - Add
UpdateDeliveryAdditionalDatato be able to set additional data to the delivery info - Introduce new [interface](cart/application/service.go) to be able to easier mock the whole
CartService - Add auto generated mockery mock for the
CartService - Add new field
PriceGrossofshippingItemto directly get the shipping cost incl tax (must be filled by cart adapter)
- Add
- GraphQL:
- Add new method
sumShippingGrossWithDiscountsto theCommerce_DecoratedCarttype - Add new field
sumShippingGrossto theCommerce_DecoratedCarttype - Add new field
priceGrossto theCommerce_Cart_ShippingItemtype - Add new mutation
Commerce_Cart_UpdateAdditionalData - Add new mutation
Commerce_Cart_UpdateDeliveriesAdditionalData - Add new field
customAttributesto theCommerce_CartAdditionalDatatype - Add new field
additionalDatato theCommerce_CartDeliveryInfotype - Add new type
Commerce_Cart_CustomAttributeswith method for getting key/value pairs - Breaking: Make naming convention consistent in graphql schema
Commerce_Cart_* - Breaking: Remove the fields
getAdditionalData, additionalDataKeys, additionalDeliveryInfoKeysfrom theCommerce_CartDeliveryInfotype - Breaking:
Commerce_Cart_UpdateDeliveryShippingOptionsmutation responded with slice ofCommerce_Cart_DeliveryAddressFormwhich was incorrect as we don't process any form data within the mutation. It responds now rightly only withprocessedstate.
- Add new method
- 💥 Breaking: Upgrade github.com/go-playground/form to v4, all types are fully compatible, but import paths have to be changed
- 💥 Breaking: Do not allow cart mutations via GET anymore. All Add, Update, Delete and Clean actions are affected:
/cart/add/:marketplaceCode/cart/update/:id/cart/delete/all/cart/clean/cart/delivery/:deliveryCode/cart/delete/delivery/:deliveryCode/cart/delete/:id
checkout
- Introducing Flamingo events on final states of the place order process
- 0️⃣ Introduce a max ttl for the checkout state machine to avoid polluting the redis with stale checkout processes, defaults to 2h
- Checkout controller: force new order id reservation if an early place happened and there was a payment issue
- API
- In case of an invalid cart during place order process we now expose the cart validation result, affected endpoints:
GET /api/v1/checkout/placeorder POST /api/v1/checkout/placeorder/refresh POST /api/v1/checkout/placeorder/refresh-blocking
- In case of an invalid cart during place order process we now expose the cart validation result, affected endpoints:
- ➕ Add new Flow Action
PaymentFlowActionTriggerClientSDKto the checkout - 💥 Breaking: Upgrade github.com/go-playground/form to v4, all types are fully compatible, but import paths have to be changed
customer
- ➕ Add mockery mocks for both
Customer/CustomerIdentityServicefor easier testing - ➕ Add
Statefield to customer address to be closer to cart address type, expose via GraphQL
price
- When marshalling
domain.Priceto JSON the amount is rounded.
product
- ✨ Enhance the
PriceContextto allow potential delivery specific pricing - GraphQL:
- Breaking: Change
activeBaseofCommerce_Product_PriceInfofromFloattoCommerce_Price - Add
availablePricesto theCommerce_Productinterface to display potential pricing options in the frontend - Add
contextto theCommerce_Product_PriceInfomodel to be able to differ between prices
- Breaking: Change