Customizing external entity dependencies
The external entities of the promotion component might not expose sufficient attributes to support your promotions. In this case, you must introduce additional attributes.
CAUTION: Dynamic attribute support has not undergone vigorous
testing. While it is supported, it may generate unexpected results.
About this task
Procedure
To introduce a custom attribute:
- Extend the WCSOrder object so that the new class exposes the new attribute.
- Extend the WCSOrderFactory class so that the new implementation starts to serve up the extended WCSOrder objects
- Implement the custom OrderFactory implementation class.
- Register the custom implementation in the ExternalEntityFactoryRegistry section of the PromotionEngine configuration.
- Restart HCL Commerce so the changes take effect.