Tutorials > Management Center > Create a new promotion type

< Previous | Next >


Add the new promotion type to the Promotion Type Selector window

In this lesson, you add the new promotion type to the Free gift promotions folder in the Promotion Type Selector window so business users can select the template when starting a new promotion.


Procedure

  1. Open WebSphere Commerce Developer.

  2. Complete one of the following steps:

    • In the Enterprise Explorer view, navigate to the LOBTools > WebContent > WEB-INF > src > lzx > commerce > promotion > propertiesViews directory.

    • In the Enterprise Explorer view, navigate to the LOBTools > WebContent > config > commerce > promotion > propertiesViews directory.

  3. Open the properties view file for the Promotion Type Selector window:

    • PromotionTypeTemplatePicker.lzx

    • PromotionTypeTemplatePicker.def

  4. Add the custom promotion type to the Free gift promotions folder:

    Option Description
    PromotionTypeTemplatePicker.lzx In this properties view class file:

    1. Find the following line of code in the file:

      <wcfPropertyValuesFilter displayName="${promotionResources.promotion_folder_FreeGiftPromotions.string}" 
      propertyName="promotionType" values="OrderLevelFreeGift, ProductLevelBuyXGetYFree, CategoryLevelBuyXGetYFree"/>
      

    2. Add the object template name for the custom promotion type (ProductLevelFreeGift) to the list of values, as shown here:

      <wcfPropertyValuesFilter displayName="${promotionResources.promotion_folder_FreeGiftPromotions.string}" 
      propertyName="promotionType" values="OrderLevelFreeGift, ProductLevelBuyXGetYFree, CategoryLevelBuyXGetYFree, ProductLevelFreeGift"/>
      

    3. Save and close the file.

    4. Right-click the LOBTools project; then click Build OpenLaszlo Project on the context menu.
    PromotionTypeTemplatePicker.def In this properties view definition file:

    1. Find the following line of code in the file:

      <PropertyValuesFilter displayName="${promotionResources.promotion_folder_FreeGiftPromotions}" propertyName="promotionType" values="OrderLevelFreeGift, ProductLevelBuyXGetYFree, CategoryLevelBuyXGetYFree"/>
      

    2. Add the object template name for the custom promotion type (ProductLevelFreeGift) to the list of values, as shown here:

      <PropertyValuesFilter displayName="${promotionResources.promotion_folder_FreeGiftPromotions}" 
      propertyName="promotionType" values="OrderLevelFreeGift, ProductLevelBuyXGetYFree, CategoryLevelBuyXGetYFree, ProductLevelFreeGift"/>
      

    3. Save and close the file.

In this lesson, you added the custom promotion type to a folder in the Promotion Type Selector window. In the next lesson, you register a new serialization JSP file to convert the promotion authoring elements from the PX_ELEMENT and PX_ELEMENTNVP tables into the Management Center user interface for the Purchase Condition and Reward section.

< Previous | Next >


+

Search Tips   |   Advanced Search