Retrieve stock level on product detail page

Help for integrating the Laravel package
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!
Luis
Posts: 7
Joined: 05 Jul 2017, 03:07

Retrieve stock level on product detail page

Post 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.

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

Re: Retrieve stock level on product detail page

Post by aimeos » 08 Aug 2017, 08:26

You mean in the PHP templates and without waiting for the XHR stock level request to finish?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Luis
Posts: 7
Joined: 05 Jul 2017, 03:07

Re: Retrieve stock level on product detail page

Post by Luis » 08 Aug 2017, 21:58

I would love to be able to do it both ways. On the PHP templates directly and through the Ajax request.

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

Re: Retrieve stock level on product detail page

Post 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-htm ... efault.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 ... /Iface.php) and adds that data to the view:
https://aimeos.org/docs/Developers/Html ... components
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply