OrderItemPriceDetail for price adjustment
Posted: Thu Feb 12, 2015 12:54 pm
We tried to implement a bus ticket system by using broadleafcommerce.
One feature of web app is to adjust of price (round trip price) of bus ticket when the user add a pair of round tickets to his shopping cart.
We already created a pricing workflow activity to identify if the pair of tickets in shopping cart is round-trip or not.
But we are confused to how to adjust the ticket price; if we change the price on OrderItem by using setPrice(), it seems like more problems will be triggered when user update the ticket quantity in shopping cart.Also for each orderItem with bigger quanity, some of them might have the adjusted price, some of them might not have the adjusted price.
We are thinking about to use OrderItemPriceDetail now , but my question is here: how to correctly use OrderItemPriceDetail to adjust the price of orderItem? Also . Say for a single orderItem with quantity 20, could we just adjust the price on 15 of those 20 items and leave the price of other 5 items unchanged?
Thanks in advance.
One feature of web app is to adjust of price (round trip price) of bus ticket when the user add a pair of round tickets to his shopping cart.
We already created a pricing workflow activity to identify if the pair of tickets in shopping cart is round-trip or not.
But we are confused to how to adjust the ticket price; if we change the price on OrderItem by using setPrice(), it seems like more problems will be triggered when user update the ticket quantity in shopping cart.Also for each orderItem with bigger quanity, some of them might have the adjusted price, some of them might not have the adjusted price.
We are thinking about to use OrderItemPriceDetail now , but my question is here: how to correctly use OrderItemPriceDetail to adjust the price of orderItem? Also . Say for a single orderItem with quantity 20, could we just adjust the price on 15 of those 20 items and leave the price of other 5 items unchanged?
Thanks in advance.