cancel
Showing results for 
Search instead for 
Did you mean: 

Split Single Order/Cart Entry into multiple Order/Cart Entries of the same product based on Promotion applied

Former Member
0 Kudos

I need to split single order entry into multiple order entries based on Promotions applied. For eg :- Suppose there is a Volume Quota Threshold of 1000 litres upto which customers are provided a discount of 5%. Suppose a customer places an order of 1500 litres of Product A. Thus, customer is eligible for a discount of 5% on Product A for first 1000 litres and he will be charged at the normal rate on next 500 litres. Before applying promotions, there was a single order entry in the cart for Product A. After promotion is applied, the single order entry or line entry of Product A needs to be divided in two line entries with same Product A but different quantities and at different rates or prices. Thus, how do we achieve to split a single cart entry into multiple cart entries based on our promotions logic ? Is there some OOTB way out for this ? If not, then how is single cart entry divided into muliple cart entries ?

Accepted Solutions (1)

Accepted Solutions (1)

former_member357259
Active Contributor
0 Kudos

Hi Ravi,

There is no mechanism to do such splitting of order entries OOTB. You will have to custom implement it.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rupesh,

Our requirement is different. We have different promotion rules which provide discount on some quantity part of the already added say Product A. Thus, we need to split this Product A into two line entries ie promotional line entry and non promotional line entry. Thus, we have created our custom promotions extending ProductPromotions and applied our custom logic to decide the coressponding promotional rule to our line entry added in the cart. So, I guess 'MultiBuy' may not fulfill our requirement. Thanx for the suggestion.

Regards,

Ravi

sakshi_1jan
Newcomer
0 Kudos

Hi Ravi,

We have the same requirement to split order entry , can you tell us how did you implement custom logic.

That would really help us.

Thanks,

Sakshi

Former Member
0 Kudos

You can implement split logic in AddToCartMethodHook, after actual adding of an item to the cart.

Former Member
0 Kudos

Hi Ravi,

You can use OOTB product level promotion 'Multibuy' for above requirement. Try it once.

Regards, Rupesh

Former Member
0 Kudos

Thanx Charles for the suggestion. So, the custom way to do the same may be to create a new itemtype PromotionalLineEntry extending the AbstractOrderEntry. Now, we can add two new attributes - PromotionalLineEntry(as our single line entry can be divided into 2 line entries ie non promotional and promotional) and isPromoted(boolean type) in the AbstractOrderEntry. Suppose a Line Entry L1 is divided into L1.1 and L1.2, where L1.2 is the promotional line entry, and "isPromoted" attribute in the AbstractOrderEntry indicates whether a line item is divided into Promotional and NonPromotional line entries. This is what I have thought of as of now, please do let me know if there is a better custom way/logic to do the same.