Single basket per user

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!
Gagik
Posts: 38
Joined: 05 Dec 2023, 06:58

Single basket per user

Post by Gagik » 31 Jan 2024, 06:15

Hello,

PHP version: 8.1
Laravel version: 10
Aimeos version: 2023.10
Environment: Linux

I have seen that user can have many baskets in the database. I mean that in the database exists user baskets archive. I want to prevent that and change the functionality to 'single basket per user'. What is the entry point/file for that ?
Last edited by Gagik on 07 Feb 2024, 07:15, edited 2 times in total.

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

Re: Single basket per user

Post by aimeos » 05 Feb 2024, 11:01

You have to overwrite this class:
https://github.com/aimeos/aimeos-core/b ... andard.php

Up to 2023.10, the relevant getSession()/setSession() methods you need to overwrite are in the Base.php:
https://github.com/aimeos/aimeos-core/b ... p#L60-L147

In 2024.01+, the methods have been moved to a trait but can be overwritten the same way:
https://github.com/aimeos/aimeos-core/b ... ession.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Gagik
Posts: 38
Joined: 05 Dec 2023, 06:58

Re: Single basket per user

Post by Gagik » 06 Feb 2024, 06:16

Thank you.

Post Reply