Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#4452 by Luis
08 Aug 2017, 00:17
I need to be able to retrieve and print the actual stock level directly on the catalog/details section for each individual product. Thanks for any help in advance.
#4462 by aimeos
09 Aug 2017, 11:23
There data is already available via XHR and you can exchange its template if you want to display that in a different manor:
https://github.com/aimeos/ai-client-html/blob/master/client/html/templates/catalog/stock/body-default.php

To have the stock level available in the catalog list and detail view too, you need to implement a decorator that retrieves the stock levels via the controller (https://github.com/aimeos/ai-controller-frontend/blob/master/controller/frontend/src/Controller/Frontend/Stock/Iface.php) and adds that data to the view:
https://aimeos.org/docs/Developers/Html_frontend/Extend_existing_components