vanilophp/framework

option merge_duplicates delete the user cart

Closed this issue · 2 comments

xhava commented

Hi, i have a problem with the option merge_duplicates

i create the vanillo.php in config folder

i set this contents:

<?php

return [
    'cart' => [
        'preserve_for_user' => true,
        'merge_duplicates'  => true,
    ]

then i began to add a product to the cart without being login
now the cart is created without a user_id

Captura de Pantalla 2023-05-20 a la(s) 1 13 26

then i go to login and when i log in the user the cart records in DB are deleted but the cart items still exists

Captura de Pantalla 2023-05-20 a la(s) 1 14 12

i have extended my User model from \Konekt\User\Models\User

class User extends \Konekt\User\Models\User {

    use HasApiTokens, HasFactory, Notifiable;

and in my AppServiceProvider

public function boot(): void
    {
        $this->app->concord->registerModel(\Konekt\User\Contracts\User::class, \App\Models\User::class);
    }

Something special to do, i am missing some configuration?
thanks!

Hi!

i create the vanillo.php in config folder

First of all, it's vanilo.php not vanillo; a single L.

Second, what is the behavior you want to achieve?

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed within 3 days if no further activity occurs. Thank you for your contributions.