When pressing the remove button after having added a coupon
the page reloads to a page not found with following messsage

Coupon removed from order
Add URL redirect from this page to another location
The requested page "/en/en/checkout/92" could not be found.

this is the function that controls the removal
is drupal_goto with empty parameters enough ?

function commerce_coupon_remove_coupon_from_order_callback($coupon, $order) {
  if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], 'commerce_coupon_remove_checkout:' . $coupon->coupon_id . ':' . $order->order_id) || !commerce_checkout_access($order)) {
    return MENU_ACCESS_DENIED;
  }

  commerce_coupon_remove_coupon_from_order($order, $coupon);
  drupal_set_message(t('Coupon removed from order'));
  drupal_goto();
}

Comments

enricotersi’s picture

+1

torgosPizza’s picture

Status: Active » Closed (duplicate)