Open milan-zami-tech opened 11 months ago
I'm dealing with the same issue.
@milan-zami-tech @lemon-sandwich, and following the instructions in the error message did not work? It is unclear from your message, if you tried that.
My understanding of that error message is if we have options(A, B) and next variants: Variant 1: A = 1, B = 1 Variant 2: A = 1, B = 2 When we try to delete option B, it prevents us from deleting it so we don't have two variants with the same option values as in this example.
This is not the case with my variants, which have different values for option A.
Was Facing the same issue here
I had a product with 3 options and 2 variants
BUG FOUND : it shows success notification but in response of the api we receive the below message. MEDUSA guys please have a look here
{ "type": "invalid_data", "message": "To delete an option, first delete all variants, such that when an option is deleted, no duplicate variants will exist." }
Current Solution : Delete the variants and you should now be able to delete the options (just as the response says)
For Medusa :
Bug report
When the product contains at least 2 options and 2 variants and we try to delete the option in the admin dashboard, it will show a successful message, but the option will not be deleted. Also if we try to delete the option with admin API, then we get the following:
System information
Medusa version (including plugins): "@medusajs/admin": "^7.0.1", "@medusajs/cache-inmemory": "^1.8.8", "@medusajs/cache-redis": "^1.8.8", "@medusajs/event-bus-local": "^1.9.6", "@medusajs/event-bus-redis": "^1.8.9", "@medusajs/file-local": "^1.0.2", "@medusajs/icons": "^1.0.0", "@medusajs/medusa": "^1.15.0", "@medusajs/ui": "^1.0.0", "@tanstack/react-query": "4.22.0", "babel-preset-medusa-package": "^1.1.13", "body-parser": "^1.19.0", "cors": "^2.8.5", "dotenv": "16.0.3", "express": "^4.17.2", "medusa-fulfillment-manual": "^1.1.38", "medusa-interfaces": "^1.3.7", "medusa-payment-manual": "^1.0.24", "medusa-payment-stripe": "^6.0.3", "prism-react-renderer": "^2.0.4", "typeorm": "^0.3.16"
Node.js version: 16.20.1 Database: PostgreSQL 14.9 Operating system: Pop!_OS 22.04 LTS
Steps to reproduce the behavior
Naming doesn't matter.
Expected behavior
Option B should be deleted