• Welcome to KonaKart Community Forum. Please login or sign up.
 

Change product options during checkout

Started by tduffey, July 06, 2016, 04:20:52 am

Previous topic - Next topic

tduffey

Hi Everyone,

First of all, I'm using KonaKart 5 community (I know...) with a completely customized KonaKart frontend (client). We have a few products that now have options and would like customers to be able to change those options at checkout. In our flow this happens after the checkout order has already been created, and although I can update the basket items (By removing the existing item and adding a new one w/selected option since BasketMgr.updateBasket() only allows changing the quantity) the Order Product entries in the checkout order do not get updated.

I worked around this by simply setting the "opts" field of the associated OrderProduct, e.g.,

            for (OrderProductIf orderProduct : checkoutOrder.getOrderProducts()) {
                if (orderProduct.getProductId() == item.getProductId()) {
                    orderProduct.setOpts(item.getOpts());
                }
            }


This seems to work, but I'm wondering if anyone knows if there are undesirable side effects? For what it's worth, our current set of product options do not impact pricing or any other attribute of the order besides getting the option in there.

Tom

julie

One thing you should check for is that the product with the changed options is in stock.