Class MergingCartRestorationStrategy

java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.strategy.impl.DefaultCartRestorationStrategy
de.hybris.platform.acceleratorstorefrontcommons.strategy.impl.MergingCartRestorationStrategy
All Implemented Interfaces:
CartRestorationStrategy

public class MergingCartRestorationStrategy extends DefaultCartRestorationStrategy
Strategy for cart restoration and merging.
  • Constructor Details

    • MergingCartRestorationStrategy

      public MergingCartRestorationStrategy()
  • Method Details

    • restoreCart

      public void restoreCart(javax.servlet.http.HttpServletRequest request)
      Description copied from interface: CartRestorationStrategy
      Restore cart.
      Specified by:
      restoreCart in interface CartRestorationStrategy
      Overrides:
      restoreCart in class DefaultCartRestorationStrategy
      Parameters:
      request - the request
    • getMostRecentSavedCartGuid

      protected String getMostRecentSavedCartGuid(String currentCartGuid)
      Determine the most recent saved cart of a user for the site that is not the current session cart. The current session cart is already owned by the user and for the merging functionality to work correctly the most recently saved cart must be determined. getMostRecentCartGuidForUser(excludedCartsGuid) returns the cart guid which is ordered by modified time and is not the session cart.
      Parameters:
      currentCartGuid -
      Returns:
      most recently saved cart guid