How to show in a joomla module the very last item viewed in hikashop?

  • Posts: 126
  • Thank you received: 6
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
1 day 52 minutes ago #372781

-- HikaShop version -- : 6.5.2
-- Joomla version -- : 6
-- PHP version -- : 8.4

Dear Team,

I am trying to display the very last item viewed by a user in HikaShop inside a Joomla module.

For example, if a user views Item 1, then Item 2, and then Item 3

then user logs in... I would like the Joomla module to display Item 3 once they log in.

I have looked through the settings prnt.sc/_j67iisZNMb_
but cannot find a way to achieve this.
Is there a workaround or a specific configuration you could recommend please?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 85948
  • Thank you received: 14135
  • MODERATOR
20 hours ago #372789

Hi,

You don't need any custom code for this, HikaShop has a "recently viewed" mode in its module.

- Go to Joomla, Extensions, Modules, New, and choose "Hikashop Module".
- In the module options set the content type to Products.
- Set the option "Recently viewed" to Yes.
- Set the number of products to display to 1, so only the very last viewed item is shown.
- Publish the module to the position where you want it.

The list of viewed products is kept in the visitor's session, most recent first, so with a limit of 1 the module shows the last product the visitor looked at. Because the session is preserved when the visitor logs in, a visitor who views Item 1, Item 2 then Item 3 and then logs in will indeed see Item 3 in the module.

One thing to keep in mind: this is based on the browsing session, not stored on the user account. It works within the same session (which covers your case of viewing products then logging in), but it does not persist across a different device or once the session has expired.

The following user(s) said Thank You: lucad

Please Log in or Create an account to join the conversation.

  • Posts: 126
  • Thank you received: 6
  • Hikaauction Standard Hikamarket Multivendor Hikashop Business
24 minutes ago #372813

That worked perfectly

Thank you Nicolas

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum