Trying to use eCart binding in a switch statement
I am trying to print a minimum qty depending on the value of $eCart2->DisplayInfo("Description") and I have set up my switch statement as follows:
<?php
echo '<br /><span class="minqty">Minimum Quantity = ';
switch($eCart2->DisplayInfo("Description")) {
case 'Postcards':
//do something e.g. echo();
echo '50';
break;
case 'Stickers':
//do something else e.g. echo();
echo '25';
break;
default:
// default behaviour if all else fails e.g. echo();
echo '12';
}
echo '</span>';
?>
But regardless of the value of $eCart2->DisplayInfo("Description") it defaults to 12, what am I doing wrong ?