Hi thanks for this great tutorial,
I am taking it as reference for my project. But I have some issues (probably beginner issues)
In my project, the user is required to build a cart, so I just use UserRepository as CartSessionStorage. Is that fine ?
Secondly, I don't know how Forms pass data. When I submit addtocart, I get "too few arguments to function entity OrderItem::__construct(), 0 passed ... at least 2 expected".
this error occurs before entering in the controller method. The arguments needed are Order from the current connected user and the current item. Maybe you have an idea. As I am beginner, I don't understand how forms work
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi thanks for this great tutorial,
I am taking it as reference for my project. But I have some issues (probably beginner issues)
In my project, the user is required to build a cart, so I just use UserRepository as CartSessionStorage. Is that fine ?
Secondly, I don't know how Forms pass data. When I submit addtocart, I get "too few arguments to function entity OrderItem::__construct(), 0 passed ... at least 2 expected".
this error occurs before entering in the controller method. The arguments needed are Order from the current connected user and the current item. Maybe you have an idea. As I am beginner, I don't understand how forms work