Skip to content

Status, 15 November 2026: proposed by Artem Belikov, who owns the module (Jira STOR-147). Not accepted by the founder, Dmitriy Zhuk, or by Yevhen Kariakin. Proposed is not implemented: no module, no MCP tool and no part of the API deletes anything, and nothing here has run against a store. It changes one line of the accepted decision 008, which says that delete is "not proposed for any resource; disabling is the reversible step". The contract (contracts/module/operations.json) is not changed by this page; the operations are added there once the proposal is accepted.

010 — Deleting products, categories and manufacturers ​

Let the Admin Agent delete a product, a category or a manufacturer by id, several ids in one request as in <resource>.get: a manufacturer only when no product uses it, a category only when it holds no product and has no subcategory, a product by its id. It keeps the shape of decision 004 and 008: the module does what it is told; the approval, the ledger and the receipt stay in the Store Deputy API.

Context ​

Since decision 008 the agent can create products, categories and manufacturers (implemented in the OpenCart 3 and 4 modules on 14 November 2026, STOR-121 and STOR-124, checked only on the local test shops) but cannot remove one. A record made by mistake, a duplicate, a demo product or a brand the shop no longer sells can only be disabled; it stays in the admin's lists, in the filters of the admin and, for a manufacturer, on the storefront's brand page (OpenCart lists every manufacturer of the storefront).

What the platform's own delete does, read from the admin code of OpenCart 3.0.5.1 and 4.1.0.4:

  • A category is deleted with every subcategory below it, recursively, without asking; products in them lose the link to those categories, and coupons limited to them lose it too.
  • A product is deleted with what belongs to it: texts, storefronts, categories, specials and discounts, options, attributes, images (the rows, not the files), related products, reviews, rewards, downloads, layouts, filters, links to coupons, SEO keywords (OpenCart 4 also codes, reports and subscriptions).
  • A manufacturer with products cannot be deleted in the admin: it refuses with the number of products. This is the only check the admin makes.
  • Orders keep their lines: order_product stores the product's name and model, so an order still reads after its product is gone.

None of it can be undone from the shop.

Decision ​

  1. Three operations of the module: product.delete, category.delete, manufacturer.delete, each opened by its own capability of the same name in store.describe.
  2. By id, several in one request, as <resource>.get: { "ids": ["42", "43"] }. At most maxItemsPerWrite ids (50 today), because a delete is a write; an id given twice is deleted once. Items are independent and the request is not atomic.
  3. A manufacturer is deleted only when no product uses it, whatever the product's status; otherwise rejected / has_products. This is the admin's own rule.
  4. A category is deleted only when it holds no product and has no subcategory, whatever their status; otherwise rejected / has_products or has_children. The module never deletes subcategories with it, unlike the admin: the owner approves one category and exactly one goes. Emptying a category first is ordinary product.apply (categoryIds) and category.apply (parentId), each with its own approval.
  5. A product is deleted by its id, with no further condition. Its orders keep their lines (see above).
  6. The answer has one item per distinct id, in request order: deleted with before, the record as <resource>.get read it right before the delete (with include texts and details where the resource has them), for the API's ledger; not_found; rejected with reason; or failed with reason (database_error, or read_back_mismatch when the record still reads after the delete).
  7. What goes is what the admin's delete removes in that OpenCart release (the lists above). The module's idempotency key of a record it created stays: a create sent again with that key must not make the record a second time. Image files on disk are never deleted, as in decision 009: other products, themes or banners may use them.
  8. Sending again is safe: an id already deleted answers not_found. A delete is not reversible: the module restores nothing; before is what remains of the record.
  9. Not allowed while paused. As for apply and create, the storefront-side endpoint cannot reach the admin's delete listeners: store.describe warns product_delete_listener, category_delete_listener or manufacturer_delete_listener where an extension listens to them.

Example ​

json
{ "op": "category.delete", "params": { "ids": ["61", "18", "999"] } }
json
{ "items": [
  { "id": "61", "outcome": "deleted", "before": { "id": "61", "name": "Kettles", "parentId": "18", "status": "disabled" } },
  { "id": "18", "outcome": "rejected", "reason": "has_children" },
  { "id": "999", "outcome": "not_found" }
] }

before is cut down here; a real answer is the whole record.

Alternatives considered ​

  • Keep decision 008: disable only. Reversible, but the shop fills with records nobody can remove without the admin panel, and a disabled manufacturer still shows on the brand page.
  • Delete as the admin does, subcategories included. One approval would remove a tree the owner never saw in the card.
  • Delete a category with products in it, unlinking them. The products would silently lose a category; the owner should move them first and see it.

Open questions ​

QuestionWho
Delete only a disabled record? Disabling would then be a separate approved step, and buyers no longer see the record when it goes. Not part of this proposal.the founder, Yevhen Kariakin
Should a delete carry expected, so that a record changed after the approval is not deleted? Proposed: by id, as get; the API can read the record again before it sends the delete.Yevhen Kariakin
OpenCart 4: a product that is the master of variants (other products' master_id). Refuse as has_variants, or delete and leave the variants without their master?Artem Belikov, Yevhen Kariakin
How the approval card shows a delete, and how long the API keeps before.Yevhen Kariakin

Scope ​

OpenCart 3 and 4 modules (Artem Belikov, a separate task once accepted); the operations, capabilities and reasons in contracts/module/operations.json; MCP tools and the approval card in the API (Yevhen Kariakin). Customers, orders, coupons and the other resources are not part of it.