<p>You <s>have to </s>can loop through the shipping rules for the shipping method.</p>

<pre><code>{% for handle, method in cart.availableShippingMethods %}

  {% if method.shippingRules|length %}
    {% for shippingRule in method.shippingRules %}
      {{ shippingRule.name }}
      {{ shippingRule.description }}
    {% endfor %}
  {% endif %}

{% endfor %}
</code></pre>

CC BY-SA 4.0
2019-01-28T03:09:42.767Z
2019-01-28T03:32:33.017Z
2019-01-28T03:32:33.017Z
Stephen Callender
<p>calling </p>

<pre><code>{% set methods = cart.availableShippingMethods %}
</code></pre>

<p>which is the same as calling:</p>

<pre><code>{% set methods = craft.commerce.shippingMethods.getAvailableShippingMethods(cart) %}
</code></pre>

<p>the above returns an array of shipping method models, keyed by the shipping method handle. </p>

<p>to get the matching rule for each available method</p>

<pre><code>{% for method in methods %}
{% set rule = method.getMatchingShippingRule(cart) %}
{% set price = method.getPriceForOrder(cart) %}
{% endfor %}
</code></pre>

CC BY-SA 4.0
2019-01-28T03:11:37.793Z
2019-01-28T03:11:37.793Z
Luke Holder
<p>I just noticed I had to update some templates after updating to the latest Commerce version (2.0.2).</p>

<p>How does one go about getting the method's rule description?</p>

<p>I currently have it set up to apply a rule based on geographical shipping location (like contiguous US states / Hawaii and Alaska / Russia / World / Oceania)—but <code>{{ method.description }}</code> from within <code>{% for handle, method in cart.availableShippingMethods %}</code> breaks the site.</p>

<p>Cheers!</p>

CC BY-SA 4.0
2019-01-27T22:09:26.150Z
I would also want to display the rule name together with description. Right now it only displays the method name.
Anders
<craft3><plugin-craftcommerce2>
Craft Commerce 2.0.2 Shipping Rule Names & Descriptions—How?
# Craft Commerce 2.0.2 Shipping Rule Names & Descriptions—How?

(Asked by: username_0 on 2019-01-27)

I just noticed I had to update some templates after updating to the latest Commerce version (2.0.2).

How does one go about getting the method's rule description?

I currently have it set up to apply a rule based on geographical shipping location (like contiguous US states / Hawaii and Alaska / Russia / World / Oceania)—but `{{ method.description }}` from within `{% for handle, method in cart.availableShippingMethods %}` breaks the site.

Cheers!

**Tags:** craft3, plugin-craftcommerce2

> **Comments:**
> **username_0**: I would also want to display the rule name together with description. Right now it only displays the method name.  

---

## 2 answers

### Answer by username_2 on 2019-01-28. Score: 4 | Accepted answer

calling 
{% set methods = cart.availableShippingMethods %}

which is the same as calling:
{% set methods = craft.commerce.shippingMethods.getAvailableShippingMethods(cart) %}

the above returns an array of shipping method models, keyed by the shipping method handle. 
to get the matching rule for each available method
{% for method in methods %}
{% set rule = method.getMatchingShippingRule(cart) %}
{% set price = method.getPriceForOrder(cart) %}
{% endfor %}


---

### Answer by username_1 on 2019-01-28. Score: 4

You have to can loop through the shipping rules for the shipping method.
{% for handle, method in cart.availableShippingMethods %}

  {% if method.shippingRules|length %}
    {% for shippingRule in method.shippingRules %}
      {{ shippingRule.name }}
      {{ shippingRule.description }}
    {% endfor %}
  {% endif %}

{% endfor %}


---

