price-view & checkout for registered user - extend Laravel registration
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!
price-view & checkout for registered user - extend Laravel registration
Hi,
I'd like to restrict my Aimeos & Laravel 6 webshop, so that only registered and approved users can see products with prices and place orders. I expect, that I can use and extend the Laravel registration form for this.
When I use the Laravel (standard) registration form, siteId is not set (in user table) and the newly created customer / user can not be edited in Aimeos admin area ("read only").
How or where can I add the siteId? in config/shop.php?
Or do I have to add the siteId in registrationContoller?
Is there also a shop.php setting for restricting price-display and checkout for registered users only?
Thank you!
I'd like to restrict my Aimeos & Laravel 6 webshop, so that only registered and approved users can see products with prices and place orders. I expect, that I can use and extend the Laravel registration form for this.
When I use the Laravel (standard) registration form, siteId is not set (in user table) and the newly created customer / user can not be edited in Aimeos admin area ("read only").
How or where can I add the siteId? in config/shop.php?
Or do I have to add the siteId in registrationContoller?
Is there also a shop.php setting for restricting price-display and checkout for registered users only?
Thank you!
-
lucadambros
- Posts: 44
- Joined: 24 Jun 2019, 14:46
Re: price-view & checkout for registered user - extend Laravel registration
Use the middleware Authenticate.php and put the routes you want inside the web.php with this:
Code: Select all
Route::group(['middleware' => 'MIDDLEWARE THAT CHECKS IF USER IS LOGGED'], function ()
{
// list of the routes
}
-
lucadambros
- Posts: 44
- Joined: 24 Jun 2019, 14:46
Re: price-view & checkout for registered user - extend Laravel registration
All the routes can be found here: https://github.com/aimeos/aimeos-larave ... routes.php
You can match all the routes you want https://laravel.com/docs/master/routing ... p-prefixes without writing them all
You can match all the routes you want https://laravel.com/docs/master/routing ... p-prefixes without writing them all
Re: price-view & checkout for registered user - extend Laravel registration
Yes, you have to set it in the registration controller.columbo wrote: 09 Oct 2019, 10:02 When I use the Laravel (standard) registration form, siteId is not set (in user table) and the newly created customer / user can not be edited in Aimeos admin area ("read only").
How or where can I add the siteId? in config/shop.php?
Or do I have to add the siteId in registrationContoller?
The Aimeos company is offering an extension for that:columbo wrote: 09 Oct 2019, 10:02 Is there also a shop.php setting for restricting price-display and checkout for registered users only?
https://aimeos.com/extensions#c437
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
Re: price-view & checkout for registered user - extend Laravel registration
Thank you!
are there any examples availbale how to add static values (like siteId) or add new viels (e.g. Company, Address, Phone, etc.) to the Laravel registartion form / registration controller?
Re: price-view & checkout for registered user - extend Laravel registration
You should ask questions regarding the registration form in a Laravel forum.
The site depends on the "site" parameter in the URL (or "default" value if none is given) and you can get the site ID using:
The site depends on the "site" parameter in the URL (or "default" value if none is given) and you can get the site ID using:
Code: Select all
$context = $this->app->make('aimeos.context')->get();
$siteid = $context->getLocale()->getSiteId();
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,