here is what i have (without what i think is not needed)
i added this to model/manufacuter.php page...
Code: Select all
public function getManufacturerImg($manufacturer_name) {
$query = $this->db->query("SELECT image FROM " . DB_PREFIX . "manufacturer WHERE name = '" . $manufacturer_name . "'");
return $query->row;
}
then on controller/product.php page added this...
Code: Select all
$this->load->model('catalog/manufacturer');
$manu = $this->model_catalog_manufacturer->getManufacturerImg($product_info['manufacturer']);
print_r($manu);
$this->data['manu'] = array();
foreach ($manu as $manus) {
$this->data['manu'][] = array(
'image' => $manus['image']
);
}
print_r($manu);
on view/product.tpl page i have the 3 following lines to try see if either will make a difference
Code: Select all
<?php print_r($manu); ?>
<?php echo $manu; ?>
<?php echo $manu['image']; ?>
echo $manu shows the word Array,
echo $manu['image'] shows error message saying undefined call to...
where am i going wrong? sure it must be so simple and i just have one/two things slightly incorrect.
many thanks