Zen Cart Logo
Forums / General Questions / Product ID question

Product ID question

Locked

Views: 637

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
13 Nov 2007, 2:16 PM
#1
grandmaj avatar

grandmaj

Zen Follower

Join Date:
Feb 2007
Posts:
104
Plugin Contributions:
0

Product ID question

I have a question pertaining to product IDs. My URLS in Zen cart are all similar to the one below:
/index.php?main_page=product_info&cPath=73_85_89&products_id=986

and it is only the "986" number, for example, in the urls that I am referring to in this post. Ok, I've had my cart running for awhile now, and I am constantly adding and removing products as things sell out and new items come in. The problem is, Zen cart is not re-using old product IDs, and as a result I am on the brink of having 4-digit IDs on my products.

For an example, there are no products at all using any of the "100s" (no 101, 102, etc.) anymore because the products with those numbers were deleted long ago. I only have about four products still in the 200s, and little more in the 300s. But when I add a new product now, Zen is still assigning numbers in the 900s. This is not a huge big deal because it isn't affecting the workings of the cart itself, but I can see a couple of years down the road having overlong 6-digit product ids at the rate I'm going! Ten years down the road I'll have product ids so long that the url will be scrollable (LOL!)

So my question is, is there a way to get Zen cart to re-use product IDs that no longer have any products attached to them?

13 Nov 2007, 2:32 PM
#2
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: Product ID question

GrandmaJ:

But when I add a new product now, Zen is still assigning numbers in the 900s. This is not a huge big deal because it isn't affecting the workings of the cart itself, but I can see a couple of years down the road having overlong 6-digit product ids at the rate I'm going! Ten years down the road I'll have product ids so long that the url will be scrollable (LOL!)
Don't worry, the number of available product ids grows exponentially as each digit is added and so will the time taken to use them up. So if it takes you one year to get to 4 digits, it will take another 10 years to get to 5 digits and then another 100 years to get to 6 digits.

GrandmaJ:

So my question is, is there a way to get Zen cart to re-use product IDs that no longer have any products attached to them?
Not really as it is kind of hard coded into the database to use the next number each time. Re-using product IDs might also cause unexpected problems.

Regards,
Christian.