Flamingo Commerce v3.6.0 Release Notes

  • cart

    • 💥 Breaking: Move all calculations to cart behaviour implementation
      • By moving calculation responsibility, we enable different implementation possibilities for calculations like tax before or after discounts, tax on single item or sum and different tax rounding modes instead of having it hard-coded in the flamingo cart.
      • All calculation functions on cart item, shipping item, delivery and cart are now public fields for which the values must be set by the cart behaviour implementation
      • The DefaultCartBehaviour calculates all new fields accordingly
      • Removed ItemBuilder, DeliveryBuilder and Builder since they didn't provide any meaningful functionality after removing the calculations. Please create structs directly.
      • Changed the GraphQL cart model accordingly.
      • To help with the migration there are sed commands for the following fields in cart/migration.sed: run find . -type f -iname '*.go' -exec gsed -i -f migration.sed "{}" +;
      • Cart items
        • | Old Function | New Field | |----------------------------------------|--------------------------------------| | RowPriceGrossWithDiscount() | RowPriceGrossWithDiscount | | RowPriceGrossWithItemRelatedDiscount() | RowPriceGrossWithItemRelatedDiscount | | RowPriceNetWithDiscount() | RowPriceNetWithDiscount | | RowPriceNetWithItemRelatedDiscount() | RowPriceNetWithItemRelatedDiscount | | TotalDiscountAmount() | TotalDiscountAmount | | ItemRelatedDiscountAmount() | ItemRelatedDiscountAmount | | NonItemRelatedDiscountAmount() | NonItemRelatedDiscountAmount |
      • Shipping items
        • | Old Function | New Field | |----------------------------|-------------------------| | TotalWithDiscountInclTax() | PriceGrossWithDiscounts | | - | PriceNetWithDiscounts |
      • Deliveries
        • | Old Function | New Field | |-----------------------------------|---------------------------------| | SubTotalGross() | SubTotalGross | | SubTotalNet() | SubTotalNet | | SumTotalDiscountAmount() | TotalDiscountAmount | | SumSubTotalDiscountAmount() | SubTotalDiscountAmount | | SumNonItemRelatedDiscountAmount() | NonItemRelatedDiscountAmount | | SumItemRelatedDiscountAmount() | ItemRelatedDiscountAmount | | SubTotalGrossWithDiscounts() | SubTotalGrossWithDiscounts | | SubTotalNetWithDiscounts() | SubTotalNetWithDiscounts | | GrandTotal() | GrandTotal |
      • Cart
        • | Old Function | New Field | |-----------------------------------|---------------------------------| | GrandTotal() | GrandTotal | | - | GrandTotalNet | | SumShippingNet() | ShippingNet | | SumShippingNetWithDiscounts() | ShippingNetWithDiscounts | | SumShippingGross() | ShippingGross | | SumShippingGrossWithDiscounts() | ShippingGrossWithDiscounts | | SubTotalGross() | SubTotalGross | | SubTotalNet() | SubTotalNet | | SubTotalGrossWithDiscounts() | SubTotalGrossWithDiscounts | | SubTotalNetWithDiscounts() | SubTotalNetWithDiscounts | | SumTotalDiscountAmount() | TotalDiscountAmount | | SumNonItemRelatedDiscountAmount() | NonItemRelatedDiscountAmount | | SumItemRelatedDiscountAmount() | ItemRelatedDiscountAmount | | SumAppliedGiftCards() | TotalGiftCardAmount | | SumGrandTotalWithGiftCards() | GrandTotalWithGiftCards | | - | GrandTotalNetWithGiftCards |
    • 🔀 Dispatch a PreCartMergeEvent before and a PostCartMergeEvent after merging a guest and customer cart when logging in

    checkout

    • ➕ Add possibility to have additional data in PaymentFlowActionTriggerClientSDK

    product

    • GraphQL:
      • Add unitCode toCommerce_Product_VariationSelection_Option and Commerce_Product_ActiveVariationSelection
      • Fix mapping of VariationSelections
    • FakeService
      • Add configuration option commerce.product.fakeservice.defaultProducts which toggles the delivery of default test products.
      • Add category facet functionality to the fake SearchService with default category facet items.
      • Add configuration option commerce.product.fakeservice.jsonTestDataCategoryFacetItems which can be used to provide your own category facet items.