I want to retrieve products_tax_class_ids
in checkout payment page in OSCommerce shopping cart software. E.g., the user has 20 items in his shopping cart and if any of product has products_tax_class_id = 30
, the site will warn him.
This code is not working.
$tax = tep_db_query("select products_tax_class_id
from " . TABLE_PRODUCTS . "
where products_id = '".$card[$products_id]."'");
while ($warn = tep_db_fetch_array($tax)) {
if (warn== '30') {
echo "attention ....";
}
else {
echo "..."
}
}
How can I compare tax_class_id
of products?
2
Answers
You didn’t point name of field in while loop.
And word “card” should be a “cart” I think…