Because we've adopted a taxonomy term reference field model for all of our attribute fields, I believe we should add some safeguards to ensure administrators don't accidentally screw up their data. There's no harm in deleting a taxonomy term from a collection of tags, for example, because you simply lose the tag on whatever nodes it's attached to - ostensibly on purpose.
However, if you delete the "Small" taxonomy term from your "Size" vocabulary, you can never get it back. Any "Small" product that was already purchased will now suddenly be sizeless, which would affect existing product displays, order histories, and reports. Even if you re-add the "Small" term back to the vocabulary, it's going to have a different term ID, so there's no way to restore after an accidental delete at all.
My preference here will be the same limitation we apply to deleting products; if we detect on any line item a product that contains a term, that term should not be deletable. If products using that term as an attribute option haven't been purchased but do exist in product reference fields, we should at least warn administrators on the confirmation form that they may be screwing up some product displays, because suddenly those displays will now reference products that are missing attribute data. This won't cause errors, but it could cause the form to revert to the product title based select list.
The same rules should apply to taxonomy vocabularies. I should not be able to delete a taxonomy vocabulary that contains a term that has been referenced by a product referenced by a line item on any order, and if I'm going to delete a vocabulary whose terms are used on displayed products that have not been purchased, I should at least get a warning.
Comments
Comment #1
rszrama commentedCommerce Kickstart 2.x is in minimal maintenance mode. Closing out all outdated tickets now to maintain focus on Commerce Kickstart 3.x.