Enable stock in list view

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
goerch
Posts: 26
Joined: 19 Feb 2016, 20:02

Enable stock in list view

Post by goerch » 08 Mar 2016, 14:37

Hello, i need a hint: Setting "plugin.tx_aimeos.settings.client.html.catalog.lists.stock.enable = 1" in T3 setup does not, what i think it should do: Displaying the number of available items of the product in the list view. Is there something else to configure, or is it a misunderstandig of this setting? What i need is the number of available products in list and detail view. Resource code shows me an empty div container with class "stock" and a data-attribute "prodid". But nothing else.
Thank you for support or for a hint.

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

Re: Enable stock in list view

Post by aimeos » 08 Mar 2016, 15:35

The mentioned configuration option queries the stock levels of the products in the list view via AJAX and is already enabled by default. The result are the green/yellow/red squares left of the price.

To show the total numbers, you have to copy and adapt the code in "client/html/templates/catalog/stock/body-default.php":
https://github.com/aimeos/aimeos-core/b ... efault.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

goerch
Posts: 26
Joined: 19 Feb 2016, 20:02

Re: Enable stock in list view

Post by goerch » 08 Mar 2016, 16:26

Thank you, but i cannot see the "available" feature in FE (green/yellow/red). A page "Stock" with the plugin is in the shop tree. I know it from the demo-site.

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

Re: Enable stock in list view

Post by aimeos » 08 Mar 2016, 17:06

Check if the stock URL is called in your browser's web console and if it returns the right content. There seems to be an issue with bootstrap_package v7 too:
typo3-extension-f16/php7-and-overlay-wi ... -t623.html
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

goerch
Posts: 26
Joined: 19 Feb 2016, 20:02

Re: Enable stock in list view

Post by goerch » 08 Mar 2016, 17:42

It's at last a typoscript issue. Calling the pages count und stock as json-result, it is necessary to disable also the lib.stdheader: "lib.stdheader >". Maybe in setup.txt of extension or in the setup of the page. This solved the problem for me. Thank you.

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

Re: Enable stock in list view

Post by aimeos » 10 Mar 2016, 17:34

goerch wrote:It's at last a typoscript issue. Calling the pages count und stock as json-result, it is necessary to disable also the lib.stdheader: "lib.stdheader >". Maybe in setup.txt of extension or in the setup of the page.
That didn't solved the problem in our test installations. There's still a <div> around the output.
It seems like the the "Frame: No frame" option in the content elements is gone ...
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply