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

Confirmation Email issue with Non-digital downloads #38

Open
createthis opened this issue Jul 15, 2013 · 3 comments
Open

Confirmation Email issue with Non-digital downloads #38

createthis opened this issue Jul 15, 2013 · 3 comments

Comments

@createthis
Copy link

I apparently received a non-digital order fifteen days ago. I didn't receive a notification email. I finally noticed the deposit come through in my financials. I found the order in the admin section, then I clicked the Resend button. I got this crash:

  Rendered /home/deploy/.rvm/gems/ruby-1.9.3-p327/bundler/gems/spree_digital-d652e96cb1b8/app/views/spree/order_mai
ler/confirm_email.text.erb (14.8ms)
Completed 500 Internal Server Error in 69ms

ActionView::Template::Error (undefined method `variant_options' for #<#<Class:0x000000077eae08>:0x000000078c8208>):
    6: Order Summary
    7: ============================================================
    8: <% for item in @order.line_items %>
    9: <%= item.variant.sku %> <%=item.variant.product.name%> <%= variant_options(item.variant) %> (<%=item.quantit
y%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
    10: <% end %>
    11: ============================================================
    12: Subtotal: <%= number_to_currency @order.item_total %>
  /home/deploy/.rvm/gems/ruby-1.9.3-p327/bundler/gems/spree_digital-d652e96cb1b8/app/views/spree/order_mailer/confi
rm_email.text.erb:9:in `block in _567af581a32791e407057adc78f90ab7'
  activerecord (3.2.13) lib/active_record/associations/collection_proxy.rb:89:in `each'
  activerecord (3.2.13) lib/active_record/associations/collection_proxy.rb:89:in `method_missing'
  /home/deploy/.rvm/gems/ruby-1.9.3-p327/bundler/gems/spree_digital-d652e96cb1b8/app/views/spree/order_mailer/confi
rm_email.text.erb:8:in `_567af581a32791e407057adc78f90ab7'

I'm pretty tired from work this evening, so I might not look at this until tomorrow. Now that I think about it, I'm not sure if I've ever tested a non-digital sales with spree digital installed. Is it compatible with non digital sales?

@createthis
Copy link
Author

Also, the user was a guest, if that matters.

@createthis
Copy link
Author

I finally had some time to look into this, and I fixed it. I assume this is a problem with the version of rails I'm running with spree 1-3-stable. If anyone else runs into this, add this:

Spree::BaseMailer.class_eval do
  add_template_helper(Spree::BaseHelper)
end

to this file (create it):

app/mailers/spree/base_mailer_decorator.rb

@jspizziri
Copy link
Member

@createthis, can this issue be closed now?

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

2 participants