Hi!
I would like to share my solution about module of Last visited Reservation Assets (who use HUB component). This is a very simple solution, but it requires your advice. To collect information about the last visited hotel I use Joomla Session parameter (JFactory::getSession).
1. In the template of reservation asset '/components/com_solidres/views/reservationasset/tmpl/default.php' at the file bottom I added the code to collect information (name of the hotel, photo, location, and link to the page):
<?php
$session = JFactory::getSession();
$mylink = $session->get("mylink", array());
$newlink = $this->item->name;
$newlink = JRoute::_('index.php?option=com_solidres&view=reservationasset&id='.$this->item->id, true, false);
$newlink = $this->item->media[0]->value;
$newlink = $this->item->city;
if (!in_array($newlink, $mylink)){
if (count($mylink)==5) array_shift($mylink); //It will take only 5 last visited
$mylink[] = $newlink;
$session->set("mylink", $mylink);
}
?>
2. Then i Make a small module that shows the result of this session in the module. It should be installed and published. (module in attache)
By default, I added the last 5 hotels. I have write it directly in the code.
But most likely it can be done as a parameter of the module.
That is all. At this stage, I was happy with everything

.
But if this is an acceptable solution, is it possible to add code to the page of the reservation asset automatically? May be with some plugin... I do not know codding and programming.
Best regards.
Attachment mod_sr_lastvisited_v0.1.0.zip not found