There is a great function in commerce_cart (commerce_cart_order_refresh) but there is no rule action to perform this task.

Comments

arknoll’s picture

Assigned: arknoll » Unassigned
Status: Active » Needs review
StatusFileSize
new1.14 KB

Status: Needs review » Needs work

The last submitted patch, 1: commerce_cart_2157847_order-refresh-action.patch, failed testing.

rszrama’s picture

Status: Needs work » Closed (won't fix)

Hmm, I'm not sure this is really needed. Can you describe a situation in which the current execution of this function on load is insufficient? I'm just struggling to think of when we might actually want this process to run twice in a single pageload. I could possibly see this being made part of #2151535: Reduce the occurrence of the shopping cart refresh, though, where prices were infinitely delayed but then refreshed via Rules.

arknoll’s picture

In my particular case I am using this action in a rule having to do with discounts (using commerce_coupon module) and refreshing product prices on an order when a discount is removed from the cart.

it's a handy helper action for if/when somebody has some complex order logic which requires a refresh.

-Alex

rszrama’s picture

Hey Alex, thanks for the further info. I guess it still isn't entirely clear to me - you need the refresh to be triggered from within a refresh? Or for some business logic reason waiting for the page to reload / trigger a refresh was insufficient here?