Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. The Developer Center continues to support Commerce 6.13.0 through 7.4.1.Visit new site

Shopper Key Classes

Shopper Key Classes

The majority of Shopper-related classes are located in the core package (com.elasticpath.core) within the Shopper packages (com.elasticpath.service.shopper, com.elasticpath.domain.shopper)

Domain Classes

  • Shopper- A shopper in the system: this is the key object for finding items related to the shopper such as shopping carts and wish lists. Aggregates the following interfaces:
    • ShoppingRequisiteData- Consolidates interfaces providing data required for ShoppingCart operations, including:
      • PriceListStackCache - Provides access to a cached instance of a PriceListStack.
      • TagSource - Provides access to TagSets.
      • LocaleProvider - Provides a Locale.
      • CurrencyProvider - Provides a Currency.
      • StoreCodeProvider - Sets and returns the storeCode for a particular Store.
    • CustomerAccessor - Provides access to the Customer attached to the Shopper.
    • ShoppingCartAccessor - Provides access to the Shopping Cart attached to the Shopper.
    • WishListAccessor - Provides access to the Wish List attached to the Shopper.
    • SimpleCacheProvider - Provides access to an attribute cache; currently used for RuleIds (related to Promotion rules used in Shopping Cart.)
    • UpdateShopperTransientData - An interface to update any of the transient Shopper data related to a CustomerSession or Customer.
    • PureEntity - GUID setter and getter interface for domain entities.
  • ShopperMemento - Persistent data for the Shopper.
  • ShopperImpl - Implementation of the Shopper interface.
  • ShopperKey - Sets and returns the ShopperUID for a CustomerSession.
  • ShopperRefrence - Sets and returns the Shopper for a CustomerSession.

Service Classes

  • ShopperDao - Data Access Object interface for the ShopperMemento.
  • ShopperDaoImpl - Implementation of the Shopper DAO.
  • ShopperService - Provides methods for finding or storing the Shopper.
  • ShopperServiceImpl - Implementation of ShopperService interface.
  • ShopperCleanupService - Supports cleanup activities around Shopper.
  • ShopperCleanupServiceImpl - Implements the ShopperCleanupService interface.
  • ShopperDependencyCleanupService - Cleans up Shopper dependents.
  • ShoppingCartCustomerSessionUpdater - Updates the shopping cart with the customer session.
  • CustomerSessionShopperUpdateHandler- Interface implemented by classes that perform operations required when the Shopper is changed on the Customer Session. Includes:
    • PromotionCodeInvalidatorForShopperUpdates - Clears promotions and coupons tied to the previous Shopper, and copies any public coupons.
    • ShoppingCartMergerForShopperUpdates - Merges Shopping Carts during Shopper changes.
    • WishListMergerForShopperUpdates - Combines Wish Lists during shopper changes.
    • CustomerConsentMergerForShopperUpdates - Combines customer consents when a shopper changes from anonymous user to shopper profile during the same session.