Skip to content

v3.6.0

Compare
Choose a tag to compare
@IvanMaidurov IvanMaidurov released this 07 Mar 13:20
· 109 commits to master since this release
053f9b5

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
  • Update payment selection on cart merge with the guest carts' payment selection after applying coupons and giftcards and only if customer cart has no items
  • Add possibility to have additional data in AddToCartNotAllowed error
  • Deprecate BuildAddRequest in cart service (build your own add request)
  • Provide BaseCartReceiver for fetching carts without DecoratedCartFactory dependency
  • Provide Receiver interface to be able to mock receiving a cart
  • GraphQL:
    • Aggregate many input values to Commerce_Cart_AddToCart mutation in Commerce_Cart_AddToCartInput
    • Add support for bundle and configurable products in Commerce_Cart_AddToCart mutation
  • Added support for AdditionalData on CartItem Level for the defaultCartBehaviour.

checkout

  • Add possibility to have additional data in PaymentFlowActionTriggerClientSDK
  • Breaking: Disable auto canceling of orders during place order rollback, to restore old behaviour set commerce.checkout.placeorder.states.placeorder.cancelOrdersDuringRollback: true

product

  • Introduce Labels() function on Attribute to handle translations for attributes with multiple values, will fallback to Values() function if not translated.
  • Introduce Stock slice in BasicProductData to store more accurate information about availability for each delivery code
  • Introduce new BundleProduct and BundleProductWithActiveChoices types
  • GraphQL:
    • Add unitCode toCommerce_Product_VariationSelection_Option and Commerce_Product_ActiveVariationSelection
    • Fix mapping of VariationSelections
    • Introduce Labels for attributes here as well
    • Extend Commerce_Product query with non-mandatory bundle configuration argument
    • Add type Commerce_Product_BundleProduct that implements Commerce_Product interface and is used as bundle product graphql representation.
    • Change variantionSelections field in configurable products with variantSelection that handles all possible combinations of multi axis configurable.
  • 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.
    • Add new Stock field to returned SimpleProduct from service
    • Add configuration option for delivery codes commerce.product.fakeservice.deliveryCodes which can be used to provide different delivery codes for stock.