Posted by jonathan_hunt on October 5, 2009 at 11:53pm
Jump to:
| Project: | Ubercart |
| Version: | 6.x-2.0-rc7 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
subscribe
#2
+1 Sounds reasonable.
#3
After 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.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.