Permit checkout only for authenticated uers/Ask login before check out step
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 10
- Joined: 20 Jun 2023, 07:00
Permit checkout only for authenticated uers/Ask login before check out step
Environment : Laravel 10, aimeos 2023.04
How can we check login before the checkout step, we need to permit checkout only for authenticated uers.
We found an article which says to manage in config/shop.php like
'default' => ['prefix' => $prefix . 'shop', 'middleware' => ['web','auth']]
But this will ask login from shop page itself , we need the same only before checkout page.
Please advice.
Thanks
How can we check login before the checkout step, we need to permit checkout only for authenticated uers.
We found an article which says to manage in config/shop.php like
'default' => ['prefix' => $prefix . 'shop', 'middleware' => ['web','auth']]
But this will ask login from shop page itself , we need the same only before checkout page.
Please advice.
Thanks
Re: Permit checkout only for authenticated uers/Ask login before check out step
Please upgrade to 2023.10 LTS as previous 2023.x versions are not supported any more!
In 2024.x+, basket and checkout routes will be in separately configurable route groups:
https://github.com/aimeos/aimeos-larave ... #L225-L248
A solution for 2023.10 is copy the routes from the default route group to your ./routes/web.php file and add "auth" middleware to the "aimeos_shop_checkout" route:
https://github.com/aimeos/aimeos-larave ... #L225-L275
Then, disable the original route by setting this config in your ./config/shop.php to FALSE:
https://github.com/aimeos/aimeos-larave ... op.php#L22
In 2024.x+, basket and checkout routes will be in separately configurable route groups:
https://github.com/aimeos/aimeos-larave ... #L225-L248
A solution for 2023.10 is copy the routes from the default route group to your ./routes/web.php file and add "auth" middleware to the "aimeos_shop_checkout" route:
https://github.com/aimeos/aimeos-larave ... #L225-L275
Then, disable the original route by setting this config in your ./config/shop.php to FALSE:
https://github.com/aimeos/aimeos-larave ... op.php#L22
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