How to get all available tax rates in a Commerce site? Is there a way to retrieve and loop through all the available tax rates that have been set up in Commerce 1?

I had thought I could loop through the adjusters like so;

{% for adjustment in cart.adjustments %}
    {{ adjustment.name }}
{% endfor %}


In fact, I'm doing this on one site with no problems but having just tried the same thing on another project I am running into errors. I'm guessing because no adjustments exist unless there is actually a cart object.

I am trying to retrieve its value in order to display the price including tax on my product page template. For this particular case I only have 1 tax rate, so there is no problem with regionality. I figured that I could loop through the adjuster, check the name and retrieve the value.

If there's another way to do this I'm all ears!
Commerce 2

{% set allTaxRates = craft.commerce.taxRates.allTaxRates() %}

{% for taxRate in allTaxRates %}
    {{ taxRate.name }}&lt;br&gt;
{% endfor %}


taxRate will be an instance of craft\commerce\models\TaxRate



Commerce 1

If you're looking to get all of the tax rates setup in Commerce from a template, something like this should work:

{% set allTaxRates = craft.commerce.getTaxRates() %}

{% for taxRate in allTaxRates %}
    {{ taxRate.name }}&lt;br&gt;
{% endfor %}


taxRate will be an instance of Commerce_TaxRateModel.