User registration without {site}

Help for integrating the Laravel package
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!
snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

User registration without {site}

Post by snicto » 03 Nov 2022, 18:10

Hello,

I want users to be able to register, however, it seems it requires the site to be passed on all front-end URLs. Is it possible to set it up so the default site is used (multishop is not going to be used)? Since it will become a hassle in the long term to manage URLs with the site included.

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: User registration without {site}

Post by aimeos » 06 Nov 2022, 19:11

If you use the Aimeos Laravel distribution and don't enable SHOP_MULTISHOP in your .env file, the {site} placeholder shouldn't be required in any URL. You should have a look into the ./routes/web.php file:
https://github.com/aimeos/aimeos/blob/m ... hp#L30-L45
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

Re: User registration without {site}

Post by snicto » 07 Nov 2022, 17:28

aimeos wrote: 06 Nov 2022, 19:11 If you use the Aimeos Laravel distribution and don't enable SHOP_MULTISHOP in your .env file, the {site} placeholder shouldn't be required in any URL. You should have a look into the ./routes/web.php file:
https://github.com/aimeos/aimeos/blob/m ... hp#L30-L45
My routes/web.php is like that and is unchanged from the core package. I am not using multishop, my .env is as follows:

Code: Select all

SHOP_MULTILOCALE=1
SHOP_MULTISHOP=0
SHOP_REGISTRATION=1
When going to the front page, it returns the following error:

Code: Select all

Missing required parameter for [Route: aimeos_home] [URI: {locale}/{site}] [Missing parameter: site].
What I have narrowed it down to is the shop.php config file:
https://github.com/aimeos/aimeos/blob/6 ... php#L6-L19

It triggers the requirement for {site}, removing the "config( 'app.shop_registration' )" does make everything work, however, registration cannot be completed and throws an error that it does not know what code/site the user is associated with.

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: User registration without {site}

Post by aimeos » 08 Nov 2022, 18:51

SHOP_REGISTRATION=1 is only for merchant registration in multi-site environments so if you activate this, multi-site is enabled too.

The Aimeos distribution has no user registration enabled because users can opt in to create an account automatically at the end of the checkout process.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

snicto
Posts: 37
Joined: 12 Oct 2022, 14:00

Re: User registration without {site}

Post by snicto » 10 Nov 2022, 14:23

Is there a way to enable user registration, so people can register before they make a purchase?

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: User registration without {site}

Post by aimeos » 11 Nov 2022, 06:11

You have to change the Laravel register controller in your installation accordingly:
https://github.com/aimeos/aimeos/blob/m ... roller.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: User registration without {site}

Post by VirtualSpy » 08 Dec 2022, 06:41

snicto wrote: 10 Nov 2022, 14:23 Is there a way to enable user registration, so people can register before they make a purchase?
just use this route

Code: Select all

@if (Route::has('register'))
                        <a class="underline text-sm text-gray-600 hover:text-gray-900" href="{{ airoute('register') }}">
                            {{ __('Create Account') }}
                        </a>
                    @endif 
on your login blade file

User avatar
AhmadHelali
Posts: 7
Joined: 22 Feb 2023, 15:25

Re: User registration without {site}

Post by AhmadHelali » 02 Mar 2023, 07:25

just use this route

Code: Select all

@if (Route::has('register'))
                        <a class="underline text-sm text-gray-600 hover:text-gray-900" href="{{ airoute('register') }}">
                            {{ __('Create Account') }}
                        </a>
                    @endif 
on your login blade file

I got error at registration :
Swift_TransportException
Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required "

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: User registration without {site}

Post by aimeos » 03 Mar 2023, 12:06

You don't have the mail server configured in your .env file.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply