Registering a serialization JSP file for the new object definition
The serialization JSP file takes the promotion authoring elements from the PX_ELEMENT and PX_ELEMENTNVP tables and displays them in the Management Center user interface for your new promotion type. Business users can then use this section of the user interface when they create promotions.
About this task
Procedure
- Open HCL Commerce Developer and switch to the Enterprise Explorer view.
- Expand .
-
Open one of the following files for editing, depending on your HCL Commerce
version.
- For HCL Commerce Version 9.0.0.x, open struts-extension.xml file with a Struts configuration file editor.
Open the spring-extension.xml file for editing.
-
If you are using Version 9.0.0.x, add a new action mapping:
-
Add a new view controller.
-
Restart the HCL Commerce test server to make the new configuration available.
Example
For your custom promotion type, Customers who purchase two dining chairs (FULO-01) qualify to
purchase a dining table (FULO-02) at the reduced price of $200:
-
For Version 9.0.0.x, the new action mapping added to the existing struts-extension.xml file looks like this:
<action path="/SerializePromotionElement-ProductLevelPWPFixedCostDiscountPurchaseCondition" include="/jsp/commerce/promotion/restricted/SerializeGenericPromotionElement.jsp"/>
The new view controller looks like this:
<bean id="/SerializePromotionElement-ProductLevelPWPFixedCostDiscountPurchaseCondition" class="org.springframework.web.servlet.mvc.ParameterizableViewController"> <property name="viewName" value="/jsp/commerce/promotion/restricted/SerializeGenericPromotionElement.jsp"/> </bean>