Page 1 of 1

issue with orderItem attributes not retained

Posted: Wed May 16, 2012 10:42 pm
by sai
Hi

I added an OrderItem as an anonymous customer (not logged in) then logged back in as a customer. I see that the Order Item is replaced with a new one. During this transition the attributes I added to the Order Item are not ported to the new one. They were deleted.

When I looked at code where the anonymous cart is merged I did not see code which transfer attributes (BLC_ORDER_ITEM_ATTRIBUTE) into the new Order.

CartServiceImpl.java
Method : mergeCart(Customer customer, Order anonymousCart, boolean priceOrder)

Please advise.

Thanks,
Sai

Re: issue with orderItem attributes not retained

Posted: Fri May 18, 2012 5:11 pm
by bpolster
Opened up a defect (http://jira.broadleafcommerce.org/browse/BLC-487) to address this.

You could try overriding the following method in blCartService (CartServiceImpl) - if you are in a pinch:

Code: Select all

protected DiscreteOrderItemRequest createDiscreteOrderItemRequest(DiscreteOrderItem discreteOrderItem)