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].setPrepareFlags(new Integer(currentPrepFlag ));

Tuesday, February 22, 2011

External/Custom promotions loader for WCS

This article is more relevant for 6.0, As I am not sure, how much Management center makes it easier to create promotions and how much effort does it take compared to Accelerator. I did work on some on POC for management center and found it relatively easier to accelerator.

Promotion engine is really powerful and Accelerator only has limited functionality exposed.In the past I have worked on loading new promotion types that are supported by promotion engine using loading via spreadsheets and also same approach can be used to load external promotions into WCS.

The promotions loader essentially has to put entries and XML into the following tables.
CATENCALCD --product promotions
CATGPCALCD--category promotions

It is still a maintenance struggle from what I have seen in production for a couple of years but the functionality is not that hard to implement and these promotions are visible in Accelerator and can be disabled or deleted but these could not be edited in Accelerator because they were for created for custom features that had no OOB Accelerator support.

Tuesday, February 15, 2011

DynaCache problem ! Any Exception will result in not caching response

IBM run time has underlying low level logic to designate a page/entry uncacheable in the event of any system exception. Even if the system exceptions are caught from custom code. It still ends up not caching the entry.
If you have any extra parameters in the URL that could cause any exceptions. The output of the servlet is not cached.

Do make sure before passing parameters to OOB commands beans. Validate the ID's that will help for some cases.