Wednesday, February 23, 2011

Price OverRide feature for price drop

Out of the box the price override feature is used in the Sales center to override the price by an admin.

This feature is really easy to customize for requirements such as price drop , to show some discount and implement as a price override. There is a bit for price override that needs to be set to let the performance engine make aware there is a price override on a orderitem.

int currentPrepFlag =orderItems[i].getPrepareFlagsInEJBType().intValue();
currentPrepFlag |=OrderConstants.PREPAREFLAGS_PRICE_OVERRIDE;
orderItems[i].setPrice(String.valueOf(finalprice));
orderItems[i].setPrepareFlags(new Integer(currentPrepFlag ));
orderItems[i].commitCopyHelper();

No comments:

Post a Comment