Hi,

I use Ubercart 2.9 with Marketplace beta1.
I´ve put the packingslip.itpl.php into the template folder in uc_orders. If a seller want to print the packingslip, the page is empty.
I think it´s because the ubercart template system has changed. But I can´t figure out how to get the packingslip working.

Any help would be great, thanks.

Comments

potschntom’s picture

I´ve found a working solution.

I´ve copied the packingslip.itpl.php to my themes ordner und changed the name to uc_order-packingslip.tpl.php.

Then I´ve changed

function mp_orders_print_packingslip($user, $order) {
$order_id = $order->order_id;
$order = uc_order_load($order_id);

if ($order === FALSE) {
drupal_set_message(t('Order @order_id does not exist.', array('@order_id' => $order_id)));
drupal_goto('admin/store/orders');
}

$output = uc_order_load_invoice($order, $op, 'packingslip');

$output .= '

'
. '

';

print $output;
exit();
}

to:

function mp_orders_print_packingslip($user, $order) {
$order_id = $order->order_id;
$order = uc_order_load($order_id);

if ($order === FALSE) {
drupal_set_message(t('Order @order_id does not exist.', array('@order_id' => $order_id)));
drupal_goto('admin/store/orders');
}

$path = drupal_get_path('module', 'uc_order') . '/templates/uc_order-packingslip.tpl.php';
$output = theme('uc_order', $order, 'print', 'packingslip');

$output .= '

'
. '

';

print $output;
exit();
}

and made the necessary changes in the uc_order-packingslip.tpl.php for my design.

best regards
potschntom