<?php
if ($node->type == 'product') {
$arr_sku = uc_stock_skus($node->nid);
$stock_html .='<table>';
foreach($arr_sku as $sku){
$stocklevel = uc_stock_level($sku);
if ($stocklevel) {
if ($stocklevel < 1) {
$stocklevel = '<span class="nostock">'.$stocklevel.'</span>';
}
$stock_html .='<tr><td>'.$sku.'</td><td>: '.$stocklevel.'</td></tr>';
}
}
$stock_html .='</table>';
}
?>If I put this in the end of my node.tpl.php, I get:
Fatal error: Call to undefined function uc_stock_skus() in /var/www/drupal-6.14/themes/garland/node.tpl.php on line 36
Where line 36 is:
$arr_sku = uc_stock_skus($node->nid);
It doesn't seem to matter which theme I use. My setup is Drupal 6.14, Ubercart 6.x-2.0.
