In March 2014, Commerce 1.9 was released that included a number of feature enhancements involving order workflow on the administrative side. Below is a rundown of the various settings and how they affect the new features.
- Apply pricing rules - A new local action for orders that, when clicked, will run the pricing rules for that particular order.
- Simulate checkout completion - A new local action for orders that, when clicked, will invoke the checkout completion events in rules.
- Shopping cart refresh - These settings let you control how often the shopping cart orders are refreshed, a task that can impact speed at the cost of flexibility.
- Order settings
Apply pricing rules
A new local action for orders that, when clicked, will run the pricing rules for that particular order.
When you click the "Apply pricing rules" button, a few things will happen:
- All product prices will be reset and recalculated using the product pricing rules defined on this site.
- Non-product line items may or may not be updated depending on the type.
- Custom prices entered on the edit form will be lost.
Simulate checkout completion
A new local action for orders that, when clicked, will invoke the checkout completion events in rules.
When you click the "Simulate checkout" button, a few things will happen:
- The normal checkout completion process will be invoked on this order.
- This may involve order status updates and e-mail notifications.
Shopping cart refresh
Shopping cart orders comprise orders in shopping cart and some checkout related order statuses. These settings let you control how the shopping cart orders are refreshed, the process during which product prices are recalculated, to improve site performance in the case of excessive refreshes on sites with less dynamic pricing needs.
- Refresh a shopping cart regardless of who it belongs to.
This was the default setting pre Commerce 1.9. This has a performance impact but enables extremely dynamic pricing (assuming the pricing changes between each page request).
- Only refresh a shopping cart if it belongs to the current user.
This is the new default and allows for dynamic pricing but prohibits the performance impact when the user viewing the information (presumably an administrator) views the cart, which enhances the speed for the administrator and limits the number of possible problems with dynamic pricing that relies on "current user" instead of "order owner."
- Only refresh a shopping cart if it is the current user's active shopping cart.
This setting further preserves pricing on older carts that are not currently the active cart.
To further enhance the performance impact, we set a reasonable lifespan for calculated prices. If your pricing depends on up-to-the-second changes, then this setting can be set to zero so that it will always be calculated. Its likely the majority of use cases could have a large number of seconds here. Shopping carts will only be refreshed if more than the specified number of seconds have passed since they were last refreshed.
Note that, by default, we always recalculate on /cart and /checkout but you can turn off that setting here as well.