


Troubleshooting: Customer can use unique promotion codes multiple times
If your store uses single-use unique promotion codes, it can be possible for customers to use the same code in multiple orders. For instance, if they are placing orders concurrently in different browsers.
Problem
If a shopper is creating multiple orders at a time and adds the same single-use unique promotion to multiple orders, it is possible for the shopper to complete the orders and redeem the promotion code multiple times. This multiple redemption can occur because there is no validation on the promotion codes before the order is placed.
Solution
You can prevent multiple redemption of a single-use unique promotion code by adding a validation check for unique promotion codes before orders are placed. To add this validation to your site, you must apply the appropriate maintenance interim fixes:Apply the interim fix for JR49398.
Apply the WebSphere Commerce Version 7 Feature Pack 5 Cumulative1 interim fix JR53048.fep. The cumulative fix readme file includes the instructions for installing the cumulative fix.
Apply the following interim fixes:
Apply the WebSphere Commerce Version 7 Feature Pack 7 Cumulative1 Interim Fix (JR50553). The cumulative fix readme file includes the instructions for installing the cumulative fix.
You do not need to apply any maintenance fix. The validation check is available and enabled by default.
The fix adds a task command, ValidateUniquePromotionCodesTaskCmdImpl to your system. The promotion engine can use this command to validate whether a unique promotion code in an order is unused at the time the order is placed. If a unique code is already redeemed at the time the order is placed, the check prevents the unique code from being redeemed again.
- Open a connection to your database, and run the following SQL insert statement to add the
command to the command registry for a store:
Insert into CMDREG (STOREENT_ID,INTERFACENAME,CLASSNAME,TARGET) VALUES (0,'com.ibm.commerce.promotion.facade.server.commands.ValidateUniquePromotionCodesTaskCmd', 'com.ibm.commerce.promotion.facade.server.commands.ValidateUniquePromotionCodesTaskCmdImpl','Local');
- Update and refresh the promotion component registry. Alternatively, you can restart your WebSphere Commerce server.