Hi there!
I have a use case where a business can add a product category and then assign products to it. For example, the business can create a category called “Shoes” and then add a product called “Nike Airs” to that category. This is currently working, but if the business wants to change the name of the category, for example from “Shoes” to “Footwear,” I am having trouble updating the products that were assigned to the “Shoes” category to match the new name “Footwear.”
Currently, when I try to edit the name of a category that has products assigned to it, it creates a new category with the new name instead of updating the existing one. This happens even when I use the Edit action. Additionally, if I try to edit the original category again after it has created a second one, it weirdly works and doesn’t create another category.
Image 1 - The page users can add categories and products:
Image 2 - Creating the product category ‘Shoes’:
Image 3 - Creating the product ‘Nike Air’ and assigning to the ‘Shoes’ category:’
Image 4 - Success, the category and product all display correctly:
Image 5 - Issue! When the user renames the ‘Shoes’ category (using Edit action) to ‘Footwear’, it creates a new category instead of updating the exisiting one’s name. The Nike Air’s product category also doesn’t update to the new name:
Image 6 - What the table looks like after following the steps above:
Appreciative of any help!