Skip to content

v0.10.0

Compare
Choose a tag to compare
@lauraluiz lauraluiz released this 17 Aug 13:51
· 321 commits to master since this release

Technical

  • Checkout's Payment and Shipping pages have been reworked and are now completely integrated in Sunrise Framework:

    • Some related templates have been changed, check shipping-form.hbs and payment-form.hbs.
    • The associated view models are generated via injected factories.
    • The injected factories are using Play Forms instead of own classes.
    • Pages are correctly displaying form errors.
    • Controllers are completely overridable and allow components to be registered.
    • Controllers are following Form structure from Sunrise.
  • A cart instance in commercetools platform is now only created when is strictly necessary (i.e. when adding a product to the cart), so no unnecessary carts are generated.

  • Removed unused classes ShippingRateBean, ShopShippingRate, ProductVariantBeanFactoryInjectless, UserFeedback, CountryFormFieldBean, FormBean and all its subclasses, plus some FormUtils methods that are not needed anymore due to the change of Form handling.

  • Renamed Settings beans to SettingsBean to follow same pattern as other view models.

  • All view models are following an uniformed structure and extending from ModelBean, which enables dynamic data to be passed.

  • Renamed and moved Play Framework extended classes to their own package com.commercetools.sunrise.play, which affects application.conf:

    play.application.loader = "com.commercetools.sunrise.common.configuration.SunriseApplicationLoader"
    play.http.filters = "com.commercetools.sunrise.common.basicauth.BasicAuthHttpFilters"
    play.http.errorHandler = "com.commercetools.sunrise.http.SunriseDefaultHttpErrorHandler"
    

    Are now

    play.application.loader = "com.commercetools.sunrise.play.inject.SunriseGuiceApplicationLoader"
    play.http.filters = "com.commercetools.sunrise.play.http.SunriseHttpFilters"
    play.http.errorHandler = "com.commercetools.sunrise.play.http.SunriseDefaultHttpErrorHandler"
    
  • Added global CSRF Filter so that a CSRF token is always available and it forces to receive a CSRF token on certain requests without the need of explicitly declare it via @AddCSRFToken and @RequireCSRFToken.

  • Renamed InfoData to TitleDescriptionBean to provide a better description of what it contains.

  • Reworked Cart related bean classes and factories:

    • Created MiniCartBeanFactory to generate MiniCartBean
    • CartLikeBean and CartLikeBeanFactory has been split to CartBean/OrderBean and CartBeanFactory/OrderBeanFactory respectively, while CartLikeBeanFactory has become an abstract class.
    • MiniCartLineItemBean and MiniCartLineItemBeanFactory has been renamed to LineItemBeanand LineItemBeanFactory respectively.
    • LineItemBean and LineItemBeanFactory has been renamed to LineItemExtendedBeanand LineItemExtendedBeanFactory respectively.
    • LineItemsBean has been renamed to LineItemListBean and replaces MiniCartLineItemsBean too.
    • LineItemsBeanFactory has been removed and the logic is now in CartLikeBeanFactory.
  • Fixed memory issue that generated an increasing amount of SphereClient instances that could not be garbage collected.

  • Fixed another issue with JavaMoney API, which might raise on certain situations rounding related exceptions.