Login/Register forms within shop pages
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!
Login/Register forms within shop pages
Laravel: 9
Aimeos: 2022.10
I need an extra step before the checkout address step which would be a push for people to register or log in. So this page should display a login form and a link to the registration page. Is it possible to achieve such implementation of auth object within the shop itself?
If not, can you style login/register pages to be the same as shop pages, that is to reuse such elements as CSS, headers, footers, etc?
Aimeos: 2022.10
I need an extra step before the checkout address step which would be a push for people to register or log in. So this page should display a login form and a link to the registration page. Is it possible to achieve such implementation of auth object within the shop itself?
If not, can you style login/register pages to be the same as shop pages, that is to reuse such elements as CSS, headers, footers, etc?
Re: Login/Register forms within shop pages
First, you need to disable the Aimeos default routes:
https://github.com/aimeos/aimeos-larave ... #L212-L267
Set the "default" to false here:
https://github.com/aimeos/aimeos-larave ... op.php#L19
Then, copy the complete "default" route group to your ./routes/web.php. Move the checkout route to it's own route group and add 'auth' as middleware for the checkout route:
https://github.com/aimeos/aimeos-larave ... #L212-L267
Set the "default" to false here:
https://github.com/aimeos/aimeos-larave ... op.php#L19
Then, copy the complete "default" route group to your ./routes/web.php. Move the checkout route to it's own route group and add 'auth' as middleware for the checkout route:
Code: Select all
Route::group( ['prefix' => 'shop', 'middleware' => ['auth', 'web'], function() {
Route::match( array( 'GET', 'POST' ), 'checkout/{c_step?}', array(
'as' => 'aimeos_shop_checkout',
'uses' => 'Aimeos\Shop\Controller\CheckoutController@indexAction'
) )->where( ['locale' => '[a-z]{2}(\_[A-Z]{2})?', 'site' => '[A-Za-z0-9\.\-]+'] );
});
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