Permalink
Browse files

added possibility to list options along with the product name

  • Loading branch information...
1 parent 5b07492 commit 164644c886d3fa5cce626531341ba1612a1964ff @tomash tomash committed Nov 30, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/views/checkout/_paypal_checkout.html.erb
@@ -11,7 +11,11 @@
<input id="invoice" name="invoice" type="hidden" value="<%= @order.number %>" />
<% @order.line_items.each_with_index do |item, index| %>
- <input id="item_name_<%= index + 1 %>" name="item_name_<%= index + 1 %>" type="hidden" value="<%= item.variant.product.name %>" />
+ <%- if Spree::Paypal::Config[:include_option] %>
+ <input id="item_name_<%= index + 1 %>" name="item_name_<%= index + 1 %>" type="hidden" value="<%= "#{item.variant.product.name} (#{variant_options(item.variant)})" %>" />
+ <% else %>
+ <input id="item_name_<%= index + 1 %>" name="item_name_<%= index + 1 %>" type="hidden" value="<%= item.variant.product.name %>" />
+ <% end %>
<input id="amount_<%= index + 1 %>" name="amount_<%= index + 1 %>" type="hidden" value="<%= item.price %>" />
<input id="quantity_<%= index + 1 %>" name="quantity_<%= index + 1 %>" type="hidden" value="<%= item.quantity %>" />
<% end %>

0 comments on commit 164644c

Please sign in to comment.