Order history priority and Re Order Button

pcambra's picture
Bug Finder
Joined: 01/23/2008
Juice: 251
Order history priority and Re Order Button


I wasn't able of making this module work until i changed its weight, it must be executed after the uc_order module, so I have added in the install hook this code:

function uc_reorder_install() {
  $sql = "SELECT weight FROM {system} WHERE name = 'uc_order'";
  $weight_order = (int)db_result(db_query($sql)) +1;
  $sql = "UPDATE {system} SET weight = %d WHERE name = 'uc_reorder'";

And, I've had problems with the Re-Order button, and a simple link is fine for me so I've substituted this line
array('data' => drupal_get_form('uc_reorder_reorder_form', 'user/'. $user->uid .'/orders/reorder/'. $order->order_id)),
For this:
array('data' => l('Re-Order', 'user/'. $user->uid .'/orders/reorder/'. $order->order_id)),

Reorder button By: TR (8 replies) Tue, 03/11/2008 - 01:05