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/cart
to 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/items
to be able to remove all cart items from all deliveries but keeping delivery info and other cart data untouched
- Breaking: Update
- ➕ Add new method
SumShippingGrossWithDiscounts
to the cart domain which returns gross shipping costs for the cart - When using the
ItemSplitter
to split items in items with single qty (SplitInSingleQtyItems
) the split discounts are reversed to make splitting the row total stable. - 💥 Breaking:
SumTotalTaxAmount
now takes taxes on shipping costs into account - 💥 Breaking: Delivery discount sum calculations
SumTotalDiscountAmount
,SumNonItemRelatedDiscountAmount
,SumItemRelatedDiscountAmount
now take discount on shipping costs into account- Old calculation is now in
SumSubTotalDiscountAmount
.
- Old calculation is now in
CartService
- Add
UpdateAdditionalData
to be able to set additional data to cart - Add
UpdateDeliveryAdditionalData
to 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
PriceGross
ofshippingItem
to directly get the shipping cost incl tax (must be filled by cart adapter)
- Add
- GraphQL:
- Add new method
sumShippingGrossWithDiscounts
to theCommerce_DecoratedCart
type - Add new field
sumShippingGross
to theCommerce_DecoratedCart
type - Add new field
priceGross
to theCommerce_Cart_ShippingItem
type - Add new mutation
Commerce_Cart_UpdateAdditionalData
- Add new mutation
Commerce_Cart_UpdateDeliveriesAdditionalData
- Add new field
customAttributes
to theCommerce_CartAdditionalData
type - Add new field
additionalData
to theCommerce_CartDeliveryInfo
type - Add new type
Commerce_Cart_CustomAttributes
with method for getting key/value pairs - Breaking: Make naming convention consistent in graphql schema
Commerce_Cart_*
- Breaking: Remove the fields
getAdditionalData, additionalDataKeys, additionalDeliveryInfoKeys
from theCommerce_CartDeliveryInfo
type - Breaking:
Commerce_Cart_UpdateDeliveryShippingOptions
mutation responded with slice ofCommerce_Cart_DeliveryAddressForm
which was incorrect as we don't process any form data within the mutation. It responds now rightly only withprocessed
state.
- 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
PaymentFlowActionTriggerClientSDK
to 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
/CustomerIdentityService
for easier testing - ➕ Add
State
field to customer address to be closer to cart address type, expose via GraphQL
price
- When marshalling
domain.Price
to JSON the amount is rounded.
product
- ✨ Enhance the
PriceContext
to allow potential delivery specific pricing - GraphQL:
- Breaking: Change
activeBase
ofCommerce_Product_PriceInfo
fromFloat
toCommerce_Price
- Add
availablePrices
to theCommerce_Product
interface to display potential pricing options in the frontend - Add
context
to theCommerce_Product_PriceInfo
model to be able to differ between prices
- Breaking: Change