spree_core 1.1.6 → 1.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/{creditcards → credit_cards}/amex_cid.gif +0 -0
- data/app/assets/images/{creditcards/creditcard.gif → credit_cards/credit_card.gif} +0 -0
- data/app/assets/images/{creditcards → credit_cards}/discover_cid.gif +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/american_express.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/cirrus.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/delta.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/dinersclub.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/directdebit.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/discover.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/egold.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/maestro.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/master.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/paypal.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/solo.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/switch.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/visa.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/visaelectron.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/westernunion.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/wirecard.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/icons/worldpay.png +0 -0
- data/app/assets/images/{creditcards → credit_cards}/master_cid.jpg +0 -0
- data/app/assets/images/{creditcards → credit_cards}/visa_cid.gif +0 -0
- data/app/assets/javascripts/admin/admin.js.erb +12 -136
- data/app/assets/javascripts/admin/checkouts/edit.js +18 -35
- data/app/assets/javascripts/admin/gateway.js +2 -2
- data/app/assets/javascripts/admin/images/index.js.coffee +12 -0
- data/app/assets/javascripts/admin/images/new.js.coffee +4 -0
- data/app/assets/javascripts/admin/orders/edit.js +1 -1
- data/app/assets/javascripts/admin/orders/edit_form.js +0 -2
- data/app/assets/javascripts/admin/product_autocomplete.js.erb +116 -0
- data/app/assets/javascripts/store/cart.js.coffee +7 -0
- data/app/assets/javascripts/store/checkout.js.coffee +57 -0
- data/app/assets/javascripts/store/product.js.coffee +36 -0
- data/app/assets/stylesheets/admin/admin.css.erb +5 -0
- data/app/assets/stylesheets/admin/spree_core.css +1 -0
- data/app/assets/stylesheets/store/screen.css.scss +15 -1
- data/app/assets/stylesheets/store/variables.css.scss +29 -29
- data/app/controllers/spree/admin/banners_controller.rb +14 -0
- data/app/controllers/spree/admin/base_controller.rb +11 -0
- data/app/controllers/spree/admin/images_controller.rb +13 -5
- data/app/controllers/spree/admin/line_items_controller.rb +16 -25
- data/app/controllers/spree/admin/mail_methods_controller.rb +1 -8
- data/app/controllers/spree/admin/option_types_controller.rb +0 -25
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -3
- data/app/controllers/spree/admin/orders_controller.rb +23 -14
- data/app/controllers/spree/admin/payment_methods_controller.rb +1 -7
- data/app/controllers/spree/admin/payments_controller.rb +5 -5
- data/app/controllers/spree/admin/products_controller.rb +15 -5
- data/app/controllers/spree/admin/prototypes_controller.rb +2 -2
- data/app/controllers/spree/admin/reports_controller.rb +1 -7
- data/app/controllers/spree/admin/resource_controller.rb +130 -130
- data/app/controllers/spree/admin/search_controller.rb +47 -0
- data/app/controllers/spree/admin/taxons_controller.rb +0 -43
- data/app/controllers/spree/base_controller.rb +2 -1
- data/app/controllers/spree/checkout_controller.rb +29 -10
- data/app/controllers/spree/orders_controller.rb +7 -11
- data/app/controllers/spree/products_controller.rb +5 -1
- data/app/helpers/spree/account_helper.rb +4 -0
- data/app/helpers/spree/admin/base_helper.rb +2 -44
- data/app/helpers/spree/admin/navigation_helper.rb +1 -3
- data/app/helpers/spree/admin/orders_helper.rb +3 -2
- data/app/helpers/spree/admin/products_helper.rb +21 -0
- data/app/helpers/spree/base_helper.rb +14 -11
- data/app/helpers/spree/checkout_helper.rb +5 -1
- data/app/helpers/spree/orders_helper.rb +5 -0
- data/app/helpers/spree/products_helper.rb +4 -0
- data/app/helpers/spree/trackers_helper.rb +4 -0
- data/app/models/spree/ability.rb +70 -0
- data/app/models/spree/address.rb +4 -12
- data/app/models/spree/adjustment.rb +30 -8
- data/app/models/spree/app_configuration.rb +1 -1
- data/app/models/spree/calculator/price_sack.rb +3 -5
- data/app/models/spree/country.rb +1 -4
- data/app/models/spree/{creditcard.rb → credit_card.rb} +4 -4
- data/app/models/spree/gateway.rb +2 -2
- data/app/models/spree/gateway/bogus.rb +10 -10
- data/app/models/spree/gateway/bogus_simple.rb +4 -4
- data/app/models/spree/image.rb +3 -12
- data/app/models/spree/inventory_unit.rb +4 -6
- data/app/models/spree/{user.rb → legacy_user.rb} +7 -6
- data/app/models/spree/line_item.rb +4 -5
- data/app/models/spree/option_type.rb +4 -6
- data/app/models/spree/option_value.rb +1 -1
- data/app/models/spree/order.rb +90 -132
- data/app/models/spree/order/checkout.rb +124 -0
- data/app/models/spree/payment.rb +6 -6
- data/app/models/spree/payment/processing.rb +34 -38
- data/app/models/spree/payment_method.rb +2 -2
- data/app/models/spree/preference.rb +2 -0
- data/app/models/spree/preferences/preferable_class_methods.rb +0 -2
- data/app/models/spree/preferences/store.rb +3 -21
- data/app/models/spree/product.rb +41 -43
- data/app/models/spree/product/scopes.rb +9 -25
- data/app/models/spree/product_option_type.rb +2 -2
- data/app/models/spree/product_property.rb +9 -4
- data/app/models/spree/property.rb +1 -1
- data/app/models/spree/prototype.rb +2 -2
- data/app/models/spree/return_authorization.rb +2 -2
- data/app/models/spree/role.rb +1 -1
- data/app/models/spree/shipment.rb +6 -5
- data/app/models/spree/shipping_method.rb +19 -13
- data/app/models/spree/state.rb +2 -5
- data/app/models/spree/state_change.rb +1 -1
- data/app/models/spree/tax_rate.rb +8 -1
- data/app/models/spree/taxon.rb +5 -1
- data/app/models/spree/taxonomy.rb +1 -1
- data/app/models/spree/tokenized_permission.rb +6 -0
- data/app/models/spree/tracker.rb +1 -1
- data/app/models/spree/variant.rb +13 -40
- data/app/models/spree/zone.rb +15 -14
- data/app/models/spree/zone_member.rb +1 -1
- data/app/views/spree/admin/image_settings/edit.html.erb +2 -2
- data/app/views/spree/admin/images/_form.html.erb +8 -4
- data/app/views/spree/admin/images/index.html.erb +1 -1
- data/app/views/spree/admin/line_items/create.js.erb +1 -1
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
- data/app/views/spree/admin/option_types/index.html.erb +1 -1
- data/app/views/spree/admin/orders/_add_product.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +4 -4
- data/app/views/spree/admin/orders/show.html.erb +1 -1
- data/app/views/spree/admin/payments/_form.html.erb +1 -1
- data/app/views/spree/admin/payments/new.html.erb +0 -4
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +1 -1
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +2 -2
- data/app/views/spree/admin/products/_form.html.erb +21 -5
- data/app/views/spree/admin/products/index.html.erb +2 -2
- data/app/views/spree/admin/properties/_form.html.erb +1 -1
- data/app/views/spree/admin/properties/index.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +33 -17
- data/app/views/spree/admin/return_authorizations/edit.html.erb +2 -2
- data/app/views/spree/admin/shared/_address_form.html.erb +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +12 -2
- data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -4
- data/app/views/spree/admin/shared/_product_tabs.html.erb +0 -6
- data/app/views/spree/admin/shared/_show_resource_links.html.erb +3 -3
- data/app/views/spree/admin/shared/_tabs.html.erb +1 -2
- data/app/views/spree/admin/shipments/edit.html.erb +2 -2
- data/app/views/spree/admin/shipping_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/states/_state_list.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/_form.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +1 -1
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +2 -2
- data/app/views/spree/admin/variants/_form.html.erb +13 -13
- data/app/views/spree/admin/variants/index.html.erb +1 -7
- data/app/views/spree/checkout/_address.html.erb +10 -4
- data/app/views/spree/checkout/edit.html.erb +0 -1
- data/app/views/spree/checkout/payment/_gateway.html.erb +5 -5
- data/app/views/spree/checkout/registration.html.erb +2 -2
- data/app/views/spree/content/cvv.html.erb +6 -6
- data/app/views/spree/layouts/spree_application.html.erb +4 -48
- data/app/views/spree/order_mailer/cancel_email.text.erb +5 -5
- data/app/views/spree/order_mailer/confirm_email.text.erb +6 -7
- data/app/views/spree/orders/_adjustments.html.erb +14 -0
- data/app/views/spree/orders/_form.html.erb +1 -0
- data/app/views/spree/orders/show.html.erb +3 -3
- data/app/views/spree/products/_thumbnails.html.erb +1 -1
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/shared/_footer.html.erb +6 -0
- data/app/views/spree/shared/_google_analytics.html.erb +15 -16
- data/app/views/spree/shared/_head.html.erb +3 -9
- data/app/views/spree/shared/_header.html.erb +5 -0
- data/app/views/spree/shared/_main_nav_bar.html.erb +6 -0
- data/app/views/spree/shared/_nav_bar.html.erb +7 -3
- data/app/views/spree/shared/_order_details.html.erb +14 -11
- data/app/views/spree/shared/_sidebar.html.erb +3 -0
- data/app/views/spree/shared/unauthorized.html.erb +0 -0
- data/app/views/spree/shipment_mailer/shipped_email.text.erb +7 -7
- data/app/views/spree/taxons/show.html.erb +1 -1
- data/config/initializers/check_for_orphaned_preferences.rb +1 -1
- data/config/initializers/spree.rb +0 -12
- data/config/initializers/user_class_extensions.rb +25 -0
- data/config/initializers/workarounds_for_ruby19.rb +72 -0
- data/config/locales/en.yml +11 -24
- data/config/routes.rb +7 -37
- data/db/migrate/20090823005402_spree_zero_nine_zero.rb +14 -12
- data/db/migrate/20091015153048_add_openid_field_to_users.rb +9 -7
- data/db/migrate/20100209144531_polymorphic_payments.rb +5 -5
- data/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +4 -4
- data/db/migrate/20100528185820_add_index_on_users_persistence_token.rb +3 -1
- data/db/migrate/20100811163637_add_guest_flag.rb +3 -1
- data/db/migrate/20100901171814_change_guest_flag_to_anonymous.rb +3 -1
- data/db/migrate/20101026184959_generate_anonymous_users.rb +3 -3
- data/db/migrate/20101103212716_drop_anonymous_field_for_user.rb +3 -1
- data/db/migrate/20111007143030_namespace_top_level_models.rb +18 -1
- data/db/migrate/20120315064358_migrate_images_from_products_to_variants.rb +6 -4
- data/db/migrate/20120509055454_create_tokenized_permissions_table.rb +16 -0
- data/db/migrate/20120530012000_rename_creditcards_to_credit_cards.rb +11 -0
- data/db/migrate/20120604203654_remove_credit_total_from_orders.rb +5 -0
- data/lib/generators/spree/custom_user/custom_user_generator.rb +53 -0
- data/lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt +28 -0
- data/lib/generators/spree/custom_user/templates/initializer.rb.tt +1 -0
- data/lib/generators/spree/custom_user/templates/migration.rb.tt +7 -0
- data/lib/generators/spree/dummy/dummy_generator.rb +3 -0
- data/lib/generators/spree/dummy/templates/initializers/custom_user.rb +1 -0
- data/lib/generators/spree/install/templates/app/assets/javascripts/admin/all.js +0 -1
- data/lib/generators/spree/install/templates/app/assets/javascripts/store/all.js +0 -1
- data/lib/generators/spree/install/templates/app/assets/stylesheets/admin/all.css +0 -1
- data/lib/generators/spree/install/templates/app/assets/stylesheets/store/all.css +0 -1
- data/lib/generators/spree/install/templates/config/initializers/spree.rb +2 -0
- data/lib/spree/core.rb +15 -2
- data/lib/spree/core/controller_helpers.rb +123 -62
- data/lib/spree/core/current_order.rb +5 -0
- data/lib/spree/core/engine.rb +1 -1
- data/lib/spree/core/mail_settings.rb +1 -2
- data/lib/spree/core/permalinks.rb +1 -5
- data/lib/spree/core/preference_rescue.rb +8 -4
- data/lib/spree/core/relation_serialization.rb +9 -0
- data/lib/spree/core/respond_with.rb +1 -1
- data/lib/spree/core/s3_support.rb +25 -0
- data/lib/spree/core/search/base.rb +2 -5
- data/lib/spree/core/ssl_requirement.rb +2 -2
- data/lib/spree/core/store_helpers.rb +1 -2
- data/lib/spree/core/testing_support/controller_requests.rb +1 -0
- data/lib/spree/core/testing_support/env.rb +2 -0
- data/lib/spree/core/testing_support/factories/{creditcard_factory.rb → credit_card_factory.rb} +3 -3
- data/lib/spree/core/testing_support/factories/payment_factory.rb +1 -1
- data/lib/spree/core/testing_support/factories/product_factory.rb +4 -4
- data/lib/spree/core/testing_support/factories/user_factory.rb +3 -3
- data/lib/spree/core/testing_support/factories/zone_factory.rb +2 -3
- data/lib/spree/core/token_resource.rb +27 -0
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/product_filters.rb +12 -13
- data/lib/tasks/core.rake +1 -1
- metadata +146 -154
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/javascripts/admin/images/index.js +0 -10
- data/app/assets/javascripts/admin/images/new.js +0 -5
- data/app/assets/javascripts/admin/products.js +0 -2
- data/app/assets/javascripts/store/cart.js +0 -11
- data/app/assets/javascripts/store/checkout.js +0 -78
- data/app/assets/javascripts/store/product.js +0 -49
- data/app/controllers/spree/admin/users_controller.rb +0 -68
- data/app/views/spree/admin/option_types/_available.html.erb +0 -28
- data/app/views/spree/admin/option_types/_selected.html.erb +0 -26
- data/app/views/spree/admin/option_types/available.js.erb +0 -2
- data/app/views/spree/admin/option_types/select.js.erb +0 -3
- data/app/views/spree/admin/option_types/selected.html.erb +0 -6
- data/app/views/spree/admin/orders/history.html.erb +0 -29
- data/app/views/spree/admin/products/_option_types.html.erb +0 -40
- data/app/views/spree/admin/shared/_additional_field.html.erb +0 -5
- data/app/views/spree/admin/shared/_routes.html.erb +0 -8
- data/app/views/spree/admin/shared/_translations.html.erb +0 -17
- data/app/views/spree/admin/taxons/available.js.erb +0 -26
- data/app/views/spree/admin/taxons/remove.html.erb +0 -1
- data/app/views/spree/admin/taxons/select.js.erb +0 -2
- data/app/views/spree/admin/taxons/selected.html.erb +0 -42
- data/app/views/spree/admin/users/_form.html.erb +0 -19
- data/app/views/spree/admin/users/edit.html.erb +0 -14
- data/app/views/spree/admin/users/index.html.erb +0 -48
- data/app/views/spree/admin/users/new.html.erb +0 -14
- data/app/views/spree/admin/users/show.html.erb +0 -21
- data/app/views/spree/shared/_store_menu.html.erb +0 -2
- data/config/initializers/rails_5868.rb +0 -8
- data/db/migrate/20120605211305_make_users_email_index_unique.rb +0 -10
- data/db/migrate/20121017010007_remove_not_null_constraint_from_products_on_hand.rb +0 -11
- data/db/sample/users.rb +0 -61
- data/lib/generators/spree/sandbox/sandbox_generator.rb +0 -36
- data/lib/generators/spree/sandbox/templates/rails/routes.rb +0 -7
- data/lib/spree/core/ext/array.rb +0 -14
- data/lib/spree/core/ext/hash.rb +0 -75
- data/lib/spree/core/ext/string.rb +0 -10
- data/lib/tasks/install.rake +0 -18
@@ -15,15 +15,9 @@
|
|
15
15
|
<li<%== ' class="active"' if current == 'Variants' %>>
|
16
16
|
<%= link_to t(:variants), admin_product_variants_url(@product) %>
|
17
17
|
</li>
|
18
|
-
<li<%== ' class="active"' if current == 'Option Types' %>>
|
19
|
-
<%= link_to t(:option_types), selected_admin_product_option_types_url(@product) %>
|
20
|
-
</li>
|
21
18
|
<li<%== ' class="active"' if current == 'Product Properties' %>>
|
22
19
|
<%= link_to t(:product_properties), admin_product_product_properties_url(@product) %>
|
23
20
|
</li>
|
24
|
-
<li<%== ' class="active"' if current == 'Taxons' %>>
|
25
|
-
<%= link_to t(:taxons), selected_admin_product_taxons_url(@product) %>
|
26
|
-
</li>
|
27
21
|
</ul>
|
28
22
|
<br class="clear" />
|
29
23
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<p class="actions" data-hook="actions">
|
2
|
-
<%= link_to t(:edit), edit_object_url %> |
|
3
|
-
<%= link_to t(:back), collection_url %> |
|
4
|
-
<%= link_to t(:delete), object_url, :
|
2
|
+
<%= link_to t(:edit), edit_object_url %> |
|
3
|
+
<%= link_to t(:back), collection_url %> |
|
4
|
+
<%= link_to t(:delete), object_url, :method => :delete, :data => { :confirm => t(:are_you_sure_you_want_to_delete_this_record) } %>
|
5
5
|
</p>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
<%= tab :overview, :route => :admin %>
|
2
|
-
<%= tab :orders, :payments, :creditcard_payments, :shipments, :
|
2
|
+
<%= tab :orders, :payments, :creditcard_payments, :shipments, :credit_cards, :return_authorizations %>
|
3
3
|
<%= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :taxons %>
|
4
4
|
<%= tab :reports %>
|
5
5
|
<%= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones, :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods, :trackers, :label => 'configuration' %>
|
6
|
-
<%= tab :users %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<ul class="actions" data-hook="admin_shipment_edit_buttons">
|
3
3
|
<li>
|
4
4
|
<% if @shipment.can_ship? %>
|
5
|
-
<%= button_link_to t(:ship), fire_admin_order_shipment_path(@order, @shipment, :e => 'ship'), :method => :put, :confirm => t(:are_you_sure) %>
|
5
|
+
<%= button_link_to t(:ship), fire_admin_order_shipment_path(@order, @shipment, :e => 'ship'), :method => :put, :data => { :confirm => t(:are_you_sure) } %>
|
6
6
|
<% end %>
|
7
7
|
</li>
|
8
8
|
</ul>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
<div data-hook="admin_shipment_edit_form_buttons">
|
28
28
|
<p class="form-buttons">
|
29
|
-
<% if
|
29
|
+
<% if @shipment.editable_by?(try_spree_current_user) %>
|
30
30
|
<%= button @order.cart? ? t(:continue) : t(:update) %>
|
31
31
|
<%= t(:or) %> <%= link_to t(:cancel), admin_order_shipments_path(@order) %>
|
32
32
|
<% else %>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<% end %>
|
19
19
|
</div>
|
20
20
|
|
21
|
-
<div data-hook
|
21
|
+
<div data-hook"admin_shipping_method_form_availability_fields">
|
22
22
|
<fieldset class="categories">
|
23
23
|
<legend><%= t(:availability) %></legend>
|
24
24
|
<%= f.field_container :shipping_category do %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="toolbar" data-hook="toolbar">
|
3
3
|
<ul class="actions">
|
4
4
|
<li id="new_state_link">
|
5
|
-
<%= button_link_to t(:new_state), new_admin_country_state_url(@country), {:remote => true, :icon => 'add', :id => 'new_state_link'} %>
|
5
|
+
<%= button_link_to t(:new_state), new_admin_country_state_url(@country), { :remote => true, :icon => 'add', :id => 'new_state_link' } %>
|
6
6
|
</li>
|
7
7
|
</ul>
|
8
8
|
<br class="clear" />
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<tbody>
|
22
22
|
<% @tax_rates.each do |tax_rate|%>
|
23
23
|
<tr id="<%= spree_dom_id tax_rate %>" data-hook="rate_row">
|
24
|
-
<td><%=tax_rate.zone.
|
24
|
+
<td><%=tax_rate.zone.name %></td>
|
25
25
|
<td><%=tax_rate.tax_category.try(:name) || t(:not_available) %></td>
|
26
26
|
<td><%=tax_rate.amount %></td>
|
27
27
|
<td><%=tax_rate.included_in_price %></td>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</thead>
|
9
9
|
<tbody>
|
10
10
|
<% taxons.each do |taxon| %>
|
11
|
-
<tr id="<%=
|
11
|
+
<tr id="<%= spree_dom_id(taxon) %>" data-hook="taxons_row">
|
12
12
|
<td><%= taxon.name %></td>
|
13
13
|
<td><%= taxon_path taxon %></td>
|
14
14
|
<td class="actions">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</tr>
|
18
18
|
<% end %>
|
19
19
|
<% if taxons.empty? %>
|
20
|
-
|
20
|
+
<tr data-hook="taxons_none"><td colspan="3"><%= t(:none) %>.</td></tr>
|
21
21
|
<% end %>
|
22
22
|
</tbody>
|
23
23
|
</table>
|
@@ -21,22 +21,22 @@
|
|
21
21
|
<%= f.text_field :sku %></p>
|
22
22
|
|
23
23
|
<p data-hook="price"><%= f.label :price, t(:price) %>:<br />
|
24
|
-
<%= f.text_field :price, :value =>
|
24
|
+
<%= f.text_field :price, :value => number_with_precision(@variant.price, :precision => 2) %></p>
|
25
25
|
|
26
26
|
<p data-hook="cost_price"><%= f.label :cost_price, t(:cost_price) %>:<br />
|
27
|
-
<%= f.text_field :cost_price, :value =>
|
27
|
+
<%= f.text_field :cost_price, :value => number_with_precision(@variant.cost_price, :precision => 2) %></p>
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<div class="right">
|
35
|
-
|
36
|
-
<% Spree::Variant.additional_fields.select{|af| af[:only].nil? || af[:only].include?(:variant) }.each do |field| %>
|
37
|
-
<%= render :partial => 'spree/admin/shared/additional_field', :locals => { :field => field, :f => f } %>
|
38
|
-
<% end %>
|
29
|
+
<% if Spree::Config[:track_inventory_levels] %>
|
30
|
+
<p data-hook="on_hand"><%= f.label :on_hand, t(:on_hand) %>: <br />
|
31
|
+
<%= f.text_field :on_hand %></p>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
39
34
|
|
40
|
-
|
35
|
+
<div class="right" data-hook="admin_variant_form_additional_fields">
|
36
|
+
<% [:weight, :height, :width, :depth].each do |field| %>
|
37
|
+
<p data-hook="<%= field %>"><%= f.label field, t(field) %>:<br />
|
38
|
+
<% value = number_with_precision(@variant.send(field), :precision => 2) %>
|
39
|
+
<%= f.text_field field, :value => value %></p>
|
40
|
+
<% end %>
|
41
41
|
</div>
|
42
42
|
</div>
|
@@ -7,9 +7,6 @@
|
|
7
7
|
<th><%= t(:options) %></th>
|
8
8
|
<th><%= t(:price) %></th>
|
9
9
|
<th><%= t(:sku) %></th>
|
10
|
-
<% Spree::Variant.additional_fields.select { |f| f[:only].nil? || f[:only].include?(:variant) }.each do |field| %>
|
11
|
-
<th><%= t('activerecord.attributes.spree/variant.' + field[:name].downcase, :default => field[:name].titleize) %></th>
|
12
|
-
<% end %>
|
13
10
|
<th><%= t(:on_hand) %></th>
|
14
11
|
<th><%= t(:action) %></th>
|
15
12
|
</tr>
|
@@ -21,9 +18,6 @@
|
|
21
18
|
<td><span class="handle"></span> <%= variant.options_text %></td>
|
22
19
|
<td><%= number_to_currency variant.price %></td>
|
23
20
|
<td><%= variant.sku %></td>
|
24
|
-
<% Spree::Variant.additional_fields.select { |f| f[:only].nil? || f[:only].include?(:variant) }.each do |field| %>
|
25
|
-
<td><%= variant[field[:name].gsub(" ", "_").downcase] %></td>
|
26
|
-
<% end %>
|
27
21
|
<td><%= variant.on_hand %></td>
|
28
22
|
<td valign="top">
|
29
23
|
<%= link_to_edit(variant) unless variant.deleted? %>
|
@@ -42,7 +36,7 @@
|
|
42
36
|
|
43
37
|
<p class='first_add_option_types' data-hook="first_add_option_types">
|
44
38
|
<%= t(:to_add_variants_you_must_first_define) %>
|
45
|
-
<%= link_to t(:option_types),
|
39
|
+
<%= link_to t(:option_types), admin_product_url(@product) %>
|
46
40
|
<%= t(:and) %>
|
47
41
|
<%= link_to t(:option_values), admin_option_types_url %>
|
48
42
|
</p>
|
@@ -1,4 +1,10 @@
|
|
1
1
|
<div class="columns alpha six" data-hook="billing_fieldset_wrapper">
|
2
|
+
<% unless @order.email? %>
|
3
|
+
<p class="field" style='clear: both'>
|
4
|
+
<%= form.label :email %><br />
|
5
|
+
<%= form.text_field :email %>
|
6
|
+
</p>
|
7
|
+
<% end %>
|
2
8
|
<fieldset id="billing" data-hook>
|
3
9
|
<%= form.fields_for :bill_address do |bill_form| %>
|
4
10
|
<legend><%= t(:billing_address) %></legend>
|
@@ -68,12 +74,12 @@
|
|
68
74
|
</p>
|
69
75
|
<p class="field" id="bphone">
|
70
76
|
<%= bill_form.label :phone, t(:phone) %><span class="required">*</span><br />
|
71
|
-
<%= bill_form.
|
77
|
+
<%= bill_form.phone_field :phone, :class => 'required' %>
|
72
78
|
</p>
|
73
79
|
<% if Spree::Config[:alternative_billing_phone] %>
|
74
80
|
<p class="field" id="baltphone">
|
75
81
|
<%= bill_form.label :alternative_phone, t(:alternative_phone) %><br />
|
76
|
-
<%= bill_form.
|
82
|
+
<%= bill_form.phone_field :alternative_phone %>
|
77
83
|
</p>
|
78
84
|
<% end %>
|
79
85
|
</div>
|
@@ -155,12 +161,12 @@
|
|
155
161
|
</p>
|
156
162
|
<p class="field" id="sphone">
|
157
163
|
<%= ship_form.label :phone, t(:phone) %><span class="required">*</span><br />
|
158
|
-
<%= ship_form.
|
164
|
+
<%= ship_form.phone_field :phone, :class => 'required' %>
|
159
165
|
</p>
|
160
166
|
<% if Spree::Config[:alternative_shipping_phone] %>
|
161
167
|
<p class="field" id="saltphone">
|
162
168
|
<%= ship_form.label :alternative_phone, t(:alternative_phone) %><br />
|
163
|
-
<%= ship_form.
|
169
|
+
<%= ship_form.phone_field :alternative_phone %>
|
164
170
|
</p>
|
165
171
|
<% end %>
|
166
172
|
</div>
|
@@ -13,7 +13,6 @@
|
|
13
13
|
<div class="columns <%= if @order.state != 'confirm' then 'alpha twelve' else 'alpha omega sixteen' end %>" data-hook="checkout_form_wrapper">
|
14
14
|
<%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
|
15
15
|
<%= render @order.state, :form => form %>
|
16
|
-
<%= submit_tag nil, :id => 'post-final', :style => 'display:none;' %>
|
17
16
|
<% end %>
|
18
17
|
</div>
|
19
18
|
<% if @order.state != 'confirm' %>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<%= image_tag '
|
1
|
+
<%= image_tag 'credit_cards/credit_card.gif', :id => 'credit-card-image' %>
|
2
2
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
3
3
|
|
4
4
|
<p class="field" data-hook="card_number">
|
5
5
|
<%= label_tag nil, t(:card_number) %><br />
|
6
6
|
<% options_hash = Rails.env.production? ? {:autocomplete => 'off'} : {} %>
|
7
|
-
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:id => 'card_number', :class => 'required', :size => 19, :maxlength => 19) %>
|
7
|
+
<%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:id => 'card_number', :class => 'required', :size => 19, :maxlength => 19, :autocomplete => "off") %>
|
8
8
|
<span class="required">*</span>
|
9
9
|
|
10
10
|
<span id="card_type" style="display:none;">
|
@@ -15,11 +15,11 @@
|
|
15
15
|
</p>
|
16
16
|
<p class="field" data-hook="card_expiration">
|
17
17
|
<%= label_tag nil, t(:expiration) %><br />
|
18
|
-
<%= select_month(Date.today,
|
19
|
-
<%= select_year(Date.today,
|
18
|
+
<%= select_month(Date.today, :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true, :class => 'required') %>
|
19
|
+
<%= select_year(Date.today, :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15, :class => 'required') %>
|
20
20
|
<span class="required">*</span>
|
21
21
|
</p>
|
22
|
-
<p class="field" data-hook="
|
22
|
+
<p class="field" data-hook="cart_code">
|
23
23
|
<%= label_tag nil, t(:card_code) %><br />
|
24
24
|
<%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'required', :size => 5) %>
|
25
25
|
<span class="required">*</span>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>
|
2
|
-
<
|
2
|
+
<h1><%= t(:registration) %></h1>
|
3
3
|
<div id="registration" data-hook>
|
4
4
|
<div id="account" class="columns alpha eight">
|
5
5
|
<!-- TODO: add partial with registration form -->
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% if Spree::Config[:allow_guest_checkout] %>
|
8
8
|
<div id="guest_checkout" data-hook class="columns omega eight">
|
9
9
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
|
10
|
-
<
|
10
|
+
<h1><%= t(:guest_user_account) %></h1>
|
11
11
|
<%= form_for @order, :url => update_checkout_registration_path, :method => :put, :html => { :id => 'checkout_form_registration' } do |f| %>
|
12
12
|
<p>
|
13
13
|
<%= f.label :email, t(:email) %><br />
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div class="cvv" data-hook>
|
2
|
-
<
|
2
|
+
<h1><%= t(:what_is_a_cvv) %></h1>
|
3
3
|
<p>For Visa, MasterCard, and Discover cards, the card code is the last 3 digit number located on the back of your card on or above your signature line. For an American Express card, it is the 4 digits on the FRONT above the end of your card number.</p>
|
4
4
|
<p>To help reduce fraud in the card-not-present environment, credit card companies have introduced a card code program. Visa calls this code Card Verification Value (CVV); MasterCard calls it Card Validation Code (CVC); Discover calls it Card ID (CID). The card code is a three- or four- digit security code that is printed on the back of cards. The number typically appears at the end of the signature panel.</p>
|
5
5
|
<div class="cid-caption">Visa</div>
|
6
|
-
<%= image_tag '
|
6
|
+
<%= image_tag 'credit_cards/visa_cid.gif' %>
|
7
7
|
<div class="cid-caption">Master Card</div>
|
8
|
-
<%= image_tag '
|
8
|
+
<%= image_tag 'credit_cards/master_cid.jpg' %>
|
9
9
|
<div class="cid-caption">American Express</div>
|
10
|
-
<%= image_tag '
|
10
|
+
<%= image_tag 'credit_cards/amex_cid.gif' %>
|
11
11
|
<div class="cid-caption">Discover</div>
|
12
|
-
<%= image_tag '
|
13
|
-
</div>
|
12
|
+
<%= image_tag 'credit_cards/discover_cid.gif' %>
|
13
|
+
</div>
|
@@ -1,69 +1,25 @@
|
|
1
1
|
<!doctype html>
|
2
|
-
|
3
2
|
<!--[if lt IE 7 ]> <html class="ie ie6" lang="en"> <![endif]-->
|
4
3
|
<!--[if IE 7 ]> <html class="ie ie7" lang="en"> <![endif]-->
|
5
4
|
<!--[if IE 8 ]> <html class="ie ie8" lang="en"> <![endif]-->
|
6
5
|
<!--[if IE 9 ]> <html class="ie ie9" lang="en"> <![endif]-->
|
7
6
|
<!--[if gt IE 9]><!--><html lang="en"><!--<![endif]-->
|
8
|
-
|
9
|
-
|
10
7
|
<head data-hook="inside_head">
|
11
8
|
<%= render :partial => 'spree/shared/head' %>
|
12
9
|
</head>
|
13
|
-
|
14
10
|
<body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">
|
15
|
-
|
16
11
|
<div class="container">
|
17
|
-
|
18
|
-
<header id="header" class="row" data-hook>
|
19
|
-
|
20
|
-
<figure id="logo" class="columns alpha six" data-hook>
|
21
|
-
<%= logo %>
|
22
|
-
</figure>
|
23
|
-
|
24
|
-
<nav id="top-nav-bar" class="columns omega ten">
|
25
|
-
<ul id="nav-bar" class="inline" data-hook>
|
26
|
-
<%= render :partial => 'spree/shared/nav_bar' %>
|
27
|
-
</ul>
|
28
|
-
</nav>
|
29
|
-
|
30
|
-
<% if store_menu? %>
|
31
|
-
<nav class="columns alpha omega sixteen">
|
32
|
-
<ul id="main-nav-bar" class="inline" data-hook>
|
33
|
-
<%= render :partial => 'spree/shared/store_menu' %>
|
34
|
-
</ul>
|
35
|
-
</nav>
|
36
|
-
<% end %>
|
37
|
-
|
38
|
-
</header>
|
39
|
-
|
12
|
+
<%= render :partial => 'spree/shared/header' %>
|
40
13
|
<div id="wrapper" class="row" data-hook>
|
41
|
-
|
42
|
-
<% if content_for?(:sidebar) %>
|
43
|
-
<aside id="sidebar" class="columns alpha four" data-hook>
|
44
|
-
<%= yield :sidebar %>
|
45
|
-
</aside>
|
46
|
-
<% end %>
|
47
|
-
|
48
|
-
<div id="content" class="columns omega <% if !content_for?(:sidebar) %> sixteen alpha <% else %> twelve <% end %>" data-hook>
|
49
14
|
<%= breadcrumbs(@taxon) %>
|
15
|
+
<%= render :partial => 'spree/shared/sidebar' if content_for? :sidebar %>
|
16
|
+
<div id="content" class="columns omega <%= !content_for?(:sidebar) ? "sixteen alpha" : "twelve" %>" data-hook>
|
50
17
|
<%= flash_messages %>
|
51
18
|
<%= yield %>
|
52
19
|
</div>
|
53
|
-
|
54
20
|
</div>
|
55
|
-
|
56
|
-
<footer id="footer" class="alpha omega sixteen columns" data-hook>
|
57
|
-
<div id="footer-left" class="columns alpha eight" data-hook>
|
58
|
-
<p><%= t(:powered_by) %> <%= link_to 'Spree', 'http://spreecommerce.com/' %></p>
|
59
|
-
</div>
|
60
|
-
<div id="footer-right" class="columns omega eight" data-hook></div>
|
61
|
-
</footer>
|
62
|
-
|
21
|
+
<%= render :partial => 'spree/shared/footer' %>
|
63
22
|
</div>
|
64
|
-
|
65
23
|
<%= render :partial => 'spree/shared/google_analytics' %>
|
66
|
-
|
67
24
|
</body>
|
68
|
-
|
69
25
|
</html>
|
@@ -1,16 +1,16 @@
|
|
1
|
-
|
1
|
+
Dear Customer,
|
2
2
|
|
3
|
-
|
3
|
+
Your order has been CANCELED. Please retain this cancellation information for your records.
|
4
4
|
|
5
5
|
============================================================
|
6
|
-
|
6
|
+
Order Summary [CANCELED]
|
7
7
|
============================================================
|
8
8
|
<% @order.line_items.each do |item| %>
|
9
9
|
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
|
-
|
12
|
+
Subtotal: <%= number_to_currency @order.item_total %>
|
13
13
|
<% @order.adjustments.eligible.each do |adjustment| %>
|
14
14
|
<%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %>
|
15
15
|
<% end %>
|
16
|
-
|
16
|
+
Order Total: <%= number_to_currency(@order.total) %>
|
@@ -1,20 +1,19 @@
|
|
1
|
-
|
1
|
+
Dear Customer,
|
2
2
|
|
3
|
-
|
3
|
+
Please review and retain the following order information for your records.
|
4
4
|
|
5
5
|
============================================================
|
6
|
-
|
6
|
+
Order Summary
|
7
7
|
============================================================
|
8
8
|
<% @order.line_items.each do |item| %>
|
9
9
|
<%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
|
10
10
|
<% end %>
|
11
11
|
============================================================
|
12
|
-
|
13
|
-
|
12
|
+
Subtotal: <%= number_to_currency @order.item_total %>
|
14
13
|
<% @order.adjustments.eligible.each do |adjustment| %>
|
15
14
|
<%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %>
|
16
15
|
<% end %>
|
16
|
+
Order Total: <%= number_to_currency(@order.total) %>
|
17
17
|
|
18
|
-
<%= t('order_mailer.confirm_email.total') %>: <%= number_to_currency(@order.total) %>
|
19
18
|
|
20
|
-
|
19
|
+
Thank you for your business.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<thead>
|
2
|
+
<tr data-hook="cart_adjustments_headers">
|
3
|
+
<th class="cart-adjustment-header" colspan="6">Order Adjustments</th>
|
4
|
+
</tr>
|
5
|
+
</thead>
|
6
|
+
<tbody id="cart_adjustments" data-hook>
|
7
|
+
<% @order.adjustments.eligible.each do |adjustment| %>
|
8
|
+
<tr>
|
9
|
+
<td colspan="4"><%= adjustment.label %></td>
|
10
|
+
<td><%= number_to_currency(adjustment.amount) %></td>
|
11
|
+
<td></td>
|
12
|
+
</tr>
|
13
|
+
<% end %>
|
14
|
+
</tbody>
|
@@ -14,4 +14,5 @@
|
|
14
14
|
<%= render :partial => 'line_item', :locals => { :variant => item_form.object.variant, :line_item => item_form.object, :item_form => item_form } %>
|
15
15
|
<% end %>
|
16
16
|
</tbody>
|
17
|
+
<%= render "spree/orders/adjustments" unless @order.adjustments.eligible.blank? %>
|
17
18
|
</table>
|