Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError in checkout (terms and condition) #1676

Closed
Magnusvb opened this issue Jan 7, 2017 · 5 comments
Closed

NoMethodError in checkout (terms and condition) #1676

Magnusvb opened this issue Jan 7, 2017 · 5 comments

Comments

@Magnusvb
Copy link

Magnusvb commented Jan 7, 2017

I'm a beginner on Solidus, and tried to place an order through the frontend. But, at the step after the payment (_confirm.html.erb), I get this error:

NoMethodError in Spree::Checkout#edit
Showing /Users/magnus/Documents/rails_projects/solidus-21-theme/app/views/spree/checkout/_confirm.html.erb where line #10 raised:

require_terms_and_conditions_acceptance preference not defined

I can not find any way to define if acceptance of terms and condition is required.

@graygilmore
Copy link
Contributor

The preference is set here: https://github.com/solidusio/solidus/blob/master/frontend/app/models/spree/frontend_configuration.rb#L6

Can you confirm that that file is being loaded?

@jhawthorn
Copy link
Contributor

@Magnusvb going out on a limb, sorry if I'm wrong.

Is it possible you've copied the _confirm.html.erb from Solidus master (which is 2.2.0.alpha) into your app running on an older version of Solidus? That method is brand new and doesn't exist in any Solidus gem releases. If you're copying views into your app, you will have to use the the version of the view matching the version you are using.

@Magnusvb
Copy link
Author

John, you are totally right!
I had cloned (by mistake) the Master and used these files in my installation - which is version 2.1. Replacing with the right file solved the problem.

@graygilmore: I could not find the file with the settings, which made me wonder about the versions...

Sorry for the false issue (and late respons)! Many thanks!

@tvdeyen
Copy link
Member

tvdeyen commented Jan 11, 2017

This is totally our fault as we never had a good way to override views in your app, until #1681

@jhawthorn
Copy link
Contributor

No worries @Magnusvb, you are hardly the first to run into this 😉

Hopefully #1681 will make this less common to run into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants