Hi Mac.
If I'm getting your setup correctly, the code will be quite easy.
First, if you have the ShoppingCart, you don't have to instantiate SKUInfo objects from the DataRow(s) of the ContentTable, you can simply loop through its CartItems property:
List<ShoppingCartItemInfo> CartItems
Each
ShoppingCartItemInfo has the
SKUID property and that is used as a foreign key in the TreeNode object - the
NodeSKUID.
Therefore, you need to query the tree using one of the overloads of the
SelectNodes method (VisualStudio will offer that, alternatively there's
API reference or examples in
the DevGuide) that accepts
where parameter (the where condition), which will be constructed as:
where = "NodeSKUID = " + shoppingCartItem.SKUID;
You can also use the
columns parameter to narrow the query to the required ones, maybe just the
SubscriptionType column name and the
NodeSKUID.
Further note - please obtain the TreeProvider once, not repeatedly in a oop.Anyway, you should receive a DataSet with a single record (if you don't have more documents mapped with the same product - SKU), so it will be easy to read the SubscriptionType either directly or after instantiating the TreeNode (document) object..
Should you need any additional details, please feel free to ask.
Regards,
Zdenek.