Hi Justin

Hope you don't mind, but I thought it might be helpful if I jumped in and provided some additional information about the long product ID (aka prid).

You are correct that this is added for attributes. Its primary purpose is to allow the shopping cart to differentiate between variants of the same product that differ only due to the attributes selected. So, for example, the shopping cart will merge products with the same prid, but know to keep the separate products with different prids.

The prid is generated by applying MD5 encryption to the attribute information. There's no particular benefit to the data being encrypted - the real benefit is that MD5 is pretty well guaranteed to produce a unique result for each combination of attributes and therefore there is virtually zero risk of accidentally merging different product variants.

However, MD5 is a one-way encryption technique, so the attribute information cannot be extracted from it. Instead it is passed from the product info page in a $_POST array and is picked up by the shopping cart which then holds the information in a php session array indexed by the prid and from which it can be referenced when needed.

Hope this helps.