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 Summary
Constructors Constructor Description MergingCartRestorationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetMostRecentSavedCartGuid(java.lang.String currentCartGuid)Determine the most recent saved cart of a user for the site that is not the current session cart.voidrestoreCart(javax.servlet.http.HttpServletRequest request)Restore cart.-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.strategy.impl.DefaultCartRestorationStrategy
getCartFacade, getSessionService, setCartFacade, setSessionService
-
-
-
-
Method Detail
-
restoreCart
public void restoreCart(javax.servlet.http.HttpServletRequest request)
Description copied from interface:CartRestorationStrategyRestore cart.- Specified by:
restoreCartin interfaceCartRestorationStrategy- Overrides:
restoreCartin classDefaultCartRestorationStrategy- Parameters:
request- the request
-
getMostRecentSavedCartGuid
protected java.lang.String getMostRecentSavedCartGuid(java.lang.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
-
-