I'm having some trouble getting products to show under the taxon they are assigned to.
I've assigned multiple products to a top-level taxon. I've double-checked to make sure that this setting saved, and they're definitely associated.
If I click on the "Browse Products" button on the taxon grid, I see a message saying that no products were found.
If I visit that taxon's front-end page: /t/taxon-name I also see the same error: There are no products to display.
In the code, I've checked the taxon object's getProducts() function, and it seems to return an empty collection:
ProductController.php on line 75:
Taxon {#4409 ▼
#file: null
#path: null
#products: PersistentCollection {#4370 ▼
-snapshot: []
-owner: Taxon {#4409}
-association: array:15 [ …15]
-em: EntityManager {#2849 …10}
-backRefFieldName: "taxons"
-typeClass: ClassMetadata {#4479 …}
-isDirty: false
-initialized: false
-coll: ArrayCollection {#4371 ▼
-elements: [] <----------------------------- this here
}
}
#id: 13
#code: "test"
#root: Taxon {#4369 ▶}
#parent: Taxon {#4369 ▶ …2}
#children: PersistentCollection {#4372 ▶}
#left: 2
#right: 3
#level: 1
#translations: PersistentCollection {#4375 ▶}
#currentLocale: "en_US"
#currentTranslation: TaxonTranslation {#4377 ▶}
#fallbackLocale: "en_US"
#createdAt: null
#updatedAt: null
}
in the DB in sylius_product I see that multiple products show my taxon id under 'main_taxon_id'. I don't, however, see the products listed in sylius_product_taxon. Is this a problem? Perhaps it is because I'm using main taxons (top-level), rather than lower level taxons? If so, I need to be able to use only one level of taxon, so I'm looking for a solution.