Answer the question
In order to leave comments, you need to log in
How to delete a category in an online store?
I'm building my first ecommerce project. There are no problems with the code, but with the logic .. I
stopped now at deleting the category. Head-on solution - along with the category being deleted, all its subcategories and products in them are deleted. But here's the challenge that follows from this to go through all the pending orders and notify customers (storable carts). From a development point of view (especially given the large flow of orders), this is a rather expensive procedure.
I would be very grateful to those who have already faced such a task and will share their experience.
PS stack = node.js + mongoDB + redis
Answer the question
In order to leave comments, you need to log in
1. Deleting products in categories when you delete only a category is not good. I just usually throw out products from this category and in most cases I send them to the archive. It is rather difficult to notify the user that something like this has happened, and he himself will find it out when he refreshes the page, because these products will simply disappear from the basket. And you can write that they say "sorry, this product is no longer available." Or through websockets, since you have everything on node.js.
In general, online stores do not often delete categories or reorganize their structure. So if you have some kind of non-standard situation, then I think it's worth discussing this with the store owners and content managers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question