Zen Cart Logo
Forums / General Questions / When deleting a product, do the unique attributes also delete?

When deleting a product, do the unique attributes also delete?

Views: 663

Results 1 to 4 of 4
3 Jul 2013, 2:23 AM
#1
beyre avatar

beyre

Zen Follower

Join Date:
Feb 2009
Posts:
422
Plugin Contributions:
0

When deleting a product, do the unique attributes also delete?

For example, if I had just one t-shirt in my store and the attribute name "Size" and the attribute values "Small", "Medium", and "Large" were only used by that product .... and I delete that product ... would that attribute name and values also be deleted?

If not (which I believe is the answer), then is there a way to find out what attribute names and values are no longer being used by any product on the website?

As mentioned in my recent thread here about cleaning up unused product images, I am trying to significantly clean up a bloated mis-managed database.

Thanks for your help/advice.

3 Jul 2013, 2:39 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: When deleting a product, do the unique attributes also delete?

You have option names and option values which are set up independent of any products, and attributes which are the application of option name/value sets to individual products. I'm not certain if individual attributes are deleted when the products they are associated with are deleted, though it seems likely. The option names and values are not deleted.

This is not an elegant way to handle it, but if you try to delete an option value that is in use (applied as an attribute to a product), you will get a warning:
This option has products and values linked to it - it is not safe to delete it.

3 Jul 2013, 3:38 AM
#3
beyre avatar

beyre

Zen Follower

Join Date:
Feb 2009
Posts:
422
Plugin Contributions:
0

Re: When deleting a product, do the unique attributes also delete?

Glenn,

You confirmed what I thought, but I wanted to double check with those that understand the scripts better than.

Ahhh ... an error message when trying to delete attribute names/values. That would be handy and helpful.

I'll bookmark this thread to remind me for when I get to that part of my to-do list.

Thanks so much!

3 Jul 2013, 4:38 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: When deleting a product, do the unique attributes also delete?

The warning also shows you which product(s) the value is linked to.