Skip to content
Allows to specify gift options to the checkout process
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
config
db
lib
public/images/gift_options
.gitignore
README.markdown
Rakefile
gift_options_extension.rb
gift_options_hooks.rb

README.markdown

= Gift Options

Provides spree with a set of options for gifts that are attached to checkout process.

h2. Theme Information

To add the gift option view stuff you need to do as follows

In products/show.html.erb add

<%= hook :gift_options_available %>

In products/_line_item.html.erb add

<%= hook :gift_options_available %>

h2. Checkout Considerations

You'll also need to incorporate the gift option step into your checkout process. A good way to do this would be to add a "Gift Options" step to your checkout process. In your site extension you could do the following:

Checkout.state_machines[:state] = StateMachine::Machine.new(Checkout, :initial => 'address') do
  after_transition :to => 'complete', :do => :complete_order
  event :next do
    transition :from => 'address', :to => 'delivery'
    transition :from => 'delivery', :to => 'giftopts'
    transition :from => 'giftopts', :to => 'payment'
    transition :from => 'payment', :to => 'complete'
  end
end
Something went wrong with that request. Please try again.