Get stock in list and favorites
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!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Get stock in list and favorites
I am trying to get the product stock but it just won't work. I tried setting
but am still only getting media, price and text.
Also overwriting Aimeos\Client\Html\Account\Favorite\Standard.php with a custom class and declaring it in typoscript and adding 'stock' to the list of domains, has no effect at all. Same goes for the product list. What am I doing wrong?
Code: Select all
client {
html {
account {
favorite {
domains {
1 = text
2 = price
3 = media
4 = attribute
5 = product
6 = stock
}
}
}
}
}
Also overwriting Aimeos\Client\Html\Account\Favorite\Standard.php with a custom class and declaring it in typoscript and adding 'stock' to the list of domains, has no effect at all. Same goes for the product list. What am I doing wrong?
Re: Get stock in list and favorites
Which Aimeos version are you using?
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: Get stock in list and favorites
I'm using version 22.10
Re: Get stock in list and favorites
How do you retrieve the stock items? Can you show example code?
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: Get stock in list and favorites
I don't, because there isn't anything to retreive. I would expect stock to be available in getRefItems as it is the case with the other domains, but it's not in there.
Re: Get stock in list and favorites
No, stock items are not referenced via the mshop_product_list table. Use this instead:
Code: Select all
$stockItems = $product->getStockItems();
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