Code: Select all
$data['weight'] = $product_info['weight'];
$tablewunit = $this->db->query("SELECT wcd.unit FROM " . DB_PREFIX . "weight_class_description wcd WHERE (wcd.weight_class_id = " . $product_info['weight_class_id'] . ") AND wcd.language_id = '" . (int)$this->config->get('config_language_id') . "'");
$data['weightunit'] = $tablewunit->row['unit'];
<?php echo ' / ' . $product['weightunit']; ?>
was expecting to display the weightunit. it worked the first time around although the second time it complained about an Notice: Undefined index: weightunit
where am i going wrong?