To create dependencies between collections, simply follow the following mentioned steps.
Step #1
Go to Dashboardβ€Collections
Step #2
Select the Add Collection button to add the collections you want to create dependencies for.
Set the relation toggle button to Dependency.
According to this collection dependency rule, if your customers want to buy vegetables from the Vegetables collection, then they will have to buy products from the Milk collection, too.