Vote up!
Vote down!

How do I trigger price calculation from the back end?

When an order is created by an admin in the back office (via Order UI), I add line items with line item manager widget.

The thing is - line item prices don't invoke sell price rules but just get the current price directly from the product. Same thing when we edit the order afterward.

Is this by design? If so, are there any modules which allows to invoke pricing rules when line items add through order UI?

Asked by: csandanov
on August 6, 2013

1 Answer

Vote up!
Vote down!

The primary difference between an order created on the front end via the Add to Cart form and on the back end via the Order Edit form is the order status. On the front end orders begin in the "Shopping cart" status, while on the back end they begin in the "Pending" status.

It's precisely this difference that governs price calculation. Product line items on shopping cart orders have their line items "refreshed" on load to activate pricing, ensuring customers always see the most up to date pricing until they progress through checkout.

Right now, to activate price calculation on the back end, you simply need to set the order status to "Shopping cart" and save the order. Then you can update it back to "Pending" or wherever else it needs to go.

This is less than ideal, so we have an open issue to enable administrators to manually trigger this process without fiddling with order statuses. Follow along here.

Ryan Szrama
Answer by: Ryan Szrama
Posted: Aug 6, 2013