1

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.

1 Answer 1

2

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}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.