Hi Paul.
Here are the expression which works in a test i have just done...
Where 'Category' is the column added to the eCart object and 'Venice' is the variable from the database.
On the calculations tab of the ecart object i added DiscountedPrice and changed TotalPrice. This is how they look my equivalent of your stonehouse_PHP.php page.
$itmObj->DiscountedPrice = (abs($itmObj->Category == 'Venice') * ($itmObj->Price - ($itmObj->Price*0.1))) + (abs($itmObj->Category != 'Venice') * $itmObj->Price);//c
$itmObj->TotalPrice = ((abs($itmObj->Category == 'Venice') * ($itmObj->Price - ($itmObj->Price*0.1))) + (abs($itmObj->Category != 'Venice') * $itmObj->Price)) * $itmObj->Quantity;//c
I'm a bit confused about 'Rugs', is this the description of SubCatID = 51 ?
Basically, whatever value is passed into the column name you created in the eCart object is what you need in your calculation.
good luck