use the cart ConditionalTotal function
The ConditionalTotal function takes the following arguments:
Return Colum
Conditional Column
Conditional Value
It returns the Subtotal of the Return Column Where the Conditional Column matches the Conditional Value
if($WA_Store_Cart->ConditionalTotal("Quantity", "Category", "123") > 0) echo "Category 123 is in the cart";