[Solved] Display nested categories

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!
User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Display nested categories

Post by aimeos » 26 Aug 2020, 08:28

Think, your domain settings are wrong for what you need. Can you make sure you use this ones and they are available for the page you are working on:

Code: Select all

plugin.tx_aimeos.settings {
    client.html {
        catalog {
            lists {
                basket-add = 1
                domains {
                    text = text
                    price = price
                    media = media
                    attribute = attribute
                    product {
                        0 = default
                    }
                    supplier {
                        0 = text
                        1 = media
                    }
                }
            }
        }
    }
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rowild

Re: Display nested categories

Post by rowild » 26 Aug 2020, 08:56

This is totally new to me!!! Thank you very much, the texts and images are displayed now! Finally!

But - is this anywhere mentioned in the docu that domains have to be written like that? I am not aware of such a configuration at all, and even though I asked several times on Slack, I never got an answer like this. IMO this really should be made clearer.

I'd be happy to add this information to the docu, if you also agree it should be mentioned and if you could let me know the proper page in the docu to add to.

Thank you!

rowild

Re: Display nested categories

Post by rowild » 04 Nov 2020, 13:41

Can I please ask again, how TypoScript configuration has to be done for product properties?

I added some properties under "Characteristics -> Properties" and expected to retrieve them via "$productItem->getPropertyItems()" in the "common/partials/product-standard.php" template. So far this does not work and it seems this is the case, because the "property" domain is not configured correctly.

According to feedback on slack I tried to add it to "client.html.catalog.lists." as well as "catalog.client.catalog.product." like this:

Code: Select all

lists {
  domains {
    attribute = attribute
    media = media
    price = price
    text = text
    product/property = product/property
    supplier {
      0 = text
      1 = media
    }
    catalog {
      0 = text
      1 = media
    }
}
product {
  domains {
    media = media
    price = price
    text = text
    attribute = attribute
    product/property = product/property
    [...]
but from what I know, slashes are not allowed in Typoscript, therefore I tried to rewrite the respective passage with

Code: Select all

  product {
    property = product.property
  }
but that also does not return any results. I use simple "var_export()"s to test whether there is content or not:

Code: Select all

<?php
	echo '<pre>Test only productItem->getPropertyItems():<br>';
	var_export($productItem->getPropertyItems());
	echo "<hr/>";
	echo '<br>Test complete productItem:<br>';
	var_export($productItem);
	echo '</pre>';
?>
What do I have to do to get the properties of a product?
Thank you!

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

Re: Display nested categories

Post by aimeos » 07 Nov 2020, 08:14

Using "product/property" or "product.property" as key won't work because both seems to be invalid in TypoScript. This configuration works fine:

Code: Select all

plugin.tx_aimeos.settings.client.html.catalog.lists.domains {
    attribute = attribute
    media = media
    price = price
    text = text
    property = product/property
    supplier {
      0 = text
      1 = media
    }
    catalog {
      0 = text
      1 = media
    }
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rowild

Re: Display nested categories

Post by rowild » 09 Nov 2020, 07:19

I was on 20.7.4, where I couldn't get it to work. After update to 20.10 this works fine Thank you!

Post Reply