Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I needed the invoice to be able to display content of a parcel. In the store.module, in the theme_store_invoice method, after these lines
if (0 && is_array($p->data)) {
foreach ($p->data as $key => $value) {
if ($value) {
$items[] = '<strong>'. check_plain($key). ': </strong>'. check_plain($value);
}
}
if ($items) {
$details = theme('item_list', $items);
}
}
$row[] = array(array('data' => $p->qty, 'align' => 'center', 'valign' => 'top'), '<em>'. check_plain($p->title). '</em> '. (($prod->sku != '') ? "[". check_plain($prod->sku) ."]" : ''). '<br />'. $details, array('data' => payment_format($price), 'valign' => 'top', 'align' => 'right'));
Add this block and you will get a nice list of all products included in the package.
if ($p->ptype == "parcel") {
$nids = explode(',',$prod->mnid);
foreach($nids as $key=>$nid) {
$sub = node_load($nid);
$list[] = '<em>'. check_plain($sub->title). '</em> '. (($sub->sku != '') ? "[". check_plain($sub->sku) ."]" : '');
}
$row[] = array(array('align' => 'center', 'valign' => 'top'), theme('item_list', $list) . '<br />'. $details);
}
Comments
Comment #1
weedoo CreditAttribution: weedoo commented