spree_core 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/assets/images/credit_cards/icons/diners_club.png +0 -0
- data/app/assets/javascripts/admin/address_states.js +1 -1
- data/app/assets/javascripts/admin/admin.js.erb +18 -13
- data/app/assets/javascripts/admin/calculator.js +2 -2
- data/app/assets/javascripts/admin/checkouts/edit.js +3 -1
- data/app/assets/javascripts/admin/image_settings.js.erb +5 -5
- data/app/assets/javascripts/admin/orders/edit.js +1 -1
- data/app/assets/javascripts/admin/payments/new.js +9 -2
- data/app/assets/javascripts/admin/spree_core.js +13 -1
- data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +2 -1
- data/app/assets/javascripts/admin/variant_autocomplete.js.erb +23 -19
- data/app/assets/javascripts/spree.js.coffee +37 -0
- data/app/assets/javascripts/store/checkout.js.coffee +8 -0
- data/app/assets/javascripts/store/product.js.coffee +1 -1
- data/app/assets/javascripts/store/spree_core.js +1 -0
- data/app/assets/stylesheets/admin/components/_sidebar.scss +7 -6
- data/app/assets/stylesheets/admin/components/_states.scss +16 -12
- data/app/assets/stylesheets/admin/globals/_variables.scss +102 -96
- data/app/assets/stylesheets/admin/shared/_forms.scss +2 -1
- data/app/assets/stylesheets/admin/shared/_icons.scss +2 -1
- data/app/assets/stylesheets/admin/shared/_layout.scss +4 -1
- data/app/assets/stylesheets/admin/shared/_tables.scss +8 -0
- data/app/assets/stylesheets/store/screen.css.scss +28 -16
- data/app/assets/stylesheets/store/variables.css.scss +4 -2
- data/app/controllers/spree/admin/adjustments_controller.rb +7 -3
- data/app/controllers/spree/admin/base_controller.rb +10 -5
- data/app/controllers/spree/admin/line_items_controller.rb +3 -2
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -2
- data/app/controllers/spree/admin/orders_controller.rb +2 -2
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/resource_controller.rb +5 -5
- data/app/controllers/spree/admin/shipments_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +1 -1
- data/app/controllers/spree/admin/users_controller.rb +96 -0
- data/app/controllers/spree/checkout_controller.rb +18 -7
- data/app/controllers/spree/locale_controller.rb +1 -1
- data/app/controllers/spree/orders_controller.rb +20 -2
- data/app/controllers/spree/taxons_controller.rb +8 -2
- data/app/helpers/spree/admin/images_helper.rb +6 -2
- data/app/helpers/spree/admin/navigation_helper.rb +23 -3
- data/app/helpers/spree/base_helper.rb +9 -5
- data/app/helpers/spree/orders_helper.rb +13 -0
- data/app/helpers/spree/products_helper.rb +9 -4
- data/app/mailers/spree/base_mailer.rb +16 -0
- data/app/mailers/spree/order_mailer.rb +12 -11
- data/app/mailers/spree/shipment_mailer.rb +4 -7
- data/app/mailers/spree/test_mailer.rb +2 -3
- data/app/models/spree/adjustment.rb +1 -1
- data/app/models/spree/app_configuration.rb +9 -3
- data/app/models/spree/calculator/default_tax.rb +5 -1
- data/app/models/spree/calculator/per_item.rb +1 -1
- data/app/models/spree/classification.rb +7 -0
- data/app/models/spree/credit_card.rb +1 -5
- data/app/models/spree/gateway.rb +10 -2
- data/app/models/spree/gateway/bogus.rb +5 -5
- data/app/models/spree/inventory_unit.rb +4 -4
- data/app/models/spree/line_item.rb +1 -1
- data/app/models/spree/order.rb +15 -35
- data/app/models/spree/order/checkout.rb +52 -0
- data/app/models/spree/order_populator.rb +11 -3
- data/app/models/spree/order_updater.rb +3 -4
- data/app/models/spree/payment.rb +23 -1
- data/app/models/spree/payment/processing.rb +18 -5
- data/app/models/spree/payment_method.rb +4 -0
- data/app/models/spree/price.rb +2 -3
- data/app/models/spree/product.rb +12 -4
- data/app/models/spree/product/scopes.rb +29 -16
- data/app/models/spree/return_authorization.rb +1 -1
- data/app/models/spree/shipment.rb +1 -1
- data/app/models/spree/taxon.rb +21 -6
- data/app/models/spree/variant.rb +7 -2
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/countries/index.html.erb +1 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +10 -2
- data/app/views/spree/admin/images/index.html.erb +7 -3
- data/app/views/spree/admin/mail_methods/index.html.erb +2 -2
- data/app/views/spree/admin/orders/_form.html.erb +3 -3
- data/app/views/spree/admin/orders/_line_item.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +4 -4
- data/app/views/spree/admin/orders/index.html.erb +60 -52
- data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/payment_methods/index.html.erb +39 -35
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +10 -10
- data/app/views/spree/admin/products/_form.html.erb +7 -12
- data/app/views/spree/admin/products/index.html.erb +13 -15
- data/app/views/spree/admin/products/new.html.erb +3 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +7 -7
- data/app/views/spree/admin/return_authorizations/edit.html.erb +17 -11
- data/app/views/spree/admin/return_authorizations/index.html.erb +4 -4
- data/app/views/spree/admin/return_authorizations/new.html.erb +13 -6
- data/app/views/spree/admin/shared/_alert.html.erb +1 -1
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +6 -2
- data/app/views/spree/admin/shared/_order_details.html.erb +6 -6
- data/app/views/spree/admin/shared/_order_tabs.html.erb +20 -37
- data/app/views/spree/admin/shared/_routes.html.erb +1 -1
- data/app/views/spree/admin/shared/_tabs.html.erb +1 -2
- data/app/views/spree/admin/shared/_update_order_state.js +1 -1
- data/app/views/spree/admin/shipments/_form.html.erb +24 -24
- data/app/views/spree/admin/shipments/edit.html.erb +13 -13
- data/app/views/spree/admin/shipments/index.html.erb +35 -31
- data/app/views/spree/admin/shipping_methods/index.html.erb +35 -32
- data/app/views/spree/admin/tax_rates/_form.html.erb +2 -1
- data/app/views/spree/admin/taxons/_form.html.erb +17 -0
- data/app/views/spree/admin/taxons/edit.html.erb +3 -1
- data/app/views/spree/admin/trackers/_form.html.erb +2 -2
- data/app/views/spree/admin/trackers/index.html.erb +2 -2
- data/app/views/spree/admin/users/_form.html.erb +37 -0
- data/app/views/spree/admin/users/edit.html.erb +28 -0
- data/app/views/spree/admin/users/index.html.erb +53 -0
- data/app/views/spree/admin/users/new.html.erb +23 -0
- data/app/views/spree/admin/users/show.html.erb +21 -0
- data/app/views/spree/admin/variants/edit.html.erb +6 -4
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +4 -4
- data/app/views/spree/admin/zones/index.html.erb +3 -1
- data/app/views/spree/checkout/_delivery.html.erb +1 -1
- data/app/views/spree/checkout/_payment.html.erb +1 -1
- data/app/views/spree/checkout/_summary.html.erb +2 -2
- data/app/views/spree/checkout/payment/_gateway.html.erb +6 -6
- data/app/views/spree/layouts/spree_application.html.erb +0 -1
- data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
- data/app/views/spree/order_mailer/confirm_email.text.erb +1 -1
- data/app/views/spree/orders/_adjustments.html.erb +1 -1
- data/app/views/spree/orders/_line_item.html.erb +2 -2
- data/app/views/spree/orders/edit.html.erb +1 -1
- data/app/views/spree/payments/_payment.html.erb +16 -0
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/_thumbnails.html.erb +3 -3
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/shared/_google_analytics.html.erb +1 -1
- data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +10 -24
- data/app/views/spree/shared/_products.html.erb +1 -1
- data/app/views/spree/shared/_search.html.erb +1 -1
- data/app/views/spree/taxons/show.html.erb +1 -1
- data/config/initializers/check_for_orphaned_preferences.rb +5 -2
- data/config/locales/en.yml +24 -5
- data/config/routes.rb +4 -3
- data/db/default/spree/countries.rb +229 -0
- data/db/default/spree/roles.rb +2 -0
- data/db/default/spree/states.rb +57 -0
- data/db/default/spree/zones.rb +17 -0
- data/db/migrate/20130207155350_add_order_id_index_to_payments.rb +9 -0
- data/db/migrate/20130208032954_add_primary_to_spree_products_taxons.rb +5 -0
- data/db/migrate/20130222032153_add_order_id_index_to_shipments.rb +5 -0
- data/db/migrate/20130226032817_change_meta_description_on_spree_products_to_text.rb +5 -0
- data/db/migrate/20130226054936_add_variant_id_index_to_spree_prices.rb +5 -0
- data/db/migrate/20130319062004_change_orders_total_precision.rb +8 -0
- data/db/migrate/20130319063911_change_spree_payments_amount_precision.rb +7 -0
- data/db/migrate/20130319064308_change_spree_return_authorization_amount_precision.rb +7 -0
- data/db/migrate/20130319082943_change_adjustments_amount_precision.rb +7 -0
- data/db/migrate/20130328195253_add_seo_metas_to_taxons.rb +9 -0
- data/lib/generators/spree/dummy/templates/rails/database.yml +9 -6
- data/lib/spree/core/calculated_adjustments.rb +1 -1
- data/lib/spree/core/controller_helpers/auth.rb +3 -3
- data/lib/spree/core/controller_helpers/common.rb +1 -11
- data/lib/spree/core/controller_helpers/order.rb +15 -12
- data/lib/spree/core/engine.rb +5 -1
- data/lib/spree/core/mail_interceptor.rb +4 -6
- data/lib/spree/core/mail_settings.rb +52 -23
- data/lib/spree/core/permalinks.rb +1 -3
- data/lib/spree/core/testing_support/authorization_helpers.rb +1 -1
- data/lib/spree/core/testing_support/capybara_ext.rb +30 -0
- data/lib/spree/core/testing_support/common_rake.rb +8 -0
- data/lib/spree/core/testing_support/factories/payment_factory.rb +1 -1
- data/lib/spree/core/testing_support/factories/product_factory.rb +7 -2
- data/lib/spree/core/testing_support/factories/variant_factory.rb +4 -2
- data/lib/spree/core/validators/email.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/money.rb +14 -3
- data/lib/spree/product_filters.rb +1 -1
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +3 -2
- data/vendor/assets/javascripts/jsuri.js +2 -0
- data/vendor/assets/javascripts/modernizr.js +3 -3
- metadata +78 -69
- data/db/default/spree/countries.yml +0 -1589
- data/db/default/spree/roles.yml +0 -5
- data/db/default/spree/states.yml +0 -256
- data/db/default/spree/zone_members.yml +0 -169
- data/db/default/spree/zones.yml +0 -13
@@ -10,7 +10,9 @@
|
|
10
10
|
</li>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
|
13
|
+
<% # Because otherwise the form would attempt to use to_param of @taxon %>
|
14
|
+
<% form_url = admin_taxonomy_taxon_path(@taxonomy.id, @taxon.id) %>
|
15
|
+
<%= form_for [:admin, @taxonomy, @taxon], :method => :put, :url => form_url, :html => { :multipart => true } do |f| %>
|
14
16
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
15
17
|
|
16
18
|
<div class="form-buttons" data-hook="buttons">
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<tr id="<%= spree_dom_id tracker %>" data-hook="admin_trackers_index_rows" class="<%= cycle('odd', 'even')%>">
|
37
37
|
<td><%= tracker.analytics_id %></td>
|
38
38
|
<td><%= tracker.environment.to_s.titleize %></td>
|
39
|
-
<td class="align-center"><%= tracker.active ? t(:
|
39
|
+
<td class="align-center"><%= tracker.active ? t(:say_yes) : t(:say_no) %></td>
|
40
40
|
<td class="actions">
|
41
41
|
<%= link_to_edit tracker, :no_text => true %>
|
42
42
|
<%= link_to_delete tracker, :no_text => true %>
|
@@ -45,4 +45,4 @@
|
|
45
45
|
<% end %>
|
46
46
|
</tbody>
|
47
47
|
</table>
|
48
|
-
<% end%>
|
48
|
+
<% end%>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<div data-hook="admin_user_form_fields" class="row">
|
2
|
+
<div class="alpha five columns">
|
3
|
+
<%= f.field_container :email do %>
|
4
|
+
<%= f.label :email, t(:email) %>
|
5
|
+
<%= f.email_field :email, :class => 'fullwidth' %>
|
6
|
+
<%= error_message_on :user, :email %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<div data-hook="admin_user_form_roles" class="field">
|
10
|
+
<%= label_tag nil, t(:roles) %>
|
11
|
+
<ul>
|
12
|
+
<% @roles.each do |role| %>
|
13
|
+
<li>
|
14
|
+
<%= check_box_tag 'user[spree_role_ids][]', role.id, @user.spree_roles.include?(role), :id => "user_spree_role_#{role.name}" %>
|
15
|
+
<%= label_tag role.name %>
|
16
|
+
</li>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
<%= hidden_field_tag 'user[spree_role_ids][]', '' %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="omega five columns">
|
25
|
+
<%= f.field_container :password do %>
|
26
|
+
<%= f.label :password, t(:password) %>
|
27
|
+
<%= f.password_field :password, :class => 'fullwidth' %>
|
28
|
+
<%= f.error_message_on :password %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<%= f.field_container :password do %>
|
32
|
+
<%= f.label :password_confirmation, t(:confirm_password) %>
|
33
|
+
<%= f.password_field :password_confirmation, :class => 'fullwidth' %>
|
34
|
+
<%= f.error_message_on :password_confirmation %>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
37
|
+
</div>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= t(:editing_user) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<li>
|
7
|
+
<%= button_link_to t(:back_to_users_list), spree.admin_users_path, :icon => 'icon-arrow-left' %>
|
8
|
+
</li>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<fieldset data-hook="admin_user_edit_general_settings" class="alpha ten columns">
|
12
|
+
<legend><%= t(:general_settings) %></legend>
|
13
|
+
|
14
|
+
<div data-hook="admin_user_edit_form_header">
|
15
|
+
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div data-hook="admin_user_edit_form">
|
19
|
+
<%= form_for [:admin, @user] do |f| %>
|
20
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
21
|
+
|
22
|
+
<div data-hook="admin_user_edit_form_button">
|
23
|
+
<%= render :partial => 'spree/admin/shared/edit_resource_links' %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
</fieldset>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= t(:listing_users) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<li>
|
7
|
+
<%= button_link_to t(:new_user), new_object_url, :icon => 'icon-plus', :id => 'admin_new_user_link' %>
|
8
|
+
</li>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<table class="index" id="listing_users" data-hook>
|
12
|
+
<colgroup>
|
13
|
+
<col style="width: 85%">
|
14
|
+
<col style="width: 15%">
|
15
|
+
</colgroup>
|
16
|
+
<thead>
|
17
|
+
<tr data-hook="admin_users_index_headers">
|
18
|
+
<th><%= sort_link @search,:email, t(:user), {}, {:title => 'users_email_title'} %></th>
|
19
|
+
<th data-hook="admin_users_index_header_actions" class="actions"></th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<% @users.each do |user|%>
|
24
|
+
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows" class="<%= cycle('odd', 'even')%>">
|
25
|
+
<td class='user_email'><%=link_to user.email, object_url(user) %></td>
|
26
|
+
<td data-hook="admin_users_index_row_actions" class="actions">
|
27
|
+
<%= link_to_edit user, :no_text => true %>
|
28
|
+
<%= link_to_delete user, :no_text => true %>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
<% end %>
|
32
|
+
</tbody>
|
33
|
+
</table>
|
34
|
+
|
35
|
+
<%= paginate @users %>
|
36
|
+
|
37
|
+
<% content_for :sidebar_title do %>
|
38
|
+
<%= t(:search) %>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<% content_for :sidebar do %>
|
42
|
+
<div class="box align-center" data-hook="admin_users_index_search">
|
43
|
+
<%= search_form_for [:admin, @search] do |f| %>
|
44
|
+
<div class="field">
|
45
|
+
<%= f.label t(:email) %> <br>
|
46
|
+
<%= f.text_field :email_cont, :class => 'fullwidth' %>
|
47
|
+
</div>
|
48
|
+
<div data-hook="admin_users_index_search_buttons">
|
49
|
+
<%= button t(:search), 'icon-search' %>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
52
|
+
</div>
|
53
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= t(:new_user) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<li>
|
7
|
+
<%= button_link_to t(:back_to_users_list), spree.admin_users_path, :icon => 'icon-arrow-left' %>
|
8
|
+
</li>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div data-hook="admin_user_new_form_header">
|
12
|
+
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div data-hook="admin_user_new_form">
|
16
|
+
<%= form_for [:admin, @user] do |f| %>
|
17
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
18
|
+
|
19
|
+
<div data-hook="admin_user_new_form_buttons">
|
20
|
+
<%= render :partial => 'spree/admin/shared/new_resource_links' %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<h1><%= t(:user_account) %></h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tr data-hook="email">
|
5
|
+
<th><%= t(:email) %></th>
|
6
|
+
<td>
|
7
|
+
<%= @user.email %>
|
8
|
+
</td>
|
9
|
+
</tr>
|
10
|
+
<tr data-hook="roles">
|
11
|
+
<th><%= t(:roles) %></th>
|
12
|
+
<td>
|
13
|
+
<%= @user.spree_roles.pluck(:name).join(', ') %>
|
14
|
+
</td>
|
15
|
+
</tr>
|
16
|
+
</table>
|
17
|
+
|
18
|
+
<p>
|
19
|
+
<%= link_to_edit @user, :class => 'edit_user' %> <%= t(:or) %>
|
20
|
+
<%= link_to t(:back), collection_url %>
|
21
|
+
</p>
|
@@ -5,9 +5,11 @@
|
|
5
5
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @variant } %>
|
6
6
|
|
7
7
|
<%= form_for [:admin, @product, @variant] do |f| %>
|
8
|
-
<
|
9
|
-
|
10
|
-
|
8
|
+
<fieldset class="no-border-top">
|
9
|
+
<div data-hook="admin_variant_edit_form">
|
10
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
11
|
+
</div>
|
11
12
|
|
12
|
-
|
13
|
+
<%= render :partial => 'spree/admin/shared/edit_resource_links' %>
|
14
|
+
</fieldset>
|
13
15
|
<% end %>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<span class="handle"></span>
|
34
34
|
</td>
|
35
35
|
<td><%= variant.options_text %></td>
|
36
|
-
<td class="align-center"><%= variant.display_price %></td>
|
36
|
+
<td class="align-center"><%= variant.display_price.to_html %></td>
|
37
37
|
<td class="align-center"><%= variant.sku %></td>
|
38
38
|
<td class="align-center"><%= variant.on_hand %></td>
|
39
39
|
<td class="actions">
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<div data-hook="default" class="field">
|
16
16
|
<%= zone_form.check_box :default_tax %>
|
17
|
-
<%= label_tag t(:default_tax_zone) %>
|
17
|
+
<%= label_tag t(:default_tax_zone) %>
|
18
18
|
</div>
|
19
19
|
|
20
20
|
<div data-hook="type" class="field">
|
@@ -22,13 +22,13 @@
|
|
22
22
|
<ul>
|
23
23
|
<li>
|
24
24
|
<%= zone_form.radio_button('kind', 'country', { :id => 'country_based' }) %>
|
25
|
-
<%= label_tag t(:country_based) %>
|
25
|
+
<%= label_tag :country_based, t(:country_based) %>
|
26
26
|
</li>
|
27
27
|
<li>
|
28
28
|
<%= zone_form.radio_button('kind', 'state', { :id => 'state_based' }) %>
|
29
|
-
<%= label_tag t(:state_based) %>
|
29
|
+
<%= label_tag :state_based, t(:state_based) %>
|
30
30
|
</li>
|
31
|
-
</ul>
|
31
|
+
</ul>
|
32
32
|
</div>
|
33
33
|
</fieldset>
|
34
34
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<% @order.rate_hash.each do |shipping_method| %>
|
7
7
|
<label>
|
8
8
|
<%= radio_button(:order, :shipping_method_id, shipping_method[:id]) %>
|
9
|
-
<%= shipping_method.name %> <%= shipping_method.display_price %>
|
9
|
+
<%= shipping_method.name %> <%= shipping_method.display_price.to_html %>
|
10
10
|
</label>
|
11
11
|
<% end %>
|
12
12
|
</p>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% @order.available_payment_methods.each do |method| %>
|
5
5
|
<p>
|
6
6
|
<label>
|
7
|
-
<%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.
|
7
|
+
<%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.available_payment_methods.first %>
|
8
8
|
<%= t(method.name, :scope => :payment_methods, :default => method.name) %>
|
9
9
|
</label>
|
10
10
|
</p>
|
@@ -11,13 +11,13 @@
|
|
11
11
|
<% next if (adjustment.originator_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
|
12
12
|
<tr>
|
13
13
|
<td><%= adjustment.label %>: </td>
|
14
|
-
<td><%= adjustment.display_amount %></td>
|
14
|
+
<td><%= adjustment.display_amount.to_html %></td>
|
15
15
|
</tr>
|
16
16
|
<% end %>
|
17
17
|
</tbody>
|
18
18
|
<tr data-hook="order_total">
|
19
19
|
<td><strong><%= t(:order_total) %>:</strong></td>
|
20
|
-
<td><strong><span id='summary-order-total'><%= @order.display_total %></span></strong></td>
|
20
|
+
<td><strong><span id='summary-order-total'><%= @order.display_total.to_html %></span></strong></td>
|
21
21
|
</tr>
|
22
22
|
<% if order.price_adjustment_totals.present? %>
|
23
23
|
<tbody id="price-adjustments" data-hook="order_details_price_adjustments">
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
3
3
|
|
4
4
|
<p class="field" data-hook="card_number">
|
5
|
-
<%= label_tag
|
5
|
+
<%= label_tag "card_number", t(:card_number) %><span class="required">*</span><br />
|
6
6
|
<% options_hash = Rails.env.production? ? {:autocomplete => 'off'} : {} %>
|
7
7
|
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:id => 'card_number', :class => 'required', :size => 19, :maxlength => 19, :autocomplete => "off") %>
|
8
8
|
|
@@ -13,14 +13,14 @@
|
|
13
13
|
</span>
|
14
14
|
</p>
|
15
15
|
<p class="field" data-hook="card_expiration">
|
16
|
-
<%= label_tag
|
17
|
-
<%= select_month(Date.today, { :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true }, :class => 'required') %>
|
18
|
-
<%= select_year(Date.today, { :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15 }, :class => 'required') %>
|
16
|
+
<%= label_tag "card_month", t(:expiration) %><span class="required">*</span><br />
|
17
|
+
<%= select_month(Date.today, { :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true }, :class => 'required', :id => "card_month") %>
|
18
|
+
<%= select_year(Date.today, { :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15 }, :class => 'required', :id => "card_year") %>
|
19
19
|
</p>
|
20
20
|
<p class="field" data-hook="card_code">
|
21
|
-
<%= label_tag
|
21
|
+
<%= label_tag "card_code", t(:card_code) %><span class="required">*</span><br />
|
22
22
|
<%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'required', :size => 5) %>
|
23
|
-
<%= link_to "(#{t(:
|
23
|
+
<%= link_to "(#{t(:what_is_this)})", spree.content_path('cvv'), :target => '_blank', "data-hook" => "cvv_link", :id => "cvv_link" %>
|
24
24
|
</p>
|
25
25
|
<%= hidden_field param_prefix, 'first_name', :value => @order.billing_firstname %>
|
26
26
|
<%= hidden_field param_prefix, 'last_name', :value => @order.billing_lastname %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= t('order_mailer.cancel_email.order_summary_canceled') %>
|
7
7
|
============================================================
|
8
8
|
<% @order.line_items.each do |item| %>
|
9
|
-
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= item.
|
9
|
+
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= item.single_money %> = <%= item.display_amount %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
12
|
<%= t('order_mailer.cancel_email.subtotal', :subtotal => @order.display_item_total) %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= t('order_mailer.confirm_email.order_summary') %>
|
7
7
|
============================================================
|
8
8
|
<% @order.line_items.each do |item| %>
|
9
|
-
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= item.
|
9
|
+
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= item.single_money %> = <%= item.display_amount %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
12
|
<%= t('order_mailer.confirm_email.subtotal', :subtotal => @order.display_item_total) %>
|
@@ -17,13 +17,13 @@
|
|
17
17
|
<%= line_item_description(variant) %>
|
18
18
|
</td>
|
19
19
|
<td class="cart-item-price" data-hook="cart_item_price">
|
20
|
-
<%= line_item.single_money %>
|
20
|
+
<%= line_item.single_money.to_html %>
|
21
21
|
</td>
|
22
22
|
<td class="cart-item-quantity" data-hook="cart_item_quantity">
|
23
23
|
<%= item_form.number_field :quantity, :min => 0, :class => "line_item_quantity", :size => 5 %>
|
24
24
|
</td>
|
25
25
|
<td class="cart-item-total" data-hook="cart_item_total">
|
26
|
-
<%= line_item.display_amount unless line_item.quantity.nil? %>
|
26
|
+
<%= line_item.display_amount.to_html unless line_item.quantity.nil? %>
|
27
27
|
</td>
|
28
28
|
<td class="cart-item-delete" data-hook="cart_item_delete">
|
29
29
|
<%= link_to image_tag('icons/delete.png'), '#', :class => 'delete', :id => "delete_#{dom_id(line_item)}" %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div id="subtotal" data-hook class="columns sixteen alpha omega">
|
22
|
-
<h5><%= t(:subtotal) %>: <span class="order-total"><%= @order.display_total %></span></h5>
|
22
|
+
<h5><%= t(:subtotal) %>: <span class="order-total"><%= @order.display_total.to_html %></span></h5>
|
23
23
|
</div>
|
24
24
|
|
25
25
|
<div class="links columns sixteen alpha omega" data-hook="cart_buttons">
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% source = payment.source %>
|
2
|
+
<% if source.is_a?(Spree::CreditCard) %>
|
3
|
+
<span class="cc-type">
|
4
|
+
<% unless (cc_type = source.cc_type).blank? %>
|
5
|
+
<%= image_tag "credit_cards/icons/#{cc_type}.png" %>
|
6
|
+
<% end %>
|
7
|
+
<%= t(:ending_in) %> <%= source.last_digits %>
|
8
|
+
</span>
|
9
|
+
<br />
|
10
|
+
<span class="full-name">
|
11
|
+
<%= source.first_name %>
|
12
|
+
<%= source.last_name %>
|
13
|
+
</span>
|
14
|
+
<% else %>
|
15
|
+
<%= content_tag(:span, payment.payment_method.name) %>
|
16
|
+
<% end %>
|
@@ -31,13 +31,13 @@
|
|
31
31
|
|
32
32
|
<div id="product-price">
|
33
33
|
<h6 class="product-section-title"><%= t(:price) %></h6>
|
34
|
-
<div><span class="price selling" itemprop="price"><%= @product
|
34
|
+
<div><span class="price selling" itemprop="price"><%= display_price(@product) %></span></div>
|
35
35
|
</div>
|
36
36
|
|
37
37
|
<div class="add-to-cart">
|
38
38
|
<% if @product.on_sale? %>
|
39
39
|
<%= number_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"),
|
40
|
-
1, :class => 'title', :in => 1
|
40
|
+
1, :class => 'title', :in => 1..Spree::Config[:max_quantity], :min => 1 %>
|
41
41
|
<%= button_tag :class => 'large primary', :id => 'add-to-cart-button', :type => :submit do %>
|
42
42
|
<%= t(:add_to_cart) %>
|
43
43
|
<% end %>
|