Closed (fixed)
Project:
Ubercart
Version:
6.x-2.0-rc7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2009 at 23:53 UTC
Updated:
10 Mar 2010 at 04:50 UTC
uc_cart.pages.inc instantiates $page, but then does an unnecessary variable_get().
Also, I'm passing order_id so the destination page can do something useful.
Index: modules/ubercart/uc_cart/uc_cart.pages.inc
===================================================================
--- modules/ubercart/uc_cart/uc_cart.pages.inc (revision 15831)
+++ modules/ubercart/uc_cart/uc_cart.pages.inc (working copy)
@@ -544,7 +544,7 @@
$page = variable_get('uc_cart_checkout_complete_page', '');
if (!empty($page)) {
- drupal_goto(variable_get('uc_cart_checkout_complete_page', ''));
+ drupal_goto($page, array('order_id' => $order->order_id));
}
Comments
Comment #1
donquixote commentedsubscribe
Comment #2
tr commented+1 Sounds reasonable.
Comment #3
tr commentedAfter looking into this, I decided to only remove the unnecessary variable_get() in both the 6.x and 5.x branches. That change is now committed.
The structure of the code is a little weird for complete sale, but it seems that the uc_cart_checkout_complete_page variable is almost unneeded. If you want to customize the output page your customer sees upon sale completion, you can set the 'continue shopping' message, or you can override theme_uc_cart_complete_sale() (which has access to $order) for total customization, including a redirect to a landing page if you want. I don't really see any point in the uc_cart_checkout_complete_page variable - all it will do is suppress the output of theme_uc_cart_complete_sale() and replace it by its own output, but as I said you can do the same thing by overriding the theme function.