<p>In the latest beta update a change was made to how addresses are managed. You can no longer access the customer from the address model.</p>

<p>So the following does not work:
<code>{{address.customer}}</code></p>

<p>There was only one location we did this in the example templates and that was in the file: <code>craft/templates/commerce/_includes/address.html</code>. We removed it from the example templates, so I expect that possibly you have not updated your example templates from the latest release. You will need to manually download the latest release from <a href="http://craftcommerce.com/download" rel="nofollow">http://craftcommerce.com/download</a> to get the latest example templates, as the 'one click update' magic does not update the example templates automatically.</p>

<p>If you need to access the customer for the order, it is always best to do it from the order and not the order's addresses – like this:</p>

<p><code>{{order.customer}}</code></p>

CC BY-SA 3.0
2015-11-27T20:09:06.830Z
2015-11-27T20:09:06.830Z
Luke Holder
<p>I am taking my first <em>real</em> stab at working with the commerce beta. This plugin is pretty fantastic btw - awesome job guys. I can't comprehend all of the tiny details that went into this considering all of the rabbit holes. </p>

<p>I am running into a snag though, on the last page of checking out it seems everything is going through (using the dummy account) as I can see the pending order in the CP. Perhaps it is something as a mis-configuration on my end (quite possible).</p>

<p>However, I am seeing this error when I click "Pay"</p>

<pre><code>Commerce_AddressModel and its behaviors do not have a method or closure named "customer".
</code></pre>

<p>The url is:</p>

<pre><code>www.mysite.com/commerce/customer/order?number=70829108ec467679afb90e2a857e6701
</code></pre>

<p>I am using <a href="https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm" rel="nofollow">this page</a> to snag a valid visa CC number.</p>

<p><strong>Steps to recreate:</strong>
I have enabled guest registration on my page. I used that option to create a new user. I received the confirmation email, clicked and was able to log into my site as the newly created user.</p>

<p>I clicked on the product, entered shipping info (free shipping), entered a valid CC number and clicked "pay".</p>

<p>That's when I see the error. But, the order <em>is</em> showing in the CP.</p>

<plugin-craftcommerce>
Craft Commerce - No closure name "Customer"
# Craft Commerce - No closure name "Customer"

(Asked by: username_0 on 2015-11-27)

I am taking my first real stab at working with the commerce beta. This plugin is pretty fantastic btw - awesome job guys. I can't comprehend all of the tiny details that went into this considering all of the rabbit holes. 
I am running into a snag though, on the last page of checking out it seems everything is going through (using the dummy account) as I can see the pending order in the CP. Perhaps it is something as a mis-configuration on my end (quite possible).
However, I am seeing this error when I click "Pay"
Commerce_AddressModel and its behaviors do not have a method or closure named "customer".

The url is:
www.mysite.com/commerce/customer/order?number=70829108ec467679afb90e2a857e6701

I am using this page to snag a valid visa CC number.
Steps to recreate:
I have enabled guest registration on my page. I used that option to create a new user. I received the confirmation email, clicked and was able to log into my site as the newly created user.
I clicked on the product, entered shipping info (free shipping), entered a valid CC number and clicked "pay".
That's when I see the error. But, the order is showing in the CP.

**Tags:** plugin-craftcommerce


---

## 1 answers

### Answer by username_1 on 2015-11-27. Score: 2 | Accepted answer

In the latest beta update a change was made to how addresses are managed. You can no longer access the customer from the address model.

So the following does not work:
`{{address.customer}}`

There was only one location we did this in the example templates and that was in the file: `craft/templates/commerce/_includes/address.html`. We removed it from the example templates, so I expect that possibly you have not updated your example templates from the latest release. You will need to manually download the latest release from <http://craftcommerce.com/download> to get the latest example templates, as the 'one click update' magic does not update the example templates automatically.

If you need to access the customer for the order, it is always best to do it from the order and not the order's addresses – like this:

`{{order.customer}}`


---

