Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#1736 by boettner
29 Jul 2015, 17:01
Hi again,

I need to display the addbasket button in product suggestion lists and it should reflect the current stock level. The button itself is no problem but I can´t tie the deferred JSON request to the list. The suggestion list and the product detail are displayed on the same page, so both sections need their stock levels on all addtobasket buttons.

Can you help me with that please?

Cheers
Robert.
#1741 by aimeos
30 Jul 2015, 10:23
boettner wrote:I need to display the addbasket button in product suggestion lists and it should reflect the current stock level. The button itself is no problem but I can´t tie the deferred JSON request to the list. The suggestion list and the product detail are displayed on the same page, so both sections need their stock levels on all addtobasket buttons.


Displaying the stock levels in these lists should be rather easy. You need to do two things:
- Add the ".product" and ".stock" CSS classes to the product items in the lists of the template (check if there are any CSS side effects)
- Add a script link in the header template which contains the stock URL including the product IDs (this should be configurable so big sites can reduce the number of requests)

For consistency, this should be done with the other products lists too (bought together products, maybe related products in the basket).