Store cart items for logged-in user
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!
Store cart items for logged-in user
Hi,
my Shop needs to log-in before you can add items to your cart. That works fine so far, but when a customer
my Shop needs to log-in before you can add items to your cart. That works fine so far, but when a customer
- adds items to his cart
- does not checkout, but logos out
- and logs in again -> his cart ist empty
Re: Store cart items for logged-in user
The cart is currently session based and you have to overwrite the get/setSession() method here to store it permanently for logged in users:
https://github.com/aimeos/aimeos-core/b ... e/Base.php
https://github.com/aimeos/aimeos-core/b ... e/Base.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Store cart items for logged-in user
Thank you, but can you provide an additional hint please?
I have to store the logged in users basket in DB instead of session - correct?
Eg. for setSession() from https://github.com/aimeos/aimeos-core/b ... e/Base.php I have to replace:
But how? Do I have to create a new table or add a new column to the laravel "users" table?
Does Laravel / Aimeos already provide any functionality for this?
I have to store the logged in users basket in DB instead of session - correct?
Eg. for setSession() from https://github.com/aimeos/aimeos-core/b ... e/Base.php I have to replace:
Code: Select all
$session = $context->getSession();
...
$session->set( 'aimeos/basket/list', $list );
$session->set( $key, serialize( clone $order ) );
Does Laravel / Aimeos already provide any functionality for this?
Re: Store cart items for logged-in user
any hint or tip how to solve this would be very great!
...Unfortunately, I have no clue how to proceed here
...Unfortunately, I have no clue how to proceed here