workarea-storefront 3.4.45 → 3.5.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +52 -0
- data/app/assets/javascripts/workarea/storefront/application.js.erb +2 -12
- data/app/assets/javascripts/workarea/storefront/config.js.erb +0 -5
- data/app/assets/javascripts/workarea/storefront/modules/{analytics.js → analytics.js.erb} +17 -0
- data/app/assets/javascripts/workarea/storefront/modules/dialog_buttons.js +1 -1
- data/app/assets/javascripts/workarea/storefront/modules/workarea_analytics.js +4 -0
- data/app/assets/stylesheets/workarea/storefront/application.scss.erb +0 -2
- data/app/assets/stylesheets/workarea/storefront/email/_base.scss +9 -1
- data/app/assets/stylesheets/workarea/storefront/email/_components.scss +1 -1
- data/app/assets/stylesheets/workarea/storefront/email/_helpers.scss +16 -0
- data/app/assets/stylesheets/workarea/storefront/email/{_settings.scss → _settings.scss.erb} +1 -1
- data/app/controllers/workarea/storefront/analytics_controller.rb +36 -21
- data/app/controllers/workarea/storefront/application_controller.rb +2 -4
- data/app/controllers/workarea/storefront/cart_items_controller.rb +1 -2
- data/app/controllers/workarea/storefront/checkout/addresses_controller.rb +0 -2
- data/app/controllers/workarea/storefront/checkouts_controller.rb +6 -4
- data/app/controllers/workarea/storefront/content_areas_controller.rb +1 -0
- data/app/controllers/workarea/storefront/content_blocks_controller.rb +1 -0
- data/app/controllers/workarea/storefront/current_checkout.rb +20 -14
- data/app/controllers/workarea/storefront/downloads_controller.rb +18 -0
- data/app/controllers/workarea/storefront/email_signups_controller.rb +1 -0
- data/app/controllers/workarea/storefront/errors_controller.rb +6 -0
- data/app/controllers/workarea/storefront/recent_views_controller.rb +2 -35
- data/app/controllers/workarea/storefront/recommendations_controller.rb +2 -2
- data/app/controllers/workarea/storefront/searches_controller.rb +0 -11
- data/app/controllers/workarea/storefront/users/accounts_controller.rb +2 -7
- data/app/controllers/workarea/storefront/users/credit_cards_controller.rb +5 -2
- data/app/controllers/workarea/storefront/users/passwords_controller.rb +1 -5
- data/app/helpers/workarea/storefront/application_helper.rb +19 -3
- data/app/helpers/workarea/storefront/content_helper.rb +1 -1
- data/app/helpers/workarea/storefront/favicons_helper.rb +6 -7
- data/app/helpers/workarea/storefront/navigation_helper.rb +10 -0
- data/app/helpers/workarea/storefront/schema_org_helper.rb +156 -0
- data/app/mailers/workarea/storefront/application_mailer.rb +1 -0
- data/app/view_models/workarea/storefront/category_view_model.rb +2 -2
- data/app/view_models/workarea/storefront/content_block_view_model.rb +41 -10
- data/app/view_models/workarea/storefront/content_blocks/product_insights_view_model.rb +1 -1
- data/app/view_models/workarea/storefront/display_content.rb +3 -1
- data/app/view_models/workarea/storefront/inquiry_view_model.rb +1 -7
- data/app/view_models/workarea/storefront/inventory_status_view_model.rb +10 -6
- data/app/view_models/workarea/storefront/order_item_view_model.rb +14 -0
- data/app/view_models/workarea/storefront/product_view_model.rb +22 -4
- data/app/view_models/workarea/storefront/recommendations_view_model.rb +8 -4
- data/app/view_models/workarea/storefront/search_view_model.rb +1 -1
- data/app/view_models/workarea/storefront/user_activity_view_model.rb +6 -17
- data/app/views/layouts/workarea/storefront/application.html.haml +13 -17
- data/app/views/layouts/workarea/storefront/checkout.html.haml +1 -1
- data/app/views/layouts/workarea/storefront/content_preview.html.haml +1 -0
- data/app/views/layouts/workarea/storefront/email.html.haml +33 -26
- data/app/views/layouts/workarea/storefront/empty.html.haml +1 -0
- data/app/views/layouts/workarea/storefront/navigation.html.haml +1 -1
- data/app/views/workarea/storefront/account_mailer/creation.html.haml +2 -0
- data/app/views/workarea/storefront/account_mailer/password_reset.html.haml +2 -0
- data/app/views/workarea/storefront/cart_items/create.html.haml +1 -1
- data/app/views/workarea/storefront/carts/show.html.haml +1 -1
- data/app/views/workarea/storefront/categories/show.html.haml +3 -2
- data/app/views/workarea/storefront/checkouts/confirmation.html.haml +1 -1
- data/app/views/workarea/storefront/contacts/show.html.haml +4 -2
- data/app/views/workarea/storefront/content_areas/show.html.haml +1 -0
- data/app/views/workarea/storefront/content_blocks/_category_summary.html.haml +2 -1
- data/app/views/workarea/storefront/content_blocks/_product_insights.html.haml +2 -1
- data/app/views/workarea/storefront/content_blocks/_product_list.html.haml +2 -1
- data/app/views/workarea/storefront/errors/show.html.haml +1 -0
- data/app/views/workarea/storefront/fulfillment_mailer/shipped.html.haml +3 -1
- data/app/views/workarea/storefront/order_mailer/_summary.html.haml +6 -0
- data/app/views/workarea/storefront/order_mailer/confirmation.html.haml +3 -0
- data/app/views/workarea/storefront/order_mailer/reminder.html.haml +3 -0
- data/app/views/workarea/storefront/orders/_summary.html.haml +3 -1
- data/app/views/workarea/storefront/orders/show.html.haml +3 -3
- data/app/views/workarea/storefront/pages/home_page.html.haml +4 -0
- data/app/views/workarea/storefront/pages/robots.text.erb +0 -1
- data/app/views/workarea/storefront/pages/show.html.haml +1 -0
- data/app/views/workarea/storefront/products/_price.html.haml +1 -2
- data/app/views/workarea/storefront/products/_pricing.html.haml +12 -6
- data/app/views/workarea/storefront/products/_summary.html.haml +3 -3
- data/app/views/workarea/storefront/products/show.html.haml +6 -4
- data/app/views/workarea/storefront/products/templates/_generic.html.haml +5 -5
- data/app/views/workarea/storefront/products/templates/_option_selects.html.haml +5 -7
- data/app/views/workarea/storefront/products/templates/_option_thumbnails.html.haml +5 -7
- data/app/views/workarea/storefront/recent_views/aside.html.haml +3 -10
- data/app/views/workarea/storefront/recent_views/narrow.html.haml +3 -10
- data/app/views/workarea/storefront/recent_views/show.html.haml +3 -10
- data/app/views/workarea/storefront/recommendations/show.html.haml +1 -1
- data/app/views/workarea/storefront/searches/show.html.haml +4 -5
- data/app/views/workarea/storefront/users/accounts/edit.html.haml +3 -3
- data/app/views/workarea/storefront/users/accounts/show.html.haml +3 -3
- data/app/views/workarea/storefront/users/addresses/edit.html.haml +3 -3
- data/app/views/workarea/storefront/users/addresses/new.html.haml +3 -3
- data/app/views/workarea/storefront/users/credit_cards/edit.html.haml +3 -3
- data/app/views/workarea/storefront/users/credit_cards/new.html.haml +3 -3
- data/app/views/workarea/storefront/users/orders/index.html.haml +3 -3
- data/app/views/workarea/storefront/users/orders/show.html.haml +4 -4
- data/app/views/workarea/storefront/users/passwords/new.html.haml +3 -3
- data/config/locales/en.yml +16 -3
- data/config/routes.rb +4 -2
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/test/helpers/workarea/storefront/content_helper_test.rb +1 -0
- data/test/helpers/workarea/storefront/navigation_helper_test.rb +4 -0
- data/test/helpers/workarea/storefront/schema_org_helper_test.rb +27 -0
- data/test/integration/workarea/storefront/analytics_integration_test.rb +44 -4
- data/test/integration/workarea/storefront/cart_items_integration_test.rb +0 -12
- data/test/integration/workarea/storefront/categories_integration_test.rb +0 -10
- data/test/integration/workarea/storefront/checkout_side_effects_integration_test.rb +15 -1
- data/test/integration/workarea/storefront/checkouts_integration_test.rb +68 -11
- data/test/integration/workarea/storefront/contact_form_integration_test.rb +18 -20
- data/test/integration/workarea/storefront/content_blocks_integration_test.rb +1 -4
- data/test/integration/workarea/storefront/current_checkout_integration_test.rb +53 -2
- data/test/integration/workarea/storefront/downloads_integration_test.rb +38 -0
- data/test/integration/workarea/storefront/email_signups_integration_test.rb +2 -0
- data/test/integration/workarea/storefront/guest_browsing_integration_test.rb +2 -2
- data/test/integration/workarea/storefront/impersonations_integration_test.rb +2 -2
- data/test/integration/workarea/storefront/login_integration_test.rb +3 -9
- data/test/integration/workarea/storefront/order_data_integration_test.rb +1 -9
- data/test/integration/workarea/storefront/place_order_integration_test.rb +5 -7
- data/test/integration/workarea/storefront/placing_order_integration_test.rb +1 -1
- data/test/integration/workarea/storefront/recent_views_integration_test.rb +29 -0
- data/test/integration/workarea/storefront/releases_integration_test.rb +132 -0
- data/test/integration/workarea/storefront/search_integration_test.rb +0 -46
- data/test/integration/workarea/storefront/segment_overrides_integration_test.rb +48 -0
- data/test/integration/workarea/storefront/segments_integration_test.rb +250 -0
- data/test/integration/workarea/storefront/store_credit_integration_test.rb +1 -1
- data/test/integration/workarea/storefront/users/credit_cards_integration_test.rb +2 -2
- data/test/integration/workarea/storefront/users/passwords_integration_test.rb +0 -19
- data/test/javascripts/traffic_referrer_spec.js +1 -1
- data/test/mailers/workarea/storefront/transactional_mailer_test.rb +9 -13
- data/test/system/workarea/storefront/analytics_system_test.rb +54 -40
- data/test/system/workarea/storefront/content_system_test.rb +10 -1
- data/test/system/workarea/storefront/digital_products_system_test.rb +2 -0
- data/test/system/workarea/storefront/download_system_test.rb +145 -0
- data/test/system/workarea/storefront/guest_checkout_system_test.rb +20 -0
- data/test/system/workarea/storefront/logged_in_checkout_system_test.rb +31 -32
- data/test/system/workarea/storefront/passwords_system_test.rb +35 -37
- data/test/system/workarea/storefront/pricing_overrides_system_test.rb +13 -2
- data/test/system/workarea/storefront/segment_overrides_system_test.rb +69 -0
- data/test/view_models/workarea/storefront/category_view_model_test.rb +20 -0
- data/test/view_models/workarea/storefront/content_block_view_model_test.rb +135 -3
- data/test/view_models/workarea/storefront/display_content_test.rb +4 -0
- data/test/view_models/workarea/storefront/product_view_model/option_set_test.rb +7 -8
- data/test/view_models/workarea/storefront/product_view_model_test.rb +17 -10
- data/test/view_models/workarea/storefront/search_view_model_test.rb +0 -6
- data/test/view_models/workarea/storefront/user_activity_view_model_test.rb +18 -20
- metadata +20 -22
- data/app/assets/javascripts/workarea/storefront/modules/recent_views.js +0 -25
- data/app/assets/javascripts/workarea/storefront/modules/search_fields.js +0 -59
- data/app/assets/javascripts/workarea/storefront/templates/ui_menu_heading.jst.ejs +0 -1
- data/app/assets/javascripts/workarea/storefront/templates/ui_menu_item.jst.ejs +0 -8
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_autocomplete.scss +0 -17
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_menu.scss +0 -40
- data/app/controllers/workarea/storefront/http_caching.rb +0 -33
- data/app/controllers/workarea/storefront/user_activity.rb +0 -19
- data/app/view_models/workarea/storefront/search_suggestion_view_model.rb +0 -87
- data/app/views/workarea/storefront/searches/index.json.jbuilder +0 -1
- data/app/views/workarea/storefront/style_guides/components/_ui_autocomplete.html.haml +0 -11
- data/test/dummy/tmp/screenshots/.keep +0 -0
- data/test/view_models/workarea/storefront/search_suggestion_view_model_test.rb +0 -42
@@ -1,11 +1,12 @@
|
|
1
|
-
- if @recent_views.products.any? || @recent_views.categories.any?
|
1
|
+
- if @recent_views.products.any? || @recent_views.categories.any?
|
2
2
|
.recent-views.recent-views--aside
|
3
3
|
|
4
4
|
- if @recent_views.products.any?
|
5
5
|
.recent-views__section.recent-views__section--products
|
6
6
|
%h2.recent-views__heading= t('workarea.storefront.recommendations.recent_products')
|
7
7
|
- @recent_views.products.each do |product|
|
8
|
-
|
8
|
+
= render_schema_org(product_schema(product))
|
9
|
+
.product-summary.product-summary--small
|
9
10
|
= render 'workarea/storefront/products/summary', product: product
|
10
11
|
|
11
12
|
- if @recent_views.categories.any?
|
@@ -15,11 +16,3 @@
|
|
15
16
|
- @recent_views.categories.each do |category|
|
16
17
|
%li.recent-views__item
|
17
18
|
= link_to category.name, category_path(category), class: 'recent-views__link'
|
18
|
-
|
19
|
-
- if @recent_views.searches.any?
|
20
|
-
.recent-views__section.recent-views__section--searches
|
21
|
-
%h2.recent-views__heading= t('workarea.storefront.recommendations.recent_searches')
|
22
|
-
%ul.recent-views__list
|
23
|
-
- @recent_views.searches.each do |search|
|
24
|
-
%li.recent-views__item
|
25
|
-
= link_to search, search_path(q: search), class: 'recent-views__link'
|
@@ -1,11 +1,12 @@
|
|
1
|
-
- if @recent_views.products.any? || @recent_views.categories.any?
|
1
|
+
- if @recent_views.products.any? || @recent_views.categories.any?
|
2
2
|
.recent-views
|
3
3
|
|
4
4
|
- if @recent_views.products.any?
|
5
5
|
.recent-views__section.recent-views__section--products
|
6
6
|
%h2.recent-views__heading= t('workarea.storefront.recommendations.recent_products')
|
7
7
|
- @recent_views.products.each do |product|
|
8
|
-
|
8
|
+
= render_schema_org(product_schema(product))
|
9
|
+
.product-summary.product-summary--small
|
9
10
|
= render 'workarea/storefront/products/summary', product: product
|
10
11
|
|
11
12
|
- if @recent_views.categories.any?
|
@@ -15,11 +16,3 @@
|
|
15
16
|
- @recent_views.categories.each do |category|
|
16
17
|
%li.recent-views__item
|
17
18
|
= link_to category.name, category_path(category), class: 'recent-views__link'
|
18
|
-
|
19
|
-
- if @recent_views.searches.any?
|
20
|
-
.recent-views__section.recent-views__section--searches
|
21
|
-
%h2.recent-views__heading= t('workarea.storefront.recommendations.recent_searches')
|
22
|
-
%ul.recent-views__list
|
23
|
-
- @recent_views.searches.each do |search|
|
24
|
-
%li.recent-views__item
|
25
|
-
= link_to search, search_path(q: search), class: 'recent-views__link'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
- if @recent_views.products.any? || @recent_views.categories.any?
|
1
|
+
- if @recent_views.products.any? || @recent_views.categories.any?
|
2
2
|
.recent-views
|
3
3
|
|
4
4
|
- if @recent_views.products.any?
|
@@ -6,8 +6,9 @@
|
|
6
6
|
%h2.recent-views__heading= t('workarea.storefront.recommendations.recent_products')
|
7
7
|
.grid
|
8
8
|
- @recent_views.products.each do |product|
|
9
|
+
= render_schema_org(product_schema(product))
|
9
10
|
.grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
|
10
|
-
.product-summary.product-summary--small
|
11
|
+
.product-summary.product-summary--small
|
11
12
|
= render 'workarea/storefront/products/summary', product: product
|
12
13
|
|
13
14
|
- if @recent_views.categories.any?
|
@@ -17,11 +18,3 @@
|
|
17
18
|
- @recent_views.categories.each do |category|
|
18
19
|
%li.recent-views__item
|
19
20
|
= link_to category.name, category_path(category), class: 'recent-views__link'
|
20
|
-
|
21
|
-
- if @recent_views.searches.any?
|
22
|
-
.recent-views__section.recent-views__section--searches
|
23
|
-
%h2.recent-views__heading= t('workarea.storefront.recommendations.recent_searches')
|
24
|
-
%ul.recent-views__list
|
25
|
-
- @recent_views.searches.each do |search|
|
26
|
-
%li.recent-views__item
|
27
|
-
= link_to search, search_path(q: search), class: 'recent-views__link'
|
@@ -8,5 +8,5 @@
|
|
8
8
|
.grid
|
9
9
|
- @recommendations.each do |product|
|
10
10
|
.grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
|
11
|
-
.product-summary.product-summary--small
|
11
|
+
.product-summary.product-summary--small
|
12
12
|
= render 'workarea/storefront/products/summary', product: product
|
@@ -1,7 +1,6 @@
|
|
1
1
|
- @title = t('workarea.storefront.searches.title')
|
2
2
|
|
3
3
|
- content_for :head do
|
4
|
-
%meta{ property: 'recent-view', content: recent_view_content(search: @search.query_string) }
|
5
4
|
%meta{ name: 'robots', content: 'noindex' }
|
6
5
|
= append_partials('storefront.search_head', search: @search)
|
7
6
|
|
@@ -13,11 +12,11 @@
|
|
13
12
|
|
14
13
|
- content_for :breadcrumbs do
|
15
14
|
%p.breadcrumbs__node-group
|
16
|
-
%span.breadcrumbs__node
|
15
|
+
%span.breadcrumbs__node
|
17
16
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
18
|
-
%span.breadcrumbs__node
|
17
|
+
%span.breadcrumbs__node
|
19
18
|
%span.breadcrumbs__text= t('workarea.storefront.searches.title')
|
20
|
-
%span.breadcrumbs__node
|
19
|
+
%span.breadcrumbs__node
|
21
20
|
%span.breadcrumbs__text= @search.query_string
|
22
21
|
|
23
22
|
- content_for :page_aside do
|
@@ -92,7 +91,7 @@
|
|
92
91
|
= append_partials('storefront.search_grid_item', product: product, position: position)
|
93
92
|
|
94
93
|
.grid__cell.grid__cell--50.grid__cell--25-at-medium.grid__cell--20-at-wide{ data: { pagination_item: '' } }
|
95
|
-
.product-summary{
|
94
|
+
.product-summary{ data: { search_results_product_grid_summary: { id: product.catalog_id, position: position }.to_json } }
|
96
95
|
= render 'workarea/storefront/products/summary', product: product
|
97
96
|
- if show_pagination?(@search.products)
|
98
97
|
.pagination__button
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
= link_to t('workarea.storefront.users.account'), users_account_path, class: 'breadcrumbs__link'
|
9
|
-
%span.breadcrumbs__node
|
9
|
+
%span.breadcrumbs__node
|
10
10
|
%span.breadcrumbs__text= t('workarea.storefront.users.edit_title')
|
11
11
|
|
12
12
|
.view
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
%span.breadcrumbs__text= t('workarea.storefront.users.account')
|
9
9
|
|
10
10
|
.view
|
@@ -114,5 +114,5 @@
|
|
114
114
|
.grid
|
115
115
|
- @recommendations.each do |product|
|
116
116
|
.grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
|
117
|
-
.product-summary.product-summary--small
|
117
|
+
.product-summary.product-summary--small
|
118
118
|
= render 'workarea/storefront/products/summary', product: product
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
= link_to t('workarea.storefront.users.account'), users_account_path, class: 'breadcrumbs__link'
|
9
|
-
%span.breadcrumbs__node
|
9
|
+
%span.breadcrumbs__node
|
10
10
|
%span.breadcrumbs__text= t('workarea.storefront.users.edit_address')
|
11
11
|
|
12
12
|
.view
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
= link_to t('workarea.storefront.users.account'), users_account_path, class: 'breadcrumbs__link'
|
9
|
-
%span.breadcrumbs__node
|
9
|
+
%span.breadcrumbs__node
|
10
10
|
%span.breadcrumbs__text= t('workarea.storefront.users.add_address')
|
11
11
|
|
12
12
|
.view
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
= link_to t('workarea.storefront.users.account'), users_account_path, class: 'breadcrumbs__link'
|
9
|
-
%span.breadcrumbs__node
|
9
|
+
%span.breadcrumbs__node
|
10
10
|
%span.breadcrumbs__text= t('workarea.storefront.users.edit_credit_card')
|
11
11
|
|
12
12
|
.view
|
@@ -3,11 +3,11 @@
|
|
3
3
|
|
4
4
|
- content_for :breadcrumbs do
|
5
5
|
%p.breadcrumbs__node-group
|
6
|
-
%span.breadcrumbs__node
|
6
|
+
%span.breadcrumbs__node
|
7
7
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
8
|
-
%span.breadcrumbs__node
|
8
|
+
%span.breadcrumbs__node
|
9
9
|
= link_to t('workarea.storefront.users.account'), users_account_path, class: 'breadcrumbs__link'
|
10
|
-
%span.breadcrumbs__node
|
10
|
+
%span.breadcrumbs__node
|
11
11
|
%span.breadcrumbs__text= t('workarea.storefront.users.add_credit_card')
|
12
12
|
|
13
13
|
.view
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
= link_to t('workarea.storefront.users.account'), users_account_path, class: 'breadcrumbs__link'
|
9
|
-
%span.breadcrumbs__node
|
9
|
+
%span.breadcrumbs__node
|
10
10
|
%span.breadcrumbs__text= t('workarea.storefront.users.order_history')
|
11
11
|
|
12
12
|
.view
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
= link_to t('workarea.storefront.users.account'), users_account_path, class: 'breadcrumbs__link'
|
9
|
-
%span.breadcrumbs__node
|
9
|
+
%span.breadcrumbs__node
|
10
10
|
= link_to t('workarea.storefront.users.order_history'), users_orders_path, class: 'breadcrumbs__link'
|
11
|
-
%span.breadcrumbs__node
|
11
|
+
%span.breadcrumbs__node
|
12
12
|
%span.breadcrumbs__text= t('workarea.storefront.users.order_details')
|
13
13
|
|
14
14
|
.view
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
- content_for :breadcrumbs do
|
4
4
|
%p.breadcrumbs__node-group
|
5
|
-
%span.breadcrumbs__node
|
5
|
+
%span.breadcrumbs__node
|
6
6
|
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
|
7
|
-
%span.breadcrumbs__node
|
7
|
+
%span.breadcrumbs__node
|
8
8
|
= link_to t('workarea.storefront.users.login'), login_path, class: 'breadcrumbs__link'
|
9
|
-
%span.breadcrumbs__node
|
9
|
+
%span.breadcrumbs__node
|
10
10
|
%span.breadcrumbs__text= t('workarea.storefront.users.forgot_password')
|
11
11
|
|
12
12
|
.view
|
data/config/locales/en.yml
CHANGED
@@ -127,10 +127,14 @@ en:
|
|
127
127
|
info_text: You can update your information at any time by visiting
|
128
128
|
closing_html: Have a great day!
|
129
129
|
closing_text: Have a great day!
|
130
|
+
email_action:
|
131
|
+
name: View Account
|
130
132
|
password_reset:
|
131
133
|
subject: Reset Your Password
|
132
134
|
info_html: Click this link to reset your password
|
133
135
|
info_text: Click this link to reset your password
|
136
|
+
email_action:
|
137
|
+
name: Reset Password
|
134
138
|
inquiry:
|
135
139
|
heading: Customer Service Inquiry on %{subject}
|
136
140
|
name: Name
|
@@ -149,6 +153,8 @@ en:
|
|
149
153
|
order_confirmation:
|
150
154
|
subject: Order %{order_id} Confirmation
|
151
155
|
heading: Order %{order_id} Confirmation
|
156
|
+
email_action:
|
157
|
+
name: View Order
|
152
158
|
order_refund:
|
153
159
|
subject: Order %{order_id} Refund
|
154
160
|
heading: Order %{order_id} Refund
|
@@ -159,6 +165,9 @@ en:
|
|
159
165
|
info_html: We noticed that you didn't complete checkout, and we wanted to help. To complete your order, %{link}. Please let us know if there is any other way we can help.
|
160
166
|
info_text: We noticed that you didn't complete checkout, and we wanted to help. To complete your order, visit the link below. Please let us know if there is any other way we can help.
|
161
167
|
resume_link: resume your checkout
|
168
|
+
email_action:
|
169
|
+
name: Resume Order
|
170
|
+
description: Continue checkout to complete your order
|
162
171
|
recommendations: You may also like…
|
163
172
|
|
164
173
|
flash_messages:
|
@@ -201,14 +210,14 @@ en:
|
|
201
210
|
credit_card_update_error: There were errors updating your credit card.
|
202
211
|
credit_card_removed: Your credit card has been removed.
|
203
212
|
password_reset_expired: This password reset is expired.
|
204
|
-
password_reset_email_sent: If a valid
|
213
|
+
password_reset_email_sent: If a valid e-mail address was entered, instructions to reset your password have been sent to "%{email}"
|
205
214
|
password_reset: Your password has been reset.
|
206
215
|
old_password_invalid: Your old password is not valid.
|
207
216
|
password_required: Password is required.
|
208
217
|
items_required: You must add an item to your cart to checkout
|
209
218
|
order_custom_pricing: Your cart has custom pricing, you cannot edit the contents of your cart.
|
210
|
-
no_available_shipping_options: There are no available shipping options for your shipping address.
|
211
219
|
download_unavailable: This download is no longer available. Contact customer support for more information.
|
220
|
+
no_available_shipping_options: There are no available shipping options for your shipping adddress.
|
212
221
|
|
213
222
|
forms:
|
214
223
|
required: '*'
|
@@ -222,7 +231,8 @@ en:
|
|
222
231
|
go: Go
|
223
232
|
email_placeholder: name@example.com
|
224
233
|
confirmation_alert: Are you sure you want to delete this?
|
225
|
-
|
234
|
+
fraud:
|
235
|
+
default_message: Workarea default fraud check. Automatic no decision.
|
226
236
|
layouts:
|
227
237
|
accessibility_info: Accessibility Information
|
228
238
|
main_content: Skip to Main Content
|
@@ -238,6 +248,8 @@ en:
|
|
238
248
|
locale: Select locale
|
239
249
|
mobile_navigation: Mobile Navigation
|
240
250
|
default_meta_description: Shop online for %{site_name} products
|
251
|
+
page_title: '%{site_name}'
|
252
|
+
page_title_with_content: '%{title_content} - %{site_name}'
|
241
253
|
|
242
254
|
messages:
|
243
255
|
info: Info
|
@@ -298,6 +310,7 @@ en:
|
|
298
310
|
sku: SKU
|
299
311
|
each: each
|
300
312
|
view_order: View Order
|
313
|
+
download: Download
|
301
314
|
|
302
315
|
pagination:
|
303
316
|
loading_more: Loading More...
|
data/config/routes.rb
CHANGED
@@ -28,7 +28,6 @@ Workarea::Storefront::Engine.routes.draw do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
resource :email_signup, only: [:show, :create]
|
31
|
-
resources :searches, only: :index
|
32
31
|
resource :search, only: :show
|
33
32
|
|
34
33
|
get '/current_user', to: 'application#current_user_info', as: :current_user
|
@@ -67,7 +66,9 @@ Workarea::Storefront::Engine.routes.draw do
|
|
67
66
|
get 'confirmation', to: 'place_order#confirmation'
|
68
67
|
end
|
69
68
|
|
70
|
-
|
69
|
+
resources :downloads, only: :show
|
70
|
+
|
71
|
+
resource :recent_views, only: :show
|
71
72
|
resource :recommendations, only: :show
|
72
73
|
|
73
74
|
resource :sitemap, only: :show
|
@@ -94,6 +95,7 @@ Workarea::Storefront::Engine.routes.draw do
|
|
94
95
|
get 'style_guides/:category', to: 'style_guides#category', as: :style_guides_category
|
95
96
|
get 'style_guides/:category/:id', to: 'style_guides#show', as: :style_guide
|
96
97
|
|
98
|
+
post 'analytics/new_session', to: 'analytics#new_session', as: :analytics_new_session
|
97
99
|
post 'analytics/product_view/:product_id', to: 'analytics#product_view', as: :analytics_product_view
|
98
100
|
post 'analytics/category_view/:category_id', to: 'analytics#category_view', as: :analytics_category_view
|
99
101
|
post 'analytics/search', to: 'analytics#search', as: :analytics_search
|
@@ -15,6 +15,10 @@ module Workarea
|
|
15
15
|
|
16
16
|
taxon = Navigation::SearchResults.new(q: 'foo').taxon
|
17
17
|
assert_equal(search_path(q: 'foo'), storefront_path_for(taxon))
|
18
|
+
|
19
|
+
product = create_product
|
20
|
+
taxon = create_taxon(navigable: product)
|
21
|
+
assert_equal(storefront.product_path(product.slug), storefront_path_for(taxon))
|
18
22
|
end
|
19
23
|
|
20
24
|
def test_mobile_nav_return_path
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Storefront
|
5
|
+
class SchemaOrgHelperTest < ViewTest
|
6
|
+
include NavigationHelper
|
7
|
+
include Engine.routes.url_helpers
|
8
|
+
|
9
|
+
def test_breadcrumb_list_schema
|
10
|
+
product = create_product
|
11
|
+
category = create_category(product_ids: [product.id]) # so the product will have a parent
|
12
|
+
create_taxon(navigable: category)
|
13
|
+
|
14
|
+
view_model = ProductViewModel.wrap(product)
|
15
|
+
breadcrumbs = view_model.breadcrumbs.map { |t| [t.name, storefront_url_for(t)] }
|
16
|
+
schema = breadcrumb_list_schema(breadcrumbs)
|
17
|
+
urls = schema[:itemListElement].map { |e| e[:item][:@id] }
|
18
|
+
product_url = storefront.product_url(product, host: Workarea.config.host)
|
19
|
+
|
20
|
+
assert_equal('http://schema.org', schema[:@context])
|
21
|
+
assert_equal('BreadcrumbList', schema[:@type])
|
22
|
+
assert_equal(product_url, urls.last)
|
23
|
+
assert_includes(urls, product_url)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -4,21 +4,42 @@ module Workarea
|
|
4
4
|
module Storefront
|
5
5
|
class AnalyticsIntegrationTest < Workarea::IntegrationTest
|
6
6
|
def test_saving_product_view
|
7
|
+
post storefront.analytics_product_view_path(product_id: ' ')
|
8
|
+
assert_equal(0, Metrics::ProductByDay.count)
|
9
|
+
|
7
10
|
post storefront.analytics_product_view_path(product_id: 'foo')
|
11
|
+
|
8
12
|
assert_equal(1, Metrics::ProductByDay.first.views)
|
13
|
+
user = Metrics::User.first
|
14
|
+
assert_equal(session.id, user.id)
|
15
|
+
assert_equal(['foo'], user.viewed.product_ids)
|
9
16
|
end
|
10
17
|
|
11
18
|
def test_saving_search
|
12
|
-
post storefront.analytics_search_path(q: '
|
19
|
+
post storefront.analytics_search_path(q: ' ', total_results: '5')
|
20
|
+
assert_equal(0, Metrics::SearchByDay.count)
|
21
|
+
|
22
|
+
post storefront.analytics_search_path(q: 'foods', total_results: '5')
|
13
23
|
|
14
|
-
|
15
|
-
assert_equal(1,
|
16
|
-
assert_equal(5,
|
24
|
+
metrics = Metrics::SearchByDay.first
|
25
|
+
assert_equal(1, metrics.searches)
|
26
|
+
assert_equal(5, metrics.total_results)
|
27
|
+
|
28
|
+
user = Metrics::User.first
|
29
|
+
assert_equal(session.id, user.id)
|
30
|
+
assert_equal(['food'], user.viewed.search_ids)
|
17
31
|
end
|
18
32
|
|
19
33
|
def test_saving_category_view
|
34
|
+
post storefront.analytics_category_view_path(category_id: ' ')
|
35
|
+
assert_equal(0, Metrics::CategoryByDay.count)
|
36
|
+
|
20
37
|
post storefront.analytics_category_view_path(category_id: 'foo')
|
38
|
+
|
21
39
|
assert_equal(1, Metrics::CategoryByDay.first.views)
|
40
|
+
user = Metrics::User.first
|
41
|
+
assert_equal(session.id, user.id)
|
42
|
+
assert_equal(['foo'], user.viewed.category_ids)
|
22
43
|
end
|
23
44
|
|
24
45
|
def test_blocking_bots
|
@@ -26,6 +47,25 @@ module Workarea
|
|
26
47
|
headers: { 'HTTP_USER_AGENT' => 'Googlebot' }
|
27
48
|
|
28
49
|
assert(Metrics::ProductByDay.count.zero?)
|
50
|
+
assert(Metrics::User.count.zero?)
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_merging_metrics_on_login
|
54
|
+
create_user(email: 'bcrouse@workarea.com', password: 'W3bl1nc!')
|
55
|
+
Metrics::User.save_order(email: 'bcrouse@workarea.com', revenue: 10)
|
56
|
+
Metrics::User.save_affinity(id: 'bcrouse@workarea.com', action: :viewed, product_ids: ['bar'])
|
57
|
+
login_metrics = Metrics::User.find('bcrouse@workarea.com')
|
58
|
+
|
59
|
+
post storefront.analytics_product_view_path(product_id: 'foo')
|
60
|
+
session_metrics = Metrics::User.find(session.id)
|
61
|
+
assert_equal(['foo'], session_metrics.viewed.product_ids)
|
62
|
+
|
63
|
+
post storefront.login_path,
|
64
|
+
params: { email: 'bcrouse@workarea.com', password: 'W3bl1nc!' }
|
65
|
+
|
66
|
+
login_metrics.reload
|
67
|
+
assert_equal(1, login_metrics.orders)
|
68
|
+
assert_equal(%w(bar foo), login_metrics.viewed.product_ids)
|
29
69
|
end
|
30
70
|
end
|
31
71
|
end
|