Page 1 of 1

Aimeos order Customer ID

Posted: 20 Sep 2016, 14:05
by wassim.hattab
Hello,
i'm facing a problem with aimeos orders,
i'm building a multishop website with aimeos laravel and asgard..
I have a sign in in the front end i used the same function as asgard.. but the problem im facing that when i logged in and order an item or something, the customer id in 'mshop_order_base' is null where can i modify the query to use the id of the logged in user or an id session ?? :shock: :shock: :?: :!:

Re: Aimeos order Customer ID

Posted: 20 Sep 2016, 14:17
by aimeos
Does Asgard use another table for storing registered users than the Laravel "users" table?
What you describe looks like that the Laravel Auth facade doesn't know that the user is logged in:
https://github.com/aimeos/aimeos-larave ... t.php#L123

Re: Aimeos order Customer ID

Posted: 20 Sep 2016, 14:30
by wassim.hattab
aimeos wrote:Does Asgard use another table for storing registered users than the Laravel "users" table?
Asgard uses the same table users

And yes the Auth::id() is null in my case because i'm using a different authentication than laravel how can i fix this problem or you recommend to use the authentication of larabel?

Re: Aimeos order Customer ID

Posted: 20 Sep 2016, 15:38
by aimeos
Use the dev-master branch, there you can overwrite the bootstrapping easier and
- Create a new class with extends from the class \Aimeos\Shop\Base\Context
- Overwrite the addUser() method with your own one
- Register your new class using the name "\Aimeos\Shop\Base\Context" in the ./app/Provider/AppServiceProvider.php class of your application ( see https://github.com/aimeos/aimeos-larave ... er.php#L95)