Products Not Displaying in Aimeos Frontend

How to configure and adapt Aimeos based shops as developer
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!
notdot
Posts: 2
Joined: 28 May 2024, 08:58

Products Not Displaying in Aimeos Frontend

Post by notdot » 28 May 2024, 09:04

Hello Aimeos Community,

I have been attempting to set up Aimeos with Laravel, but I've encountered an issue where products are not displaying in the frontend. Here are the steps I've followed and the issues I've faced:

Steps Followed:

Laravel Installation:

Installed Laravel 11.8.0.
Configured .env file with database settings.
Ran composer require aimeos/aimeos-laravel --with-all-dependencies to install Aimeos.
Database Setup:

Ran php artisan aimeos:setup and php artisan migrate.
Populated the database with demo data using php artisan aimeos:setup --option=setup/default/demo:1.
Verified that products are present in the mshop_product table.
Routes Configuration:

Added Aimeos routes in routes/web.php:

Code: Select all

Route::group(['prefix' => 'shop', 'middleware' => ['web']], function() {
Route::get('/', [\Aimeos\Shop\Controller\CatalogController::class, 'listAction'])->name('aimeos_shop_list');
Route::get('/{f_catid}', [\Aimeos\Shop\Controller\CatalogController::class, 'listAction'])->name('aimeos_shop_list_param');
Route::get('/detail/{f_name}/{f_catid}', [\Aimeos\Shop\Controller\CatalogController::class, 'detailAction'])->name('aimeos_shop_detail');
Route::get('/basket', [\Aimeos\Shop\Controller\BasketController::class, 'indexAction'])->name('aimeos_shop_basket');
Route::get('/checkout', [\Aimeos\Shop\Controller\CheckoutController::class, 'indexAction'])->name('aimeos_shop_checkout');
Route::get('/account', [\Aimeos\Shop\Controller\AccountController::class, 'indexAction'])->name('aimeos_shop_account');
Route::get('/account/profile', [\Aimeos\Shop\Controller\AccountController::class, 'profileAction'])->name('aimeos_shop_account_profile');
Route::get('/account/orders', [\Aimeos\Shop\Controller\AccountController::class, 'ordersAction'])->name('aimeos_shop_account_orders');
Route::get('/account/subscription', [\Aimeos\Shop\Controller\AccountController::class, 'subscriptionAction'])->name('aimeos_shop_account_subscription');
});
Route::group(['prefix' => 'admin', 'middleware' => ['web', 'auth']], function() {
Route::get('/', [\Aimeos\Shop\Controller\AdminController::class, 'indexAction'])->name('aimeos_shop_admin');
});

Auth::routes();
require DIR.'/auth.php';
Cache and Server Setup:

Cleared all caches: php artisan route:clear, php artisan config:clear, php artisan cache:clear, php artisan view:clear.
Restarted the Laravel server with php artisan serve.
Additional Checks:

Verified that products are marked as active and linked to categories in the database.
Checked Laravel logs for errors: found issues with undefined routes which were resolved by adding Auth::routes().
Issues:

Products Not Displaying:

Products exist in the database but do not appear in the frontend.
The admin interface works, and I can see the products listed there.
Error Logs:

Encountering errors related to routes not defined (e.g., Route [logout] not defined), which were fixed by installing laravel/ui and configuring authentication.
Possible Missing Configurations:

Followed documentation but still might be missing some specific configurations or steps.
Request for Help:
I would appreciate any guidance on what might be causing the products to not display in the frontend despite being present in the database. Are there any additional configurations or steps that I might have missed?

Thank you in advance for your assistance!

Best regards,
Marco

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

Re: Products Not Displaying in Aimeos Frontend

Post by aimeos » 29 May 2024, 06:58

Your custom routes are likely to be the problem and there's no need to define those routes. Just follow the installation instructions till the end and you should get a fully working installation:
https://github.com/aimeos/aimeos-laravel#installation
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

notdot
Posts: 2
Joined: 28 May 2024, 08:58

Re: Products Not Displaying in Aimeos Frontend

Post by notdot » 29 May 2024, 11:34

did another installation and i got it working now, thanks.

Post Reply