Stock level is not visible on custom page
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!
Stock level is not visible on custom page
Hello, dear Aimeos team!
I made a custom controller for separate category page. Here is the code:
"Category" view looks like:
List of products looks as i need, but the stock level (green/red square) on each product is not visible. In /shop page and product page everything is fine.
Please, tell me, how can i fix it?
Kind regards.
I made a custom controller for separate category page. Here is the code:
Code: Select all
class CategoryController extends Controller
{
public function treeAction()
{
foreach( app( 'config' )->get( 'shop.page.catalog-tree' ) as $name )
{
$params['aiheader'][$name] = Shop::get( $name )->getHeader();
$params['aibody'][$name] = Shop::get( $name )->getBody();
}
return Response::view( 'category',
[
'params' => $params
])
->header( 'Cache-Control', 'private, max-age=10' );
}
}
Code: Select all
@extends('layouts.layoutinner')
@section('content')
<div class="container">
<div class="row">
{!! $params['aibody']['catalog/stage'] !!}
{!! $params['aibody']['catalog/lists'] !!}
</div>
</div>
@endsection
Please, tell me, how can i fix it?
Kind regards.
Re: Stock level is not visible on custom page
Sorry, forgot to provide my system info:
Aimeos 2019.10, Laravel 6.2, Fedora 30, PHP 7.3
Aimeos 2019.10, Laravel 6.2, Fedora 30, PHP 7.3
Re: Stock level is not visible on custom page
Stock level information is dynamically loaded using an asynchronous request (via JS). Please check if the /stock URL is part of the HTML header (in a <script>/script> tag) and no error is shown in the browser console.
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: Stock level is not visible on custom page
Yes! This is it! I didn`t have {!! $params['aiheader']['catalog/lists'] !!} in my layout header. Thank you!