Adding the new promotion type to the Promotion Type Selector window
In this lesson, you add your 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
- Open WebSphere Commerce Developer.
- Complete one of the following steps:
- In the Enterprise Explorer view, navigate to the directory.
- In the Enterprise Explorer view, navigate to the directory.
- Open the properties view file for the Promotion Type Selector
window:
- PromotionTypeTemplatePicker.lzx
- PromotionTypeTemplatePicker.def
- Add your custom promotion type to the Free gift
promotions folder:
Option Description PromotionTypeTemplatePicker.lzx In this properties view class file: - Find the following line of code in the file:
<wcfPropertyValuesFilter displayName="${promotionResources.promotion_folder_FreeGiftPromotions.string}" propertyName="promotionType" values="OrderLevelFreeGift, ProductLevelBuyXGetYFree, CategoryLevelBuyXGetYFree"/>
- Add the object template name for your 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"/>
- Save and close the file.
- Right-click the LOBTools project; then click Build OpenLaszlo Project on the context menu.
PromotionTypeTemplatePicker.def In this properties view definition file: - Find the following line of code in the file:
<PropertyValuesFilter displayName="${promotionResources.promotion_folder_FreeGiftPromotions}" propertyName="promotionType" values="OrderLevelFreeGift, ProductLevelBuyXGetYFree, CategoryLevelBuyXGetYFree"/>
- Add the object template name for your 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"/>
- Save and close the file.
- Find the following line of code in the file: