// All taxes by country
public static function getTaxesByCountry($countryId)
{
if ((int) $countryId > 0) {
$db = Factory::getDBO();
$q = 'SELECT t.id, t.title, t.ordering, t.tax_rate, tc.id as tcr_id, tc.title as tcr_title, tc.alias as tcr_alias, tc.tax_rate as tcr_tax_rate' . ' FROM #__phocacart_taxes as t' . ' LEFT JOIN #__phocacart_tax_countries AS tc ON tc.tax_id = t.id AND tc.country_id = ' . (int) $countryId . ' ORDER BY t.ordering ASC';
$db->setQuery($q);
$items = $db->loadObjectList();
return $items;
}
}