Forums / Setting Up Categories, Products, Attributes / What exactly is the attribute ID?

What exactly is the attribute ID?

Views: 858

Results 1 to 2 of 2
2 Aug 2012, 4:22 AM
#1
midi73 avatar

midi73

New Zenner

Join Date:
May 2012
Posts:
8
Plugin Contributions:
0

What exactly is the attribute ID?

Hi. I have 1.50 zen cart. Also have store manager. Trying to get a csv file ready with attributes. Can't for the life of me figure out exactly what the attribute id is. Example: in my exported attributes file there is the

products_attributes_id=1292

and I figure I need that to be in there as a value when adding new products via store manager import. Not sure what to put for the new products or do I need it ?

What are the REQUIRED values for a successful attributes import anyway?

I know, probably sounds dumb and I know I'm missing something. Thanks in advance for any help. Sylvia
:wacko:

2 Aug 2012, 10:50 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: What exactly is the attribute ID?

Zencart works on what is known as a RELATIONAL DATABASE. Basically this means that information stored in one table, may need to be RELATED to information stored in another table. Sometimes, these RELATIONSHIPS extend across SEVERAL TABLES.

A relational database is a very EFFICIENT way of "linking" up data, because it means that you don't need several COPIES of the same data... just a way of IDENTIFYING a piece of data, which can then be used to "join up" all the places where these relationships are needed.

For example, when you add a PRODUCT to the system, that PRODUCT is given its own "ID". The product data is stored in the PRODUCTS TABLE.

When someone ADDS a product to their shipping cart, for the system to "reveal" the title, description and picture of the product in the shopping cart page, it just needs to reference that product's ID, and it will bring in all the information to show it on the shopping cart screen. It is THE SAME information that shows on Product Listing pages, Product Info pages, and even in the email confirmation messages... etc.

The ATTRIBUTE system works on the same principle, using unique ID numbers to render the information that is specific to the attribute. In this case, SEVERAL ID's are involved:

The first ID applies to the OPTION NAME

Another ID applies to the OPTION VALUE

And yet others apply to things like the attribute's PRICE and WEIGHT (if they have been applied)

When these ID's are all "jointly referenced", they gather up the data that is specific to the information they refer to, and the system "joins" it all up for further use - either to show something on a page, or to write more information to the database.

ID numbers are AUTO-INCREMENTALISED, meaning that the system will assign a ID number incrementally:

The first element is given the ID of "1"
The second element is given the ID of "2"
The third element is given the ID of "3"
The fourth element is given the ID of "4"
... and so on.

ID numbers cannot go "backwards"... once used, it is "allocated", so even if you DELETE an attribute, it's ID number "dies" with it. ID numbers will only ever INCREASE incrementally - never decrease.

20 years a Zencart User