Hello,
I have scenario where my products have multiple suppliers. Currently I am able to relate products to suppliers and show suppliers in product.html
After user selects supplier on product.html i have to store it on OrderItem.
Steps i have done so far:
1) I have reimplemented addItem method of OrderServiceImpl to include supplier id selected on product.html and provided this supplier id to addItemWorkflow.doActivities
2) Extended DiscreteOrderItem class, added field Supplier
3) Created new New Activity workflow to be executed after AddOrderItemActivity
4) In this activity i perform a lookup to supplier table and retrieve Supplier entitty.
5) Loop over DiscreteOrderItems and cast it to my extended version of DiscreteOrderItem , set supplier and save OrderItem.
I am having class cast error in this step.
java.lang.ClassCastException: org.broadleafcommerce.core.order.domain.DiscreteOrderItemImpl cannot be cast to ...
I am extending DiscreteOrderItem as i have done with Customer.java and Product.java
Any helps would be highly appreciated.
Thansk & Regards,
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.