Jump to content

XSell/Cross-Sell - ID number, how is it generated?

Recommended Posts

Does anyone know how the numbers for the "ID" (Primary) of XSell in products_xsell are generated? If they are simply adding one to the previous number that is great, but I see large gaps in the number sequence so was trying to figure out what made it. I do know that products_id is the number of the 1st product item, and that xsell_id is the cross-reference to the other items products_id, and finally that sort_order is, well, the order several items are show if there is more than one XSell item (each is linked to the next until you reach the end of the chain).


I am working on an open source database manager using LibreOffice BASE (OpenOffice BASE didn't work so well when I tried it earlier this year) and this question popped up on me while experimenting with displaying the XSell data relative to the Product ID.


I could read through the XSell code I guess, but was hoping someone knew off the top of their head what the answer is.

Share this post

Link to post
Share on other sites

They're generated automatically by the database. They are usually in sequence, but gaps can occur if you deleted something.




See my profile for a list of my addons and ways to get support.

Share this post

Link to post
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