identify if item is in the cart
what is the most effective way of determining if a particular item is in the cart ?
i have tried the following, (and it seems to work), but I am just being cautious..
<?php
while (!$WA_Store_Cart->EOF()) {
if ($WA_Store_Cart->DisplayInfo("ID") == 123) {
echo 'item 123 is in the cart !';
}
$WA_Store_Cart->MoveNext();
}
$WA_Store_Cart->MoveFirst();
?>