Skip to content

Instantly share code, notes, and snippets.

@pvhee
Created December 8, 2012 11:26
Show Gist options
  • Select an option

  • Save pvhee/4239906 to your computer and use it in GitHub Desktop.

Select an option

Save pvhee/4239906 to your computer and use it in GitHub Desktop.
Patching commerce to fix redirects after removing product from the cart. See http://drupal.org/node/1315796
diff --git a/modules/cart/commerce_cart.module b/modules/cart/commerce_cart.module
index 4d0540d..e500077 100644
--- a/modules/cart/commerce_cart.module
+++ b/modules/cart/commerce_cart.module
@@ -505,7 +505,7 @@ function commerce_cart_block_view($delta) {
// Build the variables array to send to the cart block template.
$variables = array(
'order' => $order,
- 'contents_view' => commerce_embed_view('commerce_cart_block', 'defaults', array($order->order_id)),
+ 'contents_view' => commerce_embed_view('commerce_cart_block', 'defaults', array($order->order_id), $_GET['q'] ),
);
$content = theme('commerce_cart_block', $variables);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment