Hi,
How would i get product image in custom module. Doing like this:
<?php
$productClass = hikashop_get('class.product');
$product = $productClass->get($id);
var_dump($product);
?>
Doesn't return image at all inside product variable.
The only way i could get it, was using sql query like this:
$db = JFactory::getDbo();
$sql = 'SELECT file_path FROM '.hikashop_table('file').' WHERE file_type="product" AND file_ref_id='.$id;
$db->setQuery($sql);
$path = $db->loadObjectList();
But i think there should be a better way doing this with hikashop code it self??
Please advise.
Thank you