I am adding a link to the product category in the view product / show.php .
This link is a Menu item of the type Products listing, so it is also present in Hikashop Content menus:
Alias | Type | Link |
example | product | index.php?option=com_hikashop&view=product&layout=listing |
So, in the view I was expecting this code to work:
JRoute::_('index.php?option=com_hikashop&view=product&layout=listing'.$url_itemid.$lang);
But this returns:
/example/product/listing
Should it return the "/product/listing", since it is unecessary?
Is there a better way of getting only "/example" than doing something like this?
preg_replace('/\/product\/listing$/', '', JRoute::_('index.php?option=com_hikashop&view=product&layout=listing'.$url_itemid.$lang));
Thanks!