Where are line items stored?

Hello all.

I’m new here and have searched the forums. I’ve been tasked with querying CSCart externally and I need to know where this system stores line item numbers.

Thanks for any help in the right direction.

Hello kdmosaic,



Thank you for your message.



As far as I understand, you mean the position number of objects such as products, categories, etc. Please clarify position numbers of which objects you are asking about so that I could provide you with this information.



For example, position numbers of categories are stored in the position field of the cscart_categories database table.



Thank you.





Pavel Zyukin

CS-Cart Support team

Hi Pavel.

Thanks. What I mean is… normally with ecommerce systems each item in an order is given a “line item number.” This is usually an auto_increment field in a database table.

I'm looking in the table named order_details and I'm not seeing anything which looks like a line item number.

I hope that helps.

Thanks.

Hello kdmosaic,



Thank you very much for the clarification.



Unfortunately, there is no such a field in standard CS-Cart. If you want to add it, some PHP code changes are required to be made to implement this feature. You can make them yourself (if you know PHP) or hire a third-party developer (here you can find a lot of offers from CS-Cart developers or consider our custom development service).



Thank you.





Pavel Zyukin

CS-Cart Support team

Order_details table includes each item in the order.

Selecting each order_id (the invoice number) will return a row for each item's product_id, product_code, and sale price (after catalog promotions applied) in the order.

Thanks folks.

I think, theoretically, I could just add an auto_increment to that table. Or, if that doesn't work, perhaps a procedure which will increment a column created for that purpose.

Thanks.