IBM WCS extending java classes

514 views Asked by At

I am new to IBM WCS. I installed WCS 7.

I need to add Loyalty Points functionality to existing Madisons Store.

I created new table and an AccessBean. I able to insert and retrieve data from this new table.

I need to update the TOTALADJUSTMENT column of ORDERS and ORDERITEMS tables by adding Loyalty Points redeemed by user so that the total order value should be updated each time an item is added to or removed from the Shopping Cart. It should not disturb the existing discounts functionality.

Please let me know what are all the java classes and methods need to extend and override.

2

There are 2 answers

0
Abed Yaseen On

you need to :

  • update CMDREG to make OrderCalculateCmd point a customized version of PromotionEngineOrderCalculateCmdImpl , then you have to customize the later command and override the needed methods to meet your specification (this class is tricky , so better to understand how it works before starting your customization) this is used by other OOTB promotion in commerce - so you need to be careful not break any of OOTB functionality

  • you might have a customized promotion developed and deployed to IBM CMC , so you have the ability to turn on/off point redemption by attaching it to your customized promotion

0
Daniel Persson On

Another way is to look into the promotion engine and create a new custom promotion type that you could apply for your points.

http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.customizetools.doc/refs/rprcspromtype.htm

Using this type you could enable and disable or configure this promotion type with more flexibility from the Management Center.