Remove unnecessary variable_get(), pass order_id to uc_cart_checkout_complete_page

jonathan_hunt - October 5, 2009 - 23:53
Project:Ubercart
Version:6.x-2.0-rc7
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

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));
   }

#1

donquixote - November 3, 2009 - 11:52

subscribe

#2

TR - November 9, 2009 - 02:03

+1 Sounds reasonable.

 
 

Drupal is a registered trademark of Dries Buytaert.