Jump to content

Default attribute for all products


Recommended Posts

Hi all,

I hope I have posted this in the right section, I am setting up a shop which I have around 1000 products in at the moment. It is selling T-Shirts, I have managed to add attributes manually for colour, as mens, womens and childrens have different colour options.

I want to add attribute for them to choose Small, Medium, Large. This will be the same for every product, is there away of setting up a size attribute and applying it to all products? So that I don't have to do it manually for each product?

I am willing to use the MySQL back end, or PHP if needed. I am semi-competent in both.

Any help would be appreciated.

Many thanks,
Dave.

Link to comment
Share on other sites

If you want to do it manually on the DB, the relevant tables are

1) Create attributes
prefix_attribute
prefix_attribute_group
prefix_attribute_group_lang
prefix_attribute_lang

2) Add them to products
prefix_product
prefix_product_attribute
prefix_product_attribute_combination
prefix_attribute_impact

Exact query will depend on the languages you use, existing products and attribute records in DB, whether the different sizes have a price impact. Tables are pretty self explanatory.

First part is easy enough. For the second part you need to be careful about the quantities. The query that will add the attribute to the product must first find the existing quantity and then adjust accordingly to split that quantity between attribute values.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...