Inquiry: Storing Favorites in Session for Guest Users

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
Paulus-Ragnarr
Posts: 25
Joined: 15 Oct 2024, 07:02

Inquiry: Storing Favorites in Session for Guest Users

Post by Paulus-Ragnarr » 16 Jan 2025, 09:32

Hey Aimeos,

We have a scenario on our site where we want non-logged-in users to be able to add product favorites. Currently, the customer favorites JSON API requires authentication to add favorites, but we’re wondering if it’s possible to implement something like the basket, where favorites could be stored in the session for non-logged-in users as well.

If this is feasible, could you guide us on how to set it up and what resources we should refer to?

Thanks so much!

Code: Select all

Aimeos version: Aimeos Headless 2024.10.*
PHP version: 8.2
Environment: Mac

User avatar
aimeos
Administrator
Posts: 8620
Joined: 01 Jan 1970, 00:00

Re: Inquiry: Storing Favorites in Session for Guest Users

Post by aimeos » 16 Jan 2025, 10:05

The pinned product feature is what you are looking for.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
Paulus-Ragnarr
Posts: 25
Joined: 15 Oct 2024, 07:02

Re: Inquiry: Storing Favorites in Session for Guest Users

Post by Paulus-Ragnarr » 16 Jan 2025, 10:07

Thanks for the reply.

Is this available via JSON API? We are using Json Api Aimeos Headless.

User avatar
aimeos
Administrator
Posts: 8620
Joined: 01 Jan 1970, 00:00

Re: Inquiry: Storing Favorites in Session for Guest Users

Post by aimeos » 18 Jan 2025, 12:12

Unfortunately not. There's no API for that and you have to create one. If you do, please consider creating a pull request as we would be happy to merge it into the core :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply