I am trying to figure out, what variable is used for category of item in basket. I need this information to conditionally insert more form fields in order form using PHP. So I need to go through all intems in basket and check categories of item?
I am not very sure but I think there is no such thing as variable for category of item in basket.
You probably have to make some new function called for example throwCategoryOfProduct which will return this category. In that function you have to loop through pages looking for those that are categories as well as having that particular product. Then call your new function somewhere in actions_client/p.php.
I am giving this advice because you seem to be able enough to use it.
@ jaygridley if you look at my site (the address in my signature) and play with buying (adding to basket), you will see the basket-menu on the right side. Clicking on an item in the basket, you will land in the category[site] (NOT product-description), where the product is. So, in short sense: every product has its saved "category" - parent site, you can use in your code.