Page 1 of 1

Account page access

Posted: 27 Jan 2018, 04:35
by Travin
Hi guys!
I know Aimeos has account page already. But honestly i don't understand how can i access it? Which URL it placed or how I need to config routes to see it? Can anyone please explain it to me a little bit? Thanks a lot!

Re: Account page access

Posted: 28 Jan 2018, 11:53
by antonlinderer
you need to have in your routes/web.php file following line of code:
Auth::routes();
For more info goto: https://laravel.com/docs/5.5/authentica ... quickstart

Re: Account page access

Posted: 28 Jan 2018, 14:37
by Travin
Thank you for the answer Anton!
I have Auth::routes(); at my routes/web.php. Still don't understand how can i see account page :shock:
I'm currently authorized on my website. There are no account page link or account information. Orders history, user's addresses and so on.

Re: Account page access

Posted: 28 Jan 2018, 14:57
by antonlinderer
Auth::routes() is just a shorthand for the routes:

// Authentication Routes...
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout');

// Registration Routes...
Route::get('register', 'Auth\RegisterController@showRegistrationForm');
Route::post('register', 'Auth\RegisterController@register');

// Password Reset Routes...
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm');
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm');
Route::post('password/reset', 'Auth\ResetPasswordController@reset');

Re: Account page access

Posted: 31 Jan 2018, 19:04
by Travin
:?
Okay now I have at my web.php:

Code: Select all

Route::get('/', function () {
    return view('welcome');
});
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
Also we defined Aimeos\Shop\ShopServiceProvider::class at Providers section of config/app.php.
And we have Aimeos account controller at \vendor\aimeos\aimeos-laravel\src\Aimeos\Shop\Controller\AccountController.php
Still don't understand how I need to routing URL mydomen.com/account to Aimeos account controller. I have 404 at this url

Re: Account page access

Posted: 31 Jan 2018, 21:36
by antonlinderer
for instance for login you need to use:
http://yourdomain.com/login

Re: Account page access

Posted: 01 Feb 2018, 09:57
by Travin
Okay, I'm logged in and redirected to /home URL.
View for the url is placed here: \resources\views\home.blade.php

Code: Select all

@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel panel-default">
                <div class="panel-heading">Dashboard</div>

                <div class="panel-body">
                    @if (session('status'))
                        <div class="alert alert-success">
                            {{ session('status') }}
                        </div>
                    @endif

                    You are logged in!
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
It's typical laravel home page and don't have relation with Aimeos. How can I attach this with Aimeos?
I tried to add @yield('aimeos_header'). Nothing, it's empty. I tried to add <?= $aibody['basket/mini'] ?> and I got undefined variable. I tried to extend @extends('app') (my working template for Aimeos products pages) instead of @extends('layouts.app') and I got undefined variable at my app.blade.php
Don't see anything about that at the docs :(

Re: Account page access

Posted: 02 Feb 2018, 17:58
by aimeos
Please have a look into this article: https://aimeos.org/docs/Laravel/Create_new_pages
It's also valid if you want to extend existing Laravel pages like /home

Re: Account page access

Posted: 18 May 2018, 10:10
by 吳家豪
I just follow the install instruction to install this package and make auth with laravel ...but after I login I still can see my order history .... but in the backend I can see the order, just like "Travin" what should I do to see order histry just use /account or something like it ? OR I should create a new page ? .... I dont understand I can see some directory under
/ext/ai-client-html/client/html/templates like 'basket' and 'account' ... why I can see /basket now but can't see /account

Re: Account page access

Posted: 20 May 2018, 10:20
by aimeos
The URL to the "My account" page is "/myaccount"