persisting basket data between different customer sessions?
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
persisting basket data between different customer sessions?
Hi,
Using:
- aimeos/aimeos-headless (2023.10.10)
- PHP 8.2
- Laravel v10.40.0
- using an external auth provider (Keycloak); requests from frontend include a Bearer token auth. header + csrf token
Scenario:
- authenticated user adds items to basket
- items are present in mshop_order_basket with the correct customer id and basket data
- user clears all cookies
- user login again
- jsonapi/basket is empty for the user
Any ideas on where this problem could be?
Using:
- aimeos/aimeos-headless (2023.10.10)
- PHP 8.2
- Laravel v10.40.0
- using an external auth provider (Keycloak); requests from frontend include a Bearer token auth. header + csrf token
Scenario:
- authenticated user adds items to basket
- items are present in mshop_order_basket with the correct customer id and basket data
- user clears all cookies
- user login again
- jsonapi/basket is empty for the user
Any ideas on where this problem could be?
Re: persisting basket data between different customer sessions?
Hi
It's not a problem, it's a default behavior of this use-case. Yes, from some point of view, 'mshop_order_basket' basket is an archive of baskets.
You can change this behavior by overwriting this file.
https://github.com/aimeos/aimeos-core/b ... andard.php
Or make a different decision by rewriting it on another business logic layer after login.
It's not a problem, it's a default behavior of this use-case. Yes, from some point of view, 'mshop_order_basket' basket is an archive of baskets.
You can change this behavior by overwriting this file.
https://github.com/aimeos/aimeos-core/b ... andard.php
Or make a different decision by rewriting it on another business logic layer after login.
Re: persisting basket data between different customer sessions?
Thanks for the fast and helpful reply.
Making an extension to extend the original order manager seems like the way to go if this is the default behavior (and the shop will only support registered users).
Making an extension to extend the original order manager seems like the way to go if this is the default behavior (and the shop will only support registered users).