Typo3 - Categorie and Subcategorie

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!
tenkraD
Advanced
Posts: 110
Joined: 25 Jul 2017, 08:38

Typo3 - Categorie and Subcategorie

Post by tenkraD » 18 Jan 2018, 16:12

Salute everyone,

i'd like to have my products in sub categories of a categorie.
So i created under catalog the categorie and in it the subcategories.
Then i attached the products to the sub categorie.
> Categorie "kitchen" -> subcategorie "tables", and to tables i attached the products.

Is it possible, out of the box, to see all my products of the sub categories in "the catalog stage area" while im on the categorie?
I know i can attach the products twice in the backend to categorie and sub categorie and then its working but does it give an more elegant way to handle that?

I use typo3 7.6.x and aimeos 17.10.x
Many thanks

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

Re: Typo3 - Categorie and Subcategorie

Post by aimeos » 18 Jan 2018, 18:11

In the way you currently do it, you have the advantage that you have control over the product order in the listing.

The alternative is setting this option: https://aimeos.org/docs/Configuration/C ... sts/levels
It will aggregate all products from the sub-categories (up to the level you configure) into a combined product listing.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Typo3 - Categorie and Subcategorie

Post by superscotty19 » 08 Jun 2019, 01:12

I'm having this exact same issue. I've edited the T3 template > Setup field to include:

Code: Select all

# Include products of sub-categories in the product list of the current category
plugin.tx_aimeos.settings.client.html.catalog.lists.levels = 1
... but nothing happens.

TYPO3 8.7
Aimeos 18.10.8
Aimeos_dist 18.4.0

Do I have the correct code/location?
-S.

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

Re: Typo3 - Categorie and Subcategorie

Post by aimeos » 09 Jun 2019, 09:40

"1" is only from the given category, "2" adds products from direct child categories too and "3" adds products from all sub-categories. Please keep in mind that if you have the same products in different sub-categories at different positions, they will be shown several times. This is a behavior introduced by MySQL >= 5.7
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Typo3 - Categorie and Subcategorie

Post by superscotty19 » 10 Jun 2019, 23:47

Hi,

First of all, thank you for the detailed reply & explanation!

I can confirm it works (!) but I have a new issue: sub-sub-categories.

Preamble: Assume the following category structure:
  • Bikes
    • Road
      Mountain
      • Front Suspension
        Full Suspension
... and assume I only have 2 bikes in the "Front Suspension" sub-sub-category.

Using "1", I only see the bikes when I click "Front Suspension", as expected.
Using "2", I see the bikes when I click "Front", as well as "Mountain", as expected.
Using "3", I see the bikes when I click "Front", as well as "Mountain", as expected ... but I don't see them when I click "Bikes".

Just for fun, I tried entering a value of "4" and got:

ERROR: No catalog node for ID "16"

... So clearly there's a meaning behind the numbers.

Is it possible to have listing go an extra sub-category in depth, as above?

Thanks again,
-Scott.

superscotty19
Posts: 95
Joined: 13 May 2019, 08:09

Re: Typo3 - Categorie and Subcategorie

Post by superscotty19 » 11 Jun 2019, 04:43

Update!

After I posted, I set the value back to "3". Well, it's been a few hours since I did that. I returned to my workstation and reloaded the page for fun ... and guess what?! It's working!!!

Now, in the other "images..." thread I have, I spoke of a potential cache issue ... could that be the case here? I also changed the directory permissions for /uploads/tx_aimeos from 775 to 755 ... but that shouldn't affect viewing?

This is weird, so I created a 2 new products - 1 without an image, 1 with - and both instantly worked (minus the image, but that's another thread). I guess it's not cache!

Thanks!
-S.

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

Re: Typo3 - Categorie and Subcategorie

Post by aimeos » 11 Jun 2019, 07:32

The frontend output is cached until you clear the TYPO3 frontend cache or something else happens that clears caches (partitially) like saving a product in the admin interface. You can disable caching for development completely in the Aimeos configuration in the Extension Manager
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply