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

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Product personalization

Product personalization

Merchants can define configurable product types, which allow their customers to personalize products in their shopping cart prior to purchasing them. For example, a shopper purchasing a T-shirt may want to personalize it with a custom logo that they've uploaded. Or a shopper purchasing jewelery may want to specify text to be engraved. The new gift certificate is an implementation of a personalizable shopping item.

The basic steps for creating a personalized product type are:

  1. Create a custom ShoppingItemFormBean implementation with the fields you need to store the personalized data.
  2. Decorate the default ShoppingItemFormBeanImpl implementation with your custom shopping item form bean.
  3. Extend the ShoppingItemFormBeanContainerFactoryImpl and override the createCartFormBean methods to initialize the personalized data fields in the form bean.
  4. Extend the default ShoppingItemDtoMapperImpl and override doItemFieldsMapping to copy personalized form data to ShoppingItemDto fields.
  5. Create a class that implements ShoppingItemValidator to validate data in personalized fields.
    1. Create the validation rules in ESAPI.properties in both the storefront and CM server.
  6. Override the shoppingItemConfigController bean definition to include your ShoppingItemValidator implementation in the productTypeNameControllerMap .

See the GiftCertificateFormBean implementation for an example. For a detailed walkthrough of the required steps, see Tutorial 2 - Configuring a personalized product.