I've made a fast update of the code to try to retrieve the menu item id.
I've updated two files in components/com_hikashop/views/product/tmpl/
(I think that once these becomes working these could be put as overrides in template joomla dir)
Add this code to listing_div.php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__menu'));
$query->where($db->quoteName('link')." = ".$db->quote('index.php?option=com_hikashop&view=product&layout=show'));
$db->setQuery($query);
$result_menu = $db->loadAssocList();
$prod_arr = array();
foreach ($result_menu as $res_item)
{
$prod_param = json_decode($res_item['params']);
$prod_id = $prod_param->product_id;
$prod_arr[$prod_id] = $res_item['id'];
}
//print_r($prod_arr);
$this->prod_arr = $prod_arr;
and updated the $link variable in
listing_img_title.php like:
$itemid = (int)$this->prod_arr[$this->row->product_id];
$link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias."&Itemid=".$itemid);
What do you think about it ?
I know it's not really a good coding and not so good for performance, because it retrieves many menu items without filtering over the category on the query.
Thank you for any suggestion !