Delete category will delete my items?

i hope in future to fix this: delete category will delete my items



i have delete one category and lost all products under it deleted !!

Yes, this is one of the illogical quarks with CS-Cart. At the very least there should be an option to delete all items too.

You can rename the category or make it sub-category, no need to delete it.



I guess what you really want is to move the products to different categories, and for that move or rename the category is not enough.

So in this case there is no way around but move the products first.



Could you explain what do you want to do, why did you delete the category?



I’d like to see if there is another approach or logic. And I agree, If you delete the category, the products should be kept in the root.

(For now products exist only inside categories and there is no “root” category to fall back :blink: )

What I recommend to clients who are starting out is to create a “hidden” category called 'All Products' and then to ensure that all products are part of that category. Then the category reference count is always one so the products are not deleted until they are deleted from that category.

[quote name='clips' timestamp='1310602552' post='117240']

Yes, this is one of the illogical quarks with CS-Cart. At the very least there should be an option to delete all items too.

[/quote]

I agree. In the future there should be an option.



If i click “delete category” or “delete all selected categories” there should popup a window with 2 buttons.

“delete only category(s)” and “delete category(s) and all of its products”



That woud be great.

Then what do you do with the orphaned products that are no longer associated with any category? One could argue that the product detail page in customer view should still work if the products are not disabled. But the relationship between products and categories is pretty strong.



It only deletes the product(s) on the last category reference. If you delete 3 categories and the products are all in other categories too, then the products are not deleted.



I don't think it's a quirk, it's a way to design things so you don't leave trash lying around like orphaned products…

[quote name='tbirnseth' timestamp='1313118782' post='119390']

Then what do you do with the orphaned products that are no longer associated with any category?[/quote]



Agree. Quit complaining and use common sense!

[quote name='The Tool' timestamp='1313137223' post='119398']

Agree. Quit complaining and use common sense!

[/quote]

Other shopping carts simply ask which category you want to attach them too. So I'm not so sure this “delete the category/and delete the products” function is really “common sense”. There are easily other ways to handle deleting a category that are better than just zapping everything there with no options. Shopping carts that are a few years old functioned better than this, not to mention other recent shopping carts function wiser.



So while I have gotten used to this quirky function, I would agree that that a more “common sense” method would be to have an option as to whether you want to delete just the category or the category and the products. Then if you choose to not delete the products it simply ask which category you want to assign them too.



Also, why is it “complaining” when someone offers a very logical suggestion or makes a comment about how something works? Isn't this how things are made better?



For the newbie this function of deleting everything in a category is a total pain in the neck! The function lacks instructions during the process and it lacks options.



@tbirnseth

It is a good idea to suggest moving the items in to a hidden category. Since I have gotten used to this “delete” function I don't zap products anymore. It is all the new people who come along who get hurt by this strange function. The interesting part is you too admit that you have had to come up with a workaround so people don't accidentally delete all their products. The better solution would be to allow folks to simply assign them to a new category or at the very least it should state that you are about to delete the category “AND ALL PRODUCTS” in that category.

@clips



But you aren't really going to delete all products if those products are also associated with other categories.



Just adds a lot of bloat and over-management to have it try to protect people from deleting products when a category is deleted.



It's pretty straight-forward to think of a category as a container or bucket. If you throw the bucket away, what's in the bucket goes with it. Seems intuitive to me.



If it was a one-to-one situation (products-to-category) then it's simple. But in a many-to-many situation (categories to products), it is much more flexible but more difficult to manage (to protect people from themselves). Your warning should say something more akin to “deleting this category COULD also delete products from the system if the products are in this category only.”…

[quote name='tbirnseth' timestamp='1313204487' post='119449']

@clips



But you aren't really going to delete all products if those products are also associated with other categories.



Just adds a lot of bloat and over-management to have it try to protect people from deleting products when a category is deleted.



It's pretty straight-forward to think of a category as a container or bucket. If you throw the bucket away, what's in the bucket goes with it. Seems intuitive to me.



If it was a one-to-one situation (products-to-category) then it's simple. But in a many-to-many situation (categories to products), it is much more flexible but more difficult to manage (to protect people from themselves). Your warning should say something more akin to “deleting this category COULD also delete products from the system if the products are in this category only.”…

[/quote]



I can understand the OP's frustration and why this is common sense to some and not to others… It is the same concept as folders vs tags or gmail's labels. If we delete a label in gmail, does that delete the emails tagged with it? Of course not, imagine if it did! But some people DO expect this behaviour when they first start using gmail because they are typically coming from a folder/email or bucket paradigm as you put it. Within an ecommerce CMS, products should exist with or without categories and category actions should not affect the products they are associated with unless explicitly defined. (ie OOP.)

I accidentialy deleted a category and the items in it and learnt real quick. A popup reminder would help.

I accidentally deleted whole database…Learn how important regular backups are.

Even after I replied to this thread, I was setting up a new site and forgot about this lame “delete” function. I was resetting and renaming the categories and ended up deleting everything on the site, even though I thought I had it in different categories. Part of it was learning how version 2.2.? has the categories. I still say that a simple pop up stating “do you want to delete 84 items” or “do you realize you are going to delete 84 items” or anything to let me know that I still had some items that were set up using that particular category as a primary. It wasn't a total nightmare as the site was new, but it did cost me a couple of hours of work that a simple warning could have helped with.

Please, can anyone tell me how I can delete all products at once. Let’s say I have 30000 items and want to leave the store empty because I want to load new content from a new csv, how on earth can I do that easily? :unsure:

[quote name=‘mirnitagl’ timestamp=‘1318280381’ post=‘123344’]

Please, can anyone tell me how I can delete all products at once. Let’s say I have 30000 items and want to leave the store empty because I want to load new content from a new csv, how on earth can I do that easily? :unsure:

[/quote]



Well, if by deleting categories you also delete products, then you should go for it.

coincidence



john

yes, that would be swell if it worked for me, but for some inexplicable reason, deleting categories in my store does not delete items. I have deleted all categories and yet the items are still there. Don't ask me how, it just happens. maybe it is becasue my store updates with a made-to-measure script, I don't know.

That's why I ask how to delete products at once, not categories.

Anyway, for the moment I'm doing it manually. I set the products page in admin to show 1000 items, I “select all” and then click delete. Not perfect but it's the best solution I've thought of by now.

If anyone knows how to do it better, please, I'm all ears

New feature in Interspire Shopping Cart 6:


  • Re-assign products to another category when deleting categories (New)