bcalloway / spree-contact

Simple contact form for Spree site that adds records to the database as well as emailing the recipient.
4 stars 2 forks source link

Now that it's installed, how do I actually implement a contact form? #3

Closed kakra closed 14 years ago

kakra commented 14 years ago

There doesn't seem to be a generator or example for usage.

bcalloway commented 14 years ago

Install just like any other spree extension. In your project, you can always issue the terminal command "rake -T" to see all available rake methods.

rake spree:extensions:contact:update rake db:migrate

See this: http://spreecommerce.com/documentation/extensions.html#extensionmodelsandmigrations

kakra commented 14 years ago

Well this is actually not the problem. I was hoping to find an example how to implement the contact form in the frontend. I thought this extension is more than just a contact manager.

When I access http://localhost:3000/contacts/new (found by trial and error, there's no instruction that this is the URL to call) I just get an error: undefined method `semantic_form_for' for #ActionView::Base:0x7fe4f168a398

bcalloway commented 14 years ago

Make sure you have the formtastic gem installed...it is required. In order to make the form show up on the frontend, check out the routes.rb and create a navigation link appropriately. All this extension does is allow a user to submit a message via a contact form and store it in the database, notifiying the end recipient (you).

You can see all routes by running "rake routes" from a terminal prompt within your app root directory.

If you wish the extension to behave differently, please feel free to fork ;) That's why it's up here.

Sorry, but I do not have the resources to support this extension any further. It's intended to be very basic, and help out with a few simple contact form tasks. Past that, you'll need to "make it your own".

kakra commented 14 years ago

I'll amend the documentation and send a pull request. The issue with formtastic.rb was a missing "rails" folder in the gems installation, so it wasn't picked up during app start.

bcalloway commented 14 years ago

Ok, thanks...but also feel free to fork this and run with it if you want.