I have a rule
Redirect to cart after adding a registration
this rule works exactly as planned.
New scenario and new rule, If the user empties their cart of all products, I want to redirect to previous page (the sending page).
New rule
Redirect user to originating page after removing all items from cart
I have the Event and the Conditions but I don't see how to massage the originating address that was used to get to the cart. The originating form action is <input type="submit" id="edit-submit" name="op" value="Add to cart" class="form-submit">
.
{ "rules_redirect_user_to_originating_page_after_removing_all_items" : {
"LABEL" : "Redirect user to originating page after removing all items from cart",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"TAGS" : [ "Cart" ],
"REQUIRES" : [ "rules", "commerce_cart" ],
"ON" : { "commerce_cart_product_remove" : [] },
"IF" : [ { "data_is_empty" : { "data" : [ "quantity" ] } } ],
"DO" : []
}
}
Can anyone help?