Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Attributes


Guest

Recommended Posts

Posted

Hi,

 

I have just been looking at the product attributes. I have literally thousands of them!

In product options I need mainly size and colour maybe something else can be added later. In option values I need mainly sizes like small, medium etc and colours.

When I click on a particular attribute it tells me if it has a product attached and in the majority of cases this answer is no and it can be safely deleted. I would like to delete all of the unused attributes if only to get my drop down lists into better control. Clearly if I do them all one by one it will be a long and very boring task.

 

My question is this: can I go into the database and do it there. How would I do this? I am learning about the database slowly.I am sure there is a way to bulk delete all of this rubbish and it will also help reduce database size and maybe speed it up?

 

Thanks for any help with this.

 

Mogsta

Posted
Hi,

 

I have just been looking at the product attributes. I have literally thousands of them!

In product options I need mainly size and colour maybe something else can be added later. In option values I need mainly sizes like small, medium etc and colours.

When I click on a particular attribute it tells me if it has a product attached and in the majority of cases this answer is no and it can be safely deleted. I would like to delete all of the unused attributes if only to get my drop down lists into better control. Clearly if I do them all one by one it will be a long and very boring task.

 

My question is this: can I go into the database and do it there. How would I do this? I am learning about the database slowly.I am sure there is a way to bulk delete all of this rubbish and it will also help reduce database size and maybe speed it up?

 

Thanks for any help with this.

 

Mogsta

 

You would have to replicate the query in admin that currently tells you whether or not products are associated with the attribute

 

Start by looking in admin/product_attributes.php

 

Charles

A kite flies highest AGAINST the wind !

 

"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"

Posted

You can use a utility such as phpmyadmin to have a look ath the database, there are a couple of tables involved, product_attributes, and the three product_options tables. Once you see how the tables are laid out, and how they relate to one another using id numbers, you can remove some of the columns, either using the edit feature, or by running sql commands. Once you identify the attributes you want to delete you could use an UPDATE command, with a WHERE reference, to remove every instance of it in a table.

 

Jeremy

Posted
You can use a utility such as phpmyadmin to have a look ath the database, there are a couple of tables involved, product_attributes, and the three product_options tables. 

 

Jeremy

 

 

Many thanks to you both, I think I just about have it sorted out now.

 

Mogsta

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...