Install alongside existing application
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!
Install alongside existing application
I have an existing Laravel 5.4 installation using MariaDB with a custom application running for a site. I want to use Aimeos to add shopping functionality to the site. Is there a way to install without a fresh installation of Laravel? I've tried and can't get it to work.
What I've tried:
Clone production server to create development box.
Change APP_ENV to "development"
Add these lines to composer.json:
Run "composer update"
Install missing php-curl
Run "composer update"
Install missing php-gd
Run "composer update"
Everything downloads and there's an aimeos directory under the vendor directory but the artisan publish and artisan migrate commands don't seem to do anything.
Output from artisan publish command:
Output from artisan migrate command:
As expected from above, look at database structure and no new tables were added. No shop.php in config directory, etc.
I've installed and developed an Aimeos site from scratch on a fresh Laravel install (a couple years ago) but that's not an option with this project. Any way to install without breaking the current site but yet add Aimeos?
Thanks!
Scott
What I've tried:
Clone production server to create development box.
Change APP_ENV to "development"
Add these lines to composer.json:
Code: Select all
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"aimeos/aimeos-laravel": "~2017.04",
...
},
"scripts": {
...
"post-update-cmd": [
"php artisan vendor:publish --tag=public --force",
"php artisan vendor:publish",
"php artisan migrate",
...
]
}
Install missing php-curl
Run "composer update"
Install missing php-gd
Run "composer update"
Everything downloads and there's an aimeos directory under the vendor directory but the artisan publish and artisan migrate commands don't seem to do anything.
Output from artisan publish command:
Code: Select all
Copied Directory [/vendor/laravel/framework/src/Illuminate/Notifications/resources/views] To [/resources/views/vendor/notifications]
Copied Directory [/vendor/laravel/framework/src/Illuminate/Pagination/resources/views] To [/resources/views/vendor/pagination]
Copied Directory [/vendor/laravel/framework/src/Illuminate/Mail/resources/views] To [/resources/views/vendor/mail]
Publishing complete.
Code: Select all
Nothing to migrate.
I've installed and developed an Aimeos site from scratch on a fresh Laravel install (a couple years ago) but that's not an option with this project. Any way to install without breaking the current site but yet add Aimeos?
Thanks!
Scott
Re: Install alongside existing application
Make sure, you've updated your "./config/app.php" file and added the Aimeos service provider class like described in the docs. Then execute
to create the database tables and the demo data. You can leave out the "--option" part if you want to create only the tables.
Code: Select all
./artisan aimeos:setup --option=setup/default/demo:1
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
Re: Install alongside existing application
Thanks! I got the storefront working yesterday but forgot to post here. Currently trying to figure out the admin interface - we already had routes for /admin so we reworked those to not interfere with the Aimeos admin routes. Currently getting
So we're chasing that down today
Code: Select all
Call to undefined method User::can()
Re: Install alongside existing application - Routing issues
We had to make a few tweaks to get things to work with regard to accessing the admin interface. One thing we had to do was change like 291 of the Aimeos Context object to use $user->getName() instead of $user->name
Now we're fighting routing issues. We run multiple sites off the same Laravel install. Our route file looks something like this:
Only site3 needs authentication so that's how we set it up. We don't want the login form displayed on the other sites, etc. To try and get Aimeos working, we commented out all of our login and logout routes, and added to the top of routes/web.php but we still can't get authorization working with Aimeos.
We previously had in the LoginController but we removed that as well. We also tried changing it to but still not working.
When we access /admin, we see the Aimeos login form. When we try to login, we get. We even created a brand new user using php artisan to make sure the user had admin authority. No luck.
Any ideas?
Now we're fighting routing issues. We run multiple sites off the same Laravel install. Our route file looks something like this:
Code: Select all
$site1routes = function() {
Route::get( '/', function() {
return redirect( '/site1app' );
}
Route::group( 'middleware' => [ 'web' ], function() {
// various routes for site 1
});
});
Route::group( array( 'domain' => 'site1.com' ), $site1routes );
// repeat above for site 2
$site3apps = function() {
Route::group( [ 'middleware' => [ 'web' ] ], function() {
Route::get( 'login', [ 'as' => 'login', 'uses' => function() {
return view( 'login' );
}]);
Route::post( 'auth/login', [ 'as' => 'auth.login', 'uses' => function( \Illuminate\Http\Request $request ) {
if( \Auth::attempt([
'email' => $request->get( 'email' ),
'password' => $request->get( 'password' )
])) {
return redirect( '/site3admin' ); // changed from /admin for adding Aimeos
} else {
return view( 'login' )->withErrors( array( 'message' => 'The Email/password provided do not match.' ) );
}
}]);
Route::get( 'logout', [ 'as' => 'logout', 'uses' => function() {
\Auth::logout();
\Session::flush();
return redirect( 'login' );
}]);
Route::group( [ 'middleware' => [ 'auth', 'web' ] ], function() {
// various site3 admin routes, all changed from /admin/path to /site1admin/path for adding Aimeos
});
});
};
Route::group( array( 'domain' => 'site3.com' ), $site3routes );
Code: Select all
Auth::routes()
We previously had
Code: Select all
$redirectTo="/site3admin";
Code: Select all
$redirectTo="/admin";
When we access /admin, we see the Aimeos login form. When we try to login, we get
Code: Select all
NotFoundHttpException in RouteCollection.php
Code: Select all
aimeos:account email@ite.com --admin
Any ideas?
Re: Install alongside existing application
You can reconfigure the admin routes (and all others as well) to use a different prefix, domain, etc.spierce wrote:Thanks! I got the storefront working yesterday but forgot to post here. Currently trying to figure out the admin interface - we already had routes for /admin so we reworked those to not interfere with the Aimeos admin routes.
- https://github.com/aimeos/aimeos-larave ... tes.php#L3
- https://github.com/aimeos/aimeos-larave ... hop.php#L6
Code: Select all
return [
'routes' => [
'login' => ['prefix' => 'aimeos', 'middleware' => ['web']],
'jqadm' => ['prefix' => 'aimeos/admin/{site}/jqadm', 'middleware' => ['web', 'auth']],
'extadm' => ['prefix' => aimeos/'admin/{site}/extadm', 'middleware' => ['web', 'auth']],
'jsonadm' => ['prefix' => 'aimeos/admin/{site}/jsonadm', 'middleware' => ['web', 'auth']],
],
// ...
];
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
Re: Install alongside existing application
Maybe the redirect to the admin interface isn't working because the route is not found. You may have a deeper look into the AdminController to see where the problem occurs:
https://github.com/aimeos/aimeos-larave ... roller.php
https://github.com/aimeos/aimeos-larave ... roller.php
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
-
- Posts: 13
- Joined: 27 Dec 2018, 07:32
Re: Install alongside existing application
Hi,
Can you please tell me how can i make new admin account on my live project because my old account is giving error, showing that credentials do not match and please tell me the table name in database where admin account information is stored.
Thankyou and please reply me as soon as possible.
Can you please tell me how can i make new admin account on my live project because my old account is giving error, showing that credentials do not match and please tell me the table name in database where admin account information is stored.
Thankyou and please reply me as soon as possible.
-
- Posts: 13
- Joined: 27 Dec 2018, 07:32
Re: Path of files
Hi,
Can anyone pease tell me the path of category(catalogue) page file.
Thankyou
Can anyone pease tell me the path of category(catalogue) page file.
Thankyou
Re: Install alongside existing application
One separate topic for each question please.
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