Class MergingCartRestorationStrategy
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.strategy.impl.DefaultCartRestorationStrategy
de.hybris.platform.acceleratorstorefrontcommons.strategy.impl.MergingCartRestorationStrategy
- All Implemented Interfaces:
CartRestorationStrategy
Strategy for cart restoration and merging.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetMostRecentSavedCartGuid(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
-
Constructor Details
-
MergingCartRestorationStrategy
public MergingCartRestorationStrategy()
-
-
Method Details
-
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
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
-