Based on our experience, this type of business requirement involves way
more than just the OrderItemAdd command. Keep the following in mind:
*) dealing with BundleBeans (which are decomposed during the add to cart
process)
* supporting CSR order management via Accelerator
* flagging and skipping specific SKUs the client deems non-mergeable
* and last but by no means least, merging a guest cart with their
registered cart after successful login when the guest cart and the
registered cart contain the same SKU
Quick and dirty would be to write JSP code in the cart page and the
order checkout page to halt the checkout process and provide the shopper
a message and a 'Correct cart' button. Fairly easy to code the form to
delete the first duplicate ORDERITEMS_ID and adjust the quantity on the
second duplicate ORDERITEMS_ID. I mention both pages since people do
bookmark the checkout page and can bypass a cart page check. Best
practice would definitely be to write a few lines of Java in the
ExtOrderProcessCmdImpl and fail the order during the OrderProcess
command. Not JSP proactive but keeps them from placing the order.
Another thought is that with ATP enabled in your store you have *merge,
*remerge etc. parameters available to merge orders and orderitems during
the OrderItemAdd command. Perhaps you can start there if your store
supports ATP. If you go this route, then be sure you call the command
to merge carts after the Logon command when a guest cart is present.
R
Post by VijayaRI would like to customize "OrderItemAddCmd" in such a way that new order items added to the order gets merged with the existing order items with the same part number.
Basically if i add the same product twice to an order, my ORDERITEMS table for that order would have one order item with a quantity of 2.
Any one has done the above type of customization? I would like to hear from you.
-thanks,