OrchardCMS / OrchardCore.Commerce

The commerce module for Orchard Core.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When Creating a new Product Content Item in BagPart, ProductPartIndex don't update. (OCC-220)

effapp opened this issue · comments

Describe the bug

When Creating a new Product Content Item in BagPart, ProductPartIndex don't update.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new ContentType and name "BagTestPage", add BagPart in it
  2. Set "Contained Content Types" of Bag in BagTestPage to "Product"
  3. Create a new Content Item of BagTestPage and name "ProductBags"
  4. Create a couple of Product content items in ProductBags, these Product content items was not updated to ProductPartIndex.

Jira issue

This is not a bug, but a limitation of the bag part. It's not related to OrchardCore.Commerce either, for example the child content doesn't appear in the stock OC indexes like ContentitemIndex either.

Even if these indexes were created, they wouldn't work as expected, because all the child items in the bag part are stored in the holding content item's document. I don't suggest placing Products inside bag parts at all. Consider using a List part instead.