spree_core 1.0.7 → 1.1.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/javascripts/admin/admin.js.erb +9 -18
- data/app/assets/javascripts/admin/calculator.js +7 -6
- data/app/assets/javascripts/admin/checkouts/edit.js +2 -2
- data/app/assets/javascripts/admin/image_settings.js +49 -0
- data/app/assets/javascripts/admin/orders/edit_form.js +14 -14
- data/app/assets/stylesheets/admin/admin.css.erb +36 -54
- data/app/assets/stylesheets/store/screen.css.scss +25 -12
- data/app/controllers/spree/admin/base_controller.rb +3 -3
- data/app/controllers/spree/admin/image_settings_controller.rb +71 -0
- data/app/controllers/spree/admin/images_controller.rb +22 -21
- data/app/controllers/spree/admin/mail_methods_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
- data/app/controllers/spree/admin/orders_controller.rb +13 -13
- data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/product_properties_controller.rb +3 -4
- data/app/controllers/spree/admin/products_controller.rb +49 -47
- data/app/controllers/spree/admin/properties_controller.rb +1 -1
- data/app/controllers/spree/admin/prototypes_controller.rb +12 -6
- data/app/controllers/spree/admin/reports_controller.rb +15 -16
- data/app/controllers/spree/admin/resource_controller.rb +1 -1
- data/app/controllers/spree/admin/return_authorizations_controller.rb +1 -1
- data/app/controllers/spree/admin/shipments_controller.rb +0 -3
- data/app/controllers/spree/admin/states_controller.rb +9 -9
- data/app/controllers/spree/admin/users_controller.rb +18 -42
- data/app/controllers/spree/admin/variants_controller.rb +22 -21
- data/app/controllers/spree/admin/zones_controller.rb +11 -11
- data/app/controllers/spree/content_controller.rb +1 -1
- data/app/controllers/spree/locale_controller.rb +2 -2
- data/app/controllers/spree/orders_controller.rb +4 -6
- data/app/controllers/spree/products_controller.rb +1 -1
- data/app/controllers/spree/states_controller.rb +4 -7
- data/app/helpers/spree/admin/base_helper.rb +4 -0
- data/app/helpers/spree/admin/navigation_helper.rb +4 -16
- data/app/helpers/spree/base_helper.rb +22 -3
- data/app/models/spree/activator.rb +4 -1
- data/app/models/spree/address.rb +45 -45
- data/app/models/spree/adjustment.rb +4 -4
- data/app/models/spree/app_configuration.rb +12 -0
- data/app/models/spree/calculator/default_tax.rb +1 -3
- data/app/models/spree/calculator/flat_percent_item_total.rb +0 -2
- data/app/models/spree/calculator/flat_rate.rb +0 -3
- data/app/models/spree/calculator/flexi_rate.rb +1 -3
- data/app/models/spree/calculator/per_item.rb +1 -6
- data/app/models/spree/calculator/price_sack.rb +0 -2
- data/app/models/spree/country.rb +1 -1
- data/app/models/spree/creditcard.rb +9 -10
- data/app/models/spree/gateway.rb +0 -2
- data/app/models/spree/image.rb +18 -2
- data/app/models/spree/inventory_unit.rb +4 -2
- data/app/models/spree/mail_method.rb +1 -6
- data/app/models/spree/option_type.rb +3 -1
- data/app/models/spree/order.rb +68 -62
- data/app/models/spree/payment.rb +1 -1
- data/app/models/spree/payment_method.rb +0 -6
- data/app/models/spree/product/scopes.rb +44 -44
- data/app/models/spree/product.rb +44 -26
- data/app/models/spree/product_property.rb +0 -2
- data/app/models/spree/property.rb +0 -16
- data/app/models/spree/prototype.rb +0 -1
- data/app/models/spree/return_authorization.rb +0 -2
- data/app/models/spree/shipment.rb +2 -3
- data/app/models/spree/shipping_category.rb +0 -2
- data/app/models/spree/shipping_method.rb +1 -2
- data/app/models/spree/shipping_rate.rb +9 -0
- data/app/models/spree/state.rb +10 -2
- data/app/models/spree/{state_event.rb → state_change.rb} +1 -4
- data/app/models/spree/tax_rate.rb +3 -3
- data/app/models/spree/taxon.rb +1 -6
- data/app/models/spree/taxonomy.rb +3 -6
- data/app/models/spree/user.rb +1 -0
- data/app/models/spree/variant.rb +3 -4
- data/app/models/spree/zone.rb +0 -10
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
- data/app/views/spree/admin/configurations/index.html.erb +4 -0
- data/app/views/spree/admin/image_settings/edit.html.erb +91 -0
- data/app/views/spree/admin/image_settings/show.html.erb +11 -0
- data/app/views/spree/admin/images/index.html.erb +3 -3
- data/app/views/spree/admin/mail_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/mail_methods/index.html.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/option_types/new.js.erb +1 -1
- data/app/views/spree/admin/orders/_form.html.erb +3 -5
- data/app/views/spree/admin/orders/_line_item.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/history.html.erb +2 -2
- data/app/views/spree/admin/orders/index.html.erb +19 -19
- data/app/views/spree/admin/payment_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/index.html.erb +1 -3
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/product_properties/index.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +30 -27
- data/app/views/spree/admin/products/index.html.erb +9 -9
- data/app/views/spree/admin/products/new.html.erb +28 -4
- data/app/views/spree/admin/products/new.js.erb +1 -1
- data/app/views/spree/admin/properties/index.html.erb +1 -1
- data/app/views/spree/admin/properties/new.js.erb +1 -1
- data/app/views/spree/admin/prototypes/index.html.erb +1 -1
- data/app/views/spree/admin/prototypes/new.js.erb +1 -1
- data/app/views/spree/admin/prototypes/show.html.erb +42 -0
- data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
- data/app/views/spree/admin/shared/_address_form.html.erb +1 -1
- data/app/views/spree/admin/shared/_calculator_fields.html.erb +2 -2
- data/app/views/spree/admin/shared/_head.html.erb +3 -3
- data/app/views/spree/admin/shared/_order_details.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_tabs.html.erb +6 -6
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +0 -1
- data/app/views/spree/admin/shared/_report_criteria.html.erb +3 -3
- data/app/views/spree/admin/shared/_tabs.html.erb +1 -1
- data/app/views/spree/admin/shared/_update_order_state.js +5 -4
- data/app/views/spree/admin/shipments/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +1 -1
- data/app/views/spree/admin/states/_state_list.html.erb +1 -1
- data/app/views/spree/admin/states/new.js.erb +1 -1
- data/app/views/spree/admin/tax_categories/index.html.erb +2 -2
- data/app/views/spree/admin/tax_rates/index.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/_list.html.erb +1 -1
- data/app/views/spree/admin/trackers/_form.html.erb +1 -1
- data/app/views/spree/admin/trackers/index.html.erb +1 -1
- data/app/views/spree/admin/users/_form.html.erb +1 -16
- data/app/views/spree/admin/users/index.html.erb +3 -4
- data/app/views/spree/admin/variants/index.html.erb +2 -2
- data/app/views/spree/admin/variants/new.js.erb +1 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/app/views/spree/checkout/_address.html.erb +1 -1
- data/app/views/spree/checkout/edit.html.erb +1 -1
- data/app/views/spree/checkout/registration.html.erb +2 -2
- data/app/views/spree/order_mailer/confirm_email.text.erb +3 -3
- data/app/views/spree/orders/show.html.erb +2 -2
- data/app/views/spree/products/_cart_form.html.erb +1 -2
- data/app/views/spree/products/_image.html.erb +1 -1
- data/app/views/spree/products/show.html.erb +3 -3
- data/app/views/spree/shared/_filters.html.erb +26 -24
- data/app/views/spree/shared/_google_analytics.html.erb +26 -26
- data/app/views/spree/shared/_products.html.erb +2 -2
- data/app/views/spree/shared/_search.html.erb +1 -1
- data/app/views/spree/shared/_store_menu.html.erb +1 -1
- data/app/views/spree/states/index.js.erb +1 -1
- data/config/initializers/rails_3_1.rb +3 -3
- data/config/locales/en.yml +40 -35
- data/config/routes.rb +5 -13
- data/db/migrate/20101026184714_migrate_transactions_to_payment_state.rb +4 -4
- data/db/migrate/20111007143030_namespace_top_level_models.rb +0 -3
- data/db/migrate/20120203001428_rename_state_events_to_state_changes.rb +9 -0
- data/db/migrate/20120315064358_migrate_images_from_products_to_variants.rb +35 -0
- data/lib/generators/spree/dummy/templates/rails/database.yml +48 -20
- data/lib/generators/spree/install/install_generator.rb +17 -1
- 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/sandbox/sandbox_generator.rb +9 -2
- data/lib/spree/core/calculated_adjustments.rb +29 -34
- data/lib/spree/core/controller_helpers.rb +36 -34
- data/lib/spree/core/custom_fixtures.rb +1 -1
- data/lib/spree/core/delegate_belongs_to.rb +22 -24
- data/lib/spree/core/engine.rb +3 -3
- data/lib/spree/core/environment_extension.rb +12 -15
- data/lib/spree/core/mail_settings.rb +1 -1
- data/lib/spree/core/permalinks.rb +24 -16
- data/lib/spree/core/preference_rescue.rb +1 -1
- data/lib/spree/core/respond_with.rb +13 -8
- data/lib/spree/core/responder.rb +1 -2
- data/lib/spree/core/search/base.rb +36 -19
- data/lib/spree/core/ssl_requirement.rb +18 -10
- data/lib/spree/core/testing_support/common_rake.rb +1 -1
- data/lib/spree/core/testing_support/factories/product_factory.rb +9 -9
- data/lib/spree/core/testing_support/factories/role_factory.rb +1 -1
- data/lib/spree/core/testing_support/factories/shipping_category_factory.rb +1 -1
- data/lib/spree/core/testing_support/factories/shipping_method_factory.rb +3 -3
- data/lib/spree/core/testing_support/factories/user_factory.rb +1 -1
- data/lib/spree/core/testing_support/factories/zone_factory.rb +4 -2
- data/lib/spree/core/validators/email.rb +23 -0
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/core.rb +2 -2
- data/lib/spree/product_filters.rb +10 -19
- data/lib/tasks/core.rake +1 -1
- data/vendor/assets/javascripts/jquery.alerts/jquery.alerts.css.erb +5 -5
- data/vendor/assets/stylesheets/jquery-ui.datepicker.css.erb +1 -1
- metadata +68 -140
- data/app/assets/images/noimage/large.png +0 -0
- data/app/controllers/spree/admin/product_groups_controller.rb +0 -49
- data/app/controllers/spree/admin/product_scopes_controller.rb +0 -39
- data/app/helpers/spree/admin/product_groups_helper.rb +0 -14
- data/app/helpers/spree/admin/product_properties_helper.rb +0 -24
- data/app/models/spree/product_group.rb +0 -200
- data/app/models/spree/product_scope.rb +0 -79
- data/app/views/spree/admin/banners/_gateway.html.erb +0 -14
- data/app/views/spree/admin/product_groups/_preview.html.erb +0 -33
- data/app/views/spree/admin/product_groups/_product_scope.html.erb +0 -24
- data/app/views/spree/admin/product_groups/edit.html.erb +0 -59
- data/app/views/spree/admin/product_groups/index.html.erb +0 -37
- data/app/views/spree/admin/product_groups/new.html.erb +0 -12
- data/app/views/spree/admin/product_groups/show.html.erb +0 -32
- data/app/views/spree/admin/product_scopes/create.js.erb +0 -6
- data/app/views/spree/admin/product_scopes/destroy.js.erb +0 -3
- data/app/views/spree/admin/product_scopes/new.html.erb +0 -1
- data/app/views/spree/admin/shared/_group_from_products_form.html.erb +0 -12
- data/db/migrate/20091012120519_product_groups_and_scopes.rb +0 -18
- data/db/migrate/20100126103714_create_products_product_groups.rb +0 -8
- data/db/migrate/20100306153445_fix_by_popularity.rb +0 -9
- data/db/migrate/20120523061241_convert_sales_tax_to_default_tax.rb +0 -9
- data/lib/spree/core/testing_support/factories/product_group_factory.rb +0 -5
- data/lib/spree/core/testing_support/factories/product_scope_factory.rb +0 -7
- data/lib/spree/core/theme_support/hook_listener.rb +0 -145
- data/lib/spree/core/theme_support.rb +0 -1
- data/vendor/assets/javascripts/jquery.alerts/jquery.alerts.css +0 -57
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>
|
|
2
2
|
<h2><%= t(:registration) %></h2>
|
|
3
|
-
<div id="registration" data-hook
|
|
4
|
-
<div id="account">
|
|
3
|
+
<div id="registration" data-hook>
|
|
4
|
+
<div id="account" class="columns alpha eight">
|
|
5
5
|
<!-- TODO: add partial with registration form -->
|
|
6
6
|
</div>
|
|
7
7
|
<% if Spree::Config[:allow_guest_checkout] %>
|
|
@@ -6,14 +6,14 @@ Please review and retain the following order information for your records.
|
|
|
6
6
|
Order Summary
|
|
7
7
|
============================================================
|
|
8
8
|
<% @order.line_items.each do |item| %>
|
|
9
|
-
<%=item.variant.sku %> <%=item.variant.product.name%> <%= item.variant.options_text -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %>
|
|
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.each do |adjustment| %>
|
|
14
|
-
<%=
|
|
14
|
+
<%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %>
|
|
15
15
|
<% end %>
|
|
16
|
-
Order Total: <%= number_to_currency
|
|
16
|
+
Order Total: <%= number_to_currency(@order.total) %>
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
Thank you for your business.
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
<p data-hook="links">
|
|
14
14
|
<%= link_to t(:back_to_store), spree.root_path, :class => "button" %>
|
|
15
15
|
<% unless params.has_key? :checkout_complete %>
|
|
16
|
-
<% if current_user %>
|
|
16
|
+
<% if respond_to?(:current_user) && current_user %>
|
|
17
17
|
<%= link_to t(:my_account), spree.account_path, :class => "button" %>
|
|
18
18
|
<% end %>
|
|
19
19
|
<% end %>
|
|
20
20
|
</p>
|
|
21
21
|
</div>
|
|
22
|
-
</fieldset>
|
|
22
|
+
</fieldset>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= form_for :order, :url => populate_orders_url do |f| %>
|
|
2
|
-
<div data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
2
|
+
<div id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
3
3
|
|
|
4
4
|
<% if @product.has_variants? %>
|
|
5
5
|
<div id="product-variants" class="columns five alpha">
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
<% if @product.has_stock? || Spree::Config[:allow_backorders] %>
|
|
39
39
|
<%= number_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"),
|
|
40
40
|
1, :class => 'title', :in => 1..@product.on_hand %>
|
|
41
|
-
|
|
42
41
|
<%= button_tag :class => 'large primary', :id => 'add-to-cart-button' do %>
|
|
43
42
|
<%= t(:add_to_cart) %>
|
|
44
43
|
<% end %>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<h1 class="product-title" itemprop="name"><%= accurate_title %></h1>
|
|
29
29
|
|
|
30
|
-
<div itemprop="description" data-hook="
|
|
30
|
+
<div itemprop="description" data-hook="description">
|
|
31
31
|
<%= product_description(@product) rescue t(:product_has_no_description) %>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
</div>
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
<%= render :partial => 'taxons' %>
|
|
41
41
|
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
|
-
</div>
|
|
45
|
+
</div>
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<%=
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<%
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<%
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
<% filters = @taxon ? @taxon.applicable_filters : [Spree::ProductFilters.all_taxons] %>
|
|
2
|
+
<% unless filters.empty? %>
|
|
3
|
+
<%= form_tag '', :method => :get, :id => 'sidebar_products_search' do %>
|
|
4
|
+
<% params[:search] ||= {} %>
|
|
5
|
+
<%= hidden_field_tag 'per_page', params[:per_page] %>
|
|
6
|
+
<% filters.each do |filter| %>
|
|
7
|
+
<% labels = filter[:labels] || filter[:conds].map {|m,c| [m,m]} %>
|
|
8
|
+
<% next if labels.empty? %>
|
|
9
|
+
<div class="navigation" data-hook="navigation">
|
|
10
|
+
<span class="category"> <%= filter[:name] %> </span>
|
|
11
|
+
<ul class="filter_choices">
|
|
12
|
+
<% labels.each do |nm,val| %>
|
|
13
|
+
<% label = "#{filter[:name]}_#{nm}".gsub(/\s+/,'_') %>
|
|
14
|
+
<li class="nowrap">
|
|
15
|
+
<input type="checkbox"
|
|
16
|
+
id="<%= label %>"
|
|
17
|
+
name="search[<%= filter[:scope].to_s %>][]"
|
|
18
|
+
value="<%= val %>"
|
|
19
|
+
<%= params[:search][filter[:scope]] && params[:search][filter[:scope]].include?(val.to_s) ? "checked" : "" %> />
|
|
20
|
+
<label class="nowrap" for="<%= label %>"> <%= nm %> </label>
|
|
21
|
+
</li>
|
|
22
|
+
<% end %>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
<% end %>
|
|
26
|
+
<%= submit_tag t(:search), :name => nil %>
|
|
24
27
|
<% end %>
|
|
25
|
-
<%= submit_tag t(:search), :name => nil %>
|
|
26
28
|
<% end %>
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
<% if tracker = Spree::Tracker.current %>
|
|
2
2
|
|
|
3
|
-
<%= javascript_tag do
|
|
3
|
+
<%= javascript_tag do -%>
|
|
4
4
|
var _gaq = _gaq || [];
|
|
5
|
-
_gaq.push(['_setAccount', '<%= tracker.analytics_id
|
|
5
|
+
_gaq.push(['_setAccount', '<%= tracker.analytics_id -%>']);
|
|
6
6
|
_gaq.push(['_trackPageview']);
|
|
7
7
|
|
|
8
|
-
<% if flash[:commerce_tracking] %>
|
|
9
|
-
<%# report e-commerce transaction information when applicable %>
|
|
10
|
-
_gaq.push(['_addTrans',
|
|
11
|
-
"<%= @order.number %>", <%# Order Number %>
|
|
12
|
-
"", <%# Affiliation %>
|
|
13
|
-
"<%= @order.total %>", <%# Order total %>
|
|
14
|
-
"<%= @order.adjustments.tax.sum(:amount) %>", <%# Tax Amount %>
|
|
15
|
-
"<%= @order.adjustments.shipping.sum(:amount) %>",<%# Ship Amount %>
|
|
16
|
-
"", <%# City %>
|
|
17
|
-
"", <%# State %>
|
|
18
|
-
"" <%# Country %>
|
|
19
|
-
]);
|
|
20
|
-
<% @order.line_items.each do |line_item| %>
|
|
21
|
-
_gaq.push(['_addItem',
|
|
22
|
-
"<%= @order.number %>", <%# order ID - required %>
|
|
23
|
-
"<%= line_item.variant.sku %>", <%# SKU/code - required %>
|
|
24
|
-
"<%= line_item.variant.product.name %>",<%# product name %>
|
|
25
|
-
"", <%# category or variation, Product Category %>
|
|
26
|
-
"<%= line_item.price %>", <%# unit price - required %>
|
|
27
|
-
"<%= line_item.quantity %>" <%# quantity - required %>
|
|
28
|
-
]);
|
|
29
|
-
<% end %>
|
|
30
|
-
<% end %>
|
|
31
|
-
|
|
32
8
|
(function() {
|
|
33
9
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
34
10
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
35
11
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
36
12
|
})();
|
|
13
|
+
<% end -%>
|
|
14
|
+
|
|
15
|
+
<% if flash[:commerce_tracking] %>
|
|
16
|
+
|
|
17
|
+
<%= javascript_tag do -%>
|
|
18
|
+
// report e-commerce transaction information when applicable
|
|
19
|
+
pageTracker._addTrans(
|
|
20
|
+
"<%= @order.number %>", //Order Number
|
|
21
|
+
"", //Affiliation
|
|
22
|
+
"<%= @order.total %>", //Order total
|
|
23
|
+
"<%= @order.adjustments.tax.sum(:amount).to_s %>", //Tax Amount
|
|
24
|
+
"<%= @order.adjustments.shipping.sum(:amount).to_s %>", //Ship Amount
|
|
25
|
+
"", //City
|
|
26
|
+
"", //State
|
|
27
|
+
"" //Country
|
|
28
|
+
);
|
|
29
|
+
<% @order.line_items.each do |line_item| %>
|
|
30
|
+
pageTracker._addItem("<%= @order.number %>", "<%= line_item.variant.sku %>", "<%= line_item.variant.product.name %>",
|
|
31
|
+
"" /*Product Category*/, "<%= line_item.price %>", "<%= line_item.quantity %>");
|
|
32
|
+
<% end %>
|
|
33
|
+
pageTracker._trackTrans();
|
|
34
|
+
<% end -%>
|
|
35
|
+
|
|
37
36
|
<% end %>
|
|
37
|
+
|
|
38
38
|
<% end %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%
|
|
2
|
-
paginated_products = @searcher.
|
|
2
|
+
paginated_products = @searcher.retrieve_products if params.key?(:keywords)
|
|
3
3
|
paginated_products ||= products
|
|
4
4
|
%>
|
|
5
5
|
<% if products.empty? %>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<% if Spree::Config[:show_zero_stock_products] || product.has_stock? %>
|
|
15
15
|
<li id="product_<%= product.id %>" class="columns three <%= cycle("alpha", "secondary", "", "omega secondary") %>" data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
|
|
16
16
|
<div class="product-image">
|
|
17
|
-
<%= link_to small_image(product, :itemprop => "
|
|
17
|
+
<%= link_to small_image(product, :itemprop => "image"), product, :itemprop => 'url' %>
|
|
18
18
|
</div>
|
|
19
19
|
<%= link_to truncate(product.name, :length => 50), product, :class => 'info', :itemprop => "name", :title => product.name %>
|
|
20
20
|
<span class="price selling" itemprop="price"><%= number_to_currency product.price %></span>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% @taxons = @taxon && @taxon.parent ? @taxon.parent.children : Spree::Taxon.roots %>
|
|
2
|
-
<%= form_tag
|
|
2
|
+
<%= form_tag products_path, :method => :get do %>
|
|
3
3
|
<%= select_tag :taxon,
|
|
4
4
|
options_for_select([[t(:all_departments), '']] +
|
|
5
5
|
@taxons.map {|t| [t.name, t.id]},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
<li id="home-link" data-hook><%= link_to t(:home), root_path %></li>
|
|
2
|
-
<li id="link-to-cart" data-hook><%= link_to_cart %></li>
|
|
2
|
+
<li id="link-to-cart" data-hook><%= link_to_cart %></li>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
state_mapper = <%== @state_info
|
|
1
|
+
state_mapper = <%== @state_info %>
|
data/config/locales/en.yml
CHANGED
|
@@ -9,7 +9,6 @@ en:
|
|
|
9
9
|
account_updated: "Account updated!"
|
|
10
10
|
action: Action
|
|
11
11
|
actions:
|
|
12
|
-
cancel: Cancel
|
|
13
12
|
create: Create
|
|
14
13
|
destroy: Destroy
|
|
15
14
|
list: List
|
|
@@ -49,7 +48,19 @@ en:
|
|
|
49
48
|
price: Price
|
|
50
49
|
quantity: Quantity
|
|
51
50
|
spree/order:
|
|
52
|
-
|
|
51
|
+
checkout_complete: "Checkout Complete"
|
|
52
|
+
completed_at: "Completed At"
|
|
53
|
+
ip_address: "IP Address"
|
|
54
|
+
item_total: "Item Total"
|
|
55
|
+
number: Number
|
|
56
|
+
special_instructions: "Special Instructions"
|
|
57
|
+
state: State
|
|
58
|
+
total: Total
|
|
59
|
+
created_at: Order Date
|
|
60
|
+
payment_state: Payment State
|
|
61
|
+
shipment_state: Shipment State
|
|
62
|
+
email: Customer E-Mail
|
|
63
|
+
spree/order/bill_address:
|
|
53
64
|
address1: "Billing address street"
|
|
54
65
|
city: "Billing address city"
|
|
55
66
|
firstname: "Billing address first name"
|
|
@@ -57,7 +68,7 @@ en:
|
|
|
57
68
|
phone: "Billing address phone"
|
|
58
69
|
state: "Billing address state"
|
|
59
70
|
zipcode: "Billing address zipcode"
|
|
60
|
-
|
|
71
|
+
spree/order/ship_address:
|
|
61
72
|
address1: "Shipping address street"
|
|
62
73
|
city: "Shipping address city"
|
|
63
74
|
firstname: "Shipping address first name"
|
|
@@ -65,14 +76,6 @@ en:
|
|
|
65
76
|
phone: "Shipping address phone"
|
|
66
77
|
state: "Shipping address state"
|
|
67
78
|
zipcode: "Shipping address zipcode"
|
|
68
|
-
checkout_complete: "Checkout Complete"
|
|
69
|
-
completed_at: "Completed At"
|
|
70
|
-
ip_address: "IP Address"
|
|
71
|
-
item_total: "Item Total"
|
|
72
|
-
number: Number
|
|
73
|
-
special_instructions: "Special Instructions"
|
|
74
|
-
state: State
|
|
75
|
-
total: Total
|
|
76
79
|
spree/option_type:
|
|
77
80
|
name: Name
|
|
78
81
|
presentation: Presentation
|
|
@@ -87,15 +90,6 @@ en:
|
|
|
87
90
|
on_hand: "On Hand"
|
|
88
91
|
shipping_category: "Shipping Category"
|
|
89
92
|
tax_category: "Tax Category"
|
|
90
|
-
spree/product_group:
|
|
91
|
-
name: Name
|
|
92
|
-
product_count: "Product count"
|
|
93
|
-
product_scopes: "Product scopes"
|
|
94
|
-
products: "Products"
|
|
95
|
-
url: URL
|
|
96
|
-
spree/product_scope:
|
|
97
|
-
arguments: "Arguments"
|
|
98
|
-
description: "Description"
|
|
99
93
|
spree/property:
|
|
100
94
|
name: Name
|
|
101
95
|
presentation: Presentation
|
|
@@ -169,9 +163,6 @@ en:
|
|
|
169
163
|
spree/product:
|
|
170
164
|
one: Product
|
|
171
165
|
other: Products
|
|
172
|
-
spree/product_group:
|
|
173
|
-
one: "Product group"
|
|
174
|
-
other: "Product groups"
|
|
175
166
|
spree/property:
|
|
176
167
|
one: Property
|
|
177
168
|
other: Properties
|
|
@@ -217,6 +208,8 @@ en:
|
|
|
217
208
|
add: Add
|
|
218
209
|
add_category: "Add Category"
|
|
219
210
|
add_country: "Add Country"
|
|
211
|
+
add_new_header: "Add New Header"
|
|
212
|
+
add_new_style: "Add New Style"
|
|
220
213
|
add_option_type: "Add Option Type"
|
|
221
214
|
add_option_types: "Add Option Types"
|
|
222
215
|
add_option_value: "Add Option Value"
|
|
@@ -262,6 +255,9 @@ en:
|
|
|
262
255
|
are_you_sure_you_want_to_capture: "Are you sure you want to capture?"
|
|
263
256
|
assign_taxon: "Assign Taxon"
|
|
264
257
|
assign_taxons: "Assign Taxons"
|
|
258
|
+
attachment_default_url: "Attachments URL"
|
|
259
|
+
attachment_path: "Attachments Path"
|
|
260
|
+
attachment_styles: "Paperclip Styles"
|
|
265
261
|
authorization_failure: "Authorization Failure"
|
|
266
262
|
authorized: Authorized
|
|
267
263
|
availability: "Availability"
|
|
@@ -325,7 +321,6 @@ en:
|
|
|
325
321
|
country_based: "Country Based"
|
|
326
322
|
create: Create
|
|
327
323
|
create_a_new_account: "Create a new account"
|
|
328
|
-
create_product_group_from_products: Create a new product group from these products
|
|
329
324
|
create_user_account: Create User Account
|
|
330
325
|
created_successfully: "Created Successfully"
|
|
331
326
|
credit: Credit
|
|
@@ -392,6 +387,7 @@ en:
|
|
|
392
387
|
enter_exactly_as_shown_on_card: Please enter exactly as shown on the card
|
|
393
388
|
enter_at_least_five_letters: Enter at least five letters of customer name
|
|
394
389
|
enter_password_to_confirm: "(we need your current password to confirm your changes)"
|
|
390
|
+
enter_token: Enter Token
|
|
395
391
|
environment: "Environment"
|
|
396
392
|
error: error
|
|
397
393
|
errors:
|
|
@@ -463,6 +459,9 @@ en:
|
|
|
463
459
|
image: Image
|
|
464
460
|
images: Images
|
|
465
461
|
images_for: "Images for"
|
|
462
|
+
image_settings: "Image Settings"
|
|
463
|
+
image_settings_updated: "Image Settings successfully updated."
|
|
464
|
+
image_settings_warning: "You will need to regenerate thumbnails if you update the paperclip styles. Use rake paperclip:refresh:thumbnails to do this."
|
|
466
465
|
in_progress: "In Progress"
|
|
467
466
|
include_in_shipment: Include in Shipment
|
|
468
467
|
included_in_other_shipment: Included in another Shipment
|
|
@@ -486,6 +485,7 @@ en:
|
|
|
486
485
|
item_total: "Item Total"
|
|
487
486
|
last_name: "Last Name"
|
|
488
487
|
last_name_begins_with: "Last Name Begins With"
|
|
488
|
+
learn_more: Learn More
|
|
489
489
|
leave_blank_to_not_change: "(leave blank if you don't want to change it)"
|
|
490
490
|
list: List
|
|
491
491
|
listing_categories: "Listing Categories"
|
|
@@ -573,7 +573,6 @@ en:
|
|
|
573
573
|
none_available: "None Available"
|
|
574
574
|
normal_amount: "Normal Amount"
|
|
575
575
|
not: not
|
|
576
|
-
not_available: "N/A"
|
|
577
576
|
not_found: "%{resource} is not found"
|
|
578
577
|
not_shown: "Not Shown"
|
|
579
578
|
note: Note
|
|
@@ -594,6 +593,7 @@ en:
|
|
|
594
593
|
option_values: "Option Values"
|
|
595
594
|
options: Options
|
|
596
595
|
or: or
|
|
596
|
+
or_over_price: "%{price} or over"
|
|
597
597
|
order: Order
|
|
598
598
|
order_confirmation_note: ""
|
|
599
599
|
order_date: "Order Date"
|
|
@@ -628,12 +628,17 @@ en:
|
|
|
628
628
|
order_total: "Order Total"
|
|
629
629
|
order_total_message: "The total amount charged to your card will be"
|
|
630
630
|
order_updated: "Order Updated"
|
|
631
|
-
|
|
631
|
+
orders: Orders
|
|
632
632
|
other_payment_options: Other Payment Options
|
|
633
633
|
out_of_stock: "Out of Stock"
|
|
634
634
|
over_paid: "Over Paid"
|
|
635
|
+
overview: Overview
|
|
635
636
|
page_only_viewable_when_logged_in: You attempted to visit a page which can only be viewed when you are logged in
|
|
636
637
|
page_only_viewable_when_logged_out: You attempted to visit a page which can only be viewed when you are logged out
|
|
638
|
+
pagination:
|
|
639
|
+
previous_page: "« previous page"
|
|
640
|
+
next_page: "next page »"
|
|
641
|
+
truncate: "…"
|
|
637
642
|
paid: Paid
|
|
638
643
|
parent_category: "Parent Category"
|
|
639
644
|
password: Password
|
|
@@ -706,18 +711,12 @@ en:
|
|
|
706
711
|
description: "Scopes for selecting products based on option and property values"
|
|
707
712
|
name: Values
|
|
708
713
|
scopes:
|
|
709
|
-
ascend_by_master_price:
|
|
710
|
-
name: Ascend by product master price
|
|
711
714
|
ascend_by_name:
|
|
712
715
|
name: Ascend by product name
|
|
713
716
|
ascend_by_updated_at:
|
|
714
717
|
name: Ascend by actualization date
|
|
715
|
-
descend_by_master_price:
|
|
716
|
-
name: Descend by product master price
|
|
717
718
|
descend_by_name:
|
|
718
719
|
name: Descend by product name
|
|
719
|
-
descend_by_popularity:
|
|
720
|
-
name: Sort by popularity(most popular first)
|
|
721
720
|
descend_by_updated_at:
|
|
722
721
|
name: Descend by actualization date
|
|
723
722
|
in_name:
|
|
@@ -854,6 +853,12 @@ en:
|
|
|
854
853
|
rma_number: RMA Number
|
|
855
854
|
rma_value: RMA Value
|
|
856
855
|
roles: Roles
|
|
856
|
+
s3_access_key: "Access Key"
|
|
857
|
+
s3_bucket: "Bucket"
|
|
858
|
+
s3_headers: "S3 Headers"
|
|
859
|
+
s3_secret: "Secret Key"
|
|
860
|
+
s3_used_for_product_images: "S3 is being used for product images"
|
|
861
|
+
s3_not_used_for_product_images: "S3 is not being used for product images"
|
|
857
862
|
sales_tax: "Sales Tax"
|
|
858
863
|
sales_total: "Sales Total"
|
|
859
864
|
sales_total_description: "Sales Total For All Orders"
|
|
@@ -911,6 +916,7 @@ en:
|
|
|
911
916
|
shipping_total: "Shipping Total"
|
|
912
917
|
shop_by_taxonomy: "Shop by %{taxonomy}"
|
|
913
918
|
shopping_cart: "Shopping Cart"
|
|
919
|
+
short_description: "Short description"
|
|
914
920
|
show: Show
|
|
915
921
|
show_active: "Show Active"
|
|
916
922
|
show_deleted: "Show Deleted"
|
|
@@ -936,8 +942,6 @@ en:
|
|
|
936
942
|
special_instructions: "Special Instructions"
|
|
937
943
|
spree:
|
|
938
944
|
date: Date
|
|
939
|
-
date_picker:
|
|
940
|
-
format: 'yy/mm/dd'
|
|
941
945
|
time: Time
|
|
942
946
|
spree_gateway_error_flash_for_checkout: "There was a problem with your payment information. Please check your information and try again."
|
|
943
947
|
spree_inventory_error_flash_for_insufficient_quantity: "An item in your cart has become unavailable."
|
|
@@ -1011,8 +1015,8 @@ en:
|
|
|
1011
1015
|
unable_to_capture_credit_card: "Unable to Capture Credit Card"
|
|
1012
1016
|
unable_to_connect_to_gateway: "Unable to connect to gateway."
|
|
1013
1017
|
unable_to_save_order: "Unable to Save Order"
|
|
1014
|
-
under_paid: "Under Paid"
|
|
1015
1018
|
under_price: "Under %{price}"
|
|
1019
|
+
under_paid: "Under Paid"
|
|
1016
1020
|
unrecognized_card_type: Unrecognized card type
|
|
1017
1021
|
update: Update
|
|
1018
1022
|
update_password: "Update my password and log me in"
|
|
@@ -1023,6 +1027,7 @@ en:
|
|
|
1023
1027
|
use_billing_address: Use Billing Address
|
|
1024
1028
|
use_different_shipping_address: "Use Different Shipping Address"
|
|
1025
1029
|
use_new_cc: "Use a new card"
|
|
1030
|
+
use_s3: "Use Amazon S3 For Images"
|
|
1026
1031
|
user: User
|
|
1027
1032
|
user_account: User Account
|
|
1028
1033
|
user_created_successfully: "User created successfully"
|
data/config/routes.rb
CHANGED
|
@@ -11,9 +11,9 @@ Spree::Core::Engine.routes.draw do
|
|
|
11
11
|
resources :states, :only => :index
|
|
12
12
|
|
|
13
13
|
# non-restful checkout stuff
|
|
14
|
-
match '/checkout/update/:state', :to => 'checkout#update', :as => :update_checkout
|
|
15
|
-
match '/checkout/:state', :to => 'checkout#edit', :as => :checkout_state
|
|
16
|
-
match '/checkout', :to => 'checkout#edit', :state => 'address', :as => :checkout
|
|
14
|
+
match '/checkout/update/:state', :to => 'checkout#update', :as => :update_checkout
|
|
15
|
+
match '/checkout/:state', :to => 'checkout#edit', :as => :checkout_state
|
|
16
|
+
match '/checkout', :to => 'checkout#edit', :state => 'address', :as => :checkout
|
|
17
17
|
|
|
18
18
|
resources :orders do
|
|
19
19
|
post :populate, :on => :collection
|
|
@@ -40,12 +40,6 @@ Spree::Core::Engine.routes.draw do
|
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
# # Search routes
|
|
44
|
-
match 's/*product_group_query', :to => 'products#index', :as => :simple_search
|
|
45
|
-
match '/pg/:product_group_name', :to => 'products#index', :as => :pg_search
|
|
46
|
-
match '/t/*id/s/*product_group_query', :to => 'taxons#show', :as => :taxons_search
|
|
47
|
-
match 't/*id/pg/:product_group_name', :to => 'taxons#show', :as => :taxons_pg_search
|
|
48
|
-
|
|
49
43
|
# # route globbing for pretty nested taxon and product paths
|
|
50
44
|
match '/t/*id', :to => 'taxons#show', :as => :nested_taxons
|
|
51
45
|
#
|
|
@@ -130,6 +124,7 @@ Spree::Core::Engine.routes.draw do
|
|
|
130
124
|
end
|
|
131
125
|
|
|
132
126
|
resource :inventory_settings
|
|
127
|
+
resource :image_settings
|
|
133
128
|
resources :google_analytics
|
|
134
129
|
|
|
135
130
|
resources :orders do
|
|
@@ -178,6 +173,7 @@ Spree::Core::Engine.routes.draw do
|
|
|
178
173
|
resources :reports, :only => [:index, :show] do
|
|
179
174
|
collection do
|
|
180
175
|
get :sales_total
|
|
176
|
+
post :sales_total
|
|
181
177
|
end
|
|
182
178
|
end
|
|
183
179
|
|
|
@@ -187,10 +183,6 @@ Spree::Core::Engine.routes.draw do
|
|
|
187
183
|
resources :tax_rates
|
|
188
184
|
resource :tax_settings
|
|
189
185
|
resources :calculators
|
|
190
|
-
resources :product_groups do
|
|
191
|
-
resources :product_scopes
|
|
192
|
-
end
|
|
193
|
-
|
|
194
186
|
|
|
195
187
|
resources :trackers
|
|
196
188
|
resources :payment_methods
|
|
@@ -38,7 +38,7 @@ class MigrateTransactionsToPaymentState < ActiveRecord::Migration
|
|
|
38
38
|
:avs_response => tx.avs_response, :response_code => tx.response_code
|
|
39
39
|
)
|
|
40
40
|
end
|
|
41
|
-
credited.each
|
|
41
|
+
credited.each(&:destroy)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def migrate_voided_transactions
|
|
@@ -49,7 +49,7 @@ class MigrateTransactionsToPaymentState < ActiveRecord::Migration
|
|
|
49
49
|
unless voided.empty?
|
|
50
50
|
all_but_credited = [AUTHORIZED, COMPLETED, PURCHASED, VOIDED]
|
|
51
51
|
voided_and_subsequent_transactions = Transaction.find_by_sql("SELECT * FROM transactions WHERE payment_id IN (#{voided.map(&:payment_id).join(',')}) AND txn_type IN (#{all_but_credited.join(',')})")
|
|
52
|
-
voided_and_subsequent_transactions.each
|
|
52
|
+
voided_and_subsequent_transactions.each(&:destroy)
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -66,7 +66,7 @@ class MigrateTransactionsToPaymentState < ActiveRecord::Migration
|
|
|
66
66
|
txs.each do |tx|
|
|
67
67
|
update_payment(tx, PAYMENT_COMPLETE)
|
|
68
68
|
end
|
|
69
|
-
txs.each
|
|
69
|
+
txs.each(&:destroy)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def migrate_authorized_only_transactions
|
|
@@ -79,7 +79,7 @@ class MigrateTransactionsToPaymentState < ActiveRecord::Migration
|
|
|
79
79
|
authorized_only.each do |tx|
|
|
80
80
|
update_payment(tx, PAYMENT_PENDING)
|
|
81
81
|
end
|
|
82
|
-
authorized_only.each
|
|
82
|
+
authorized_only.each(&:destroy)
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
def update_payment(tx, state)
|
|
@@ -22,11 +22,8 @@ class NamespaceTopLevelModels < ActiveRecord::Migration
|
|
|
22
22
|
rename_table :payment_methods, :spree_payment_methods
|
|
23
23
|
rename_table :preferences, :spree_preferences
|
|
24
24
|
rename_table :products, :spree_products
|
|
25
|
-
rename_table :product_groups, :spree_product_groups
|
|
26
|
-
rename_table :product_groups_products, :spree_product_groups_products
|
|
27
25
|
rename_table :product_option_types, :spree_product_option_types
|
|
28
26
|
rename_table :product_properties, :spree_product_properties
|
|
29
|
-
rename_table :product_scopes, :spree_product_scopes
|
|
30
27
|
rename_table :products_taxons, :spree_products_taxons
|
|
31
28
|
rename_table :properties, :spree_properties
|
|
32
29
|
rename_table :prototypes, :spree_prototypes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
class MigrateImagesFromProductsToVariants < ActiveRecord::Migration
|
|
2
|
+
def up
|
|
3
|
+
images = select_all("SELECT spree_assets.* FROM spree_assets
|
|
4
|
+
WHERE spree_assets.type IN ('Spree::Image')
|
|
5
|
+
AND spree_assets.viewable_type = 'Spree::Product'")
|
|
6
|
+
|
|
7
|
+
images.each do |image|
|
|
8
|
+
master_variant_id = select_value("SELECT id FROM spree_variants
|
|
9
|
+
WHERE product_id = #{image['viewable_id']}
|
|
10
|
+
AND is_master = #{quoted_true}")
|
|
11
|
+
|
|
12
|
+
execute("UPDATE spree_assets SET viewable_type = 'Spree::Variant', viewable_id = #{master_variant_id}
|
|
13
|
+
WHERE id = #{image['id']}") if master_variant_id
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def down
|
|
18
|
+
images = select_all("SELECT spree_assets.* FROM spree_assets
|
|
19
|
+
JOIN spree_variants
|
|
20
|
+
ON spree_variants.id = spree_assets.viewable_id
|
|
21
|
+
AND spree_variants.is_master = #{quote_true}
|
|
22
|
+
WHERE spree_assets.type IN ('Spree::Image')
|
|
23
|
+
AND spree_assets.viewable_type = 'Spree::Variant'")
|
|
24
|
+
|
|
25
|
+
images.each do |image|
|
|
26
|
+
product_id = select_value("SELECT spree_products.id FROM spree_products
|
|
27
|
+
JOIN spree_variants
|
|
28
|
+
ON spree_variants.id = #{image['viewable_id']}
|
|
29
|
+
AND spree_products.id = spree_variants.product_id")
|
|
30
|
+
|
|
31
|
+
execute("UPDATE spree_assets SET viewable_type = 'Spree::Product', viewable_id = #{product_id}
|
|
32
|
+
WHERE id = #{image['id']}") if product_id
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|