How to access the site label in the product template

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
rasch
Posts: 22
Joined: 02 Sep 2019, 11:51

How to access the site label in the product template

Post by rasch » 03 Feb 2020, 14:31

Hi,

In the product template client/html/templates/common/partials/products-standard.php I can access the site id via $productItem -> getSiteId (). How can I access the site label in this product template?

Thank your for your help.
--
aimeos: 2019.10.4
ai-site extension
symfony: 4.4
php: 7.2
ubuntu: 18

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

Re: How to access the site label in the product template

Post by aimeos » 04 Feb 2020, 10:54

You have to write a decorator that passes all site labels of the available sites to the template (https://aimeos.org/docs/Developers/Html ... components). To get the site items, you have to use the searchItems() method of the locale site manager.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rasch
Posts: 22
Joined: 02 Sep 2019, 11:51

Re: How to access the site label in the product template

Post by rasch » 27 Feb 2020, 08:45

Thank you for your help. It works.

Post Reply