Product Properties on Home

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!
hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Product Properties on Home

Post by hommler » 18 Jul 2020, 21:32

Hi, I've added the weight in Product properties. How can I access this property on the homepage of my shop? I was looking in the products-standard template but didn't get it.

Any hint?

Thanks in advance :-)
Ralf

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Product Properties on Home

Post by hommler » 19 Jul 2020, 13:07

The idea is to calculate the price für 1000 ml if the product has a filling of 250 ml. Therefore I need to get the Product Properties (in backend aimeos module defined in "Physical"). Another option would be to store the size as attribute, but how to get the attributes in list view?

Thank you very much for any hints :-)

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

Re: Product Properties on Home

Post by aimeos » 20 Jul 2020, 10:53

You can get both in the list view if you configure the data domains that are fetched along with the product data in the catalog list component:
https://aimeos.org/docs/Configuration/C ... ts/domains

Either add "product/property" or "attribute" to the configured domains.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Product Properties on Home

Post by hommler » 20 Jul 2020, 20:16

Thank you very much. I've added "product/property" to the domain now. How can I access a property? I've tried the following:

$productItem->getPropertyItems('package-weight', true);

Thanks :-)

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

Re: Product Properties on Home

Post by aimeos » 21 Jul 2020, 08:44

Yes, that should return a list of "package-weight" property items (usually only one). You can also use

Code: Select all

$productItem->getProperties( 'package-weight' )
which returns the values only.

If not check that your configuration is correct and passed to Aimeos if you configured it via TypoScript.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

hommler
Posts: 10
Joined: 18 Jul 2020, 21:29

Re: Product Properties on Home

Post by hommler » 21 Jul 2020, 17:41

Thank you very much :-)

Post Reply