workarea-global_e 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintrc.json +37 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  4. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  6. data/.github/workflows/ci.yml +77 -0
  7. data/.gitignore +20 -0
  8. data/.rubocop.yml +2 -0
  9. data/.ruby-version +1 -0
  10. data/CHANGELOG.md +261 -0
  11. data/Gemfile +16 -0
  12. data/README.md +39 -0
  13. data/Rakefile +59 -0
  14. data/app/assets/javascripts/workarea/storefront/global_e/modules/checkout_info_validator.js +122 -0
  15. data/app/assets/javascripts/workarea/storefront/global_e/modules/suppress_price_ranges.js +19 -0
  16. data/app/controllers/workarea/admin/country_exceptions_controller.rb +67 -0
  17. data/app/controllers/workarea/admin/fixed_prices_controller.rb +89 -0
  18. data/app/controllers/workarea/admin/orders_controller.decorator +6 -0
  19. data/app/controllers/workarea/storefront/application_controller.decorator +30 -0
  20. data/app/controllers/workarea/storefront/checkouts_controller.decorator +22 -0
  21. data/app/controllers/workarea/storefront/ge_checkouts_controller.rb +10 -0
  22. data/app/controllers/workarea/storefront/global_e_controller.rb +42 -0
  23. data/app/controllers/workarea/storefront/globale/api_controller.rb +108 -0
  24. data/app/controllers/workarea/storefront/globale/refund_controller.rb +65 -0
  25. data/app/controllers/workarea/storefront/users/logins_controller.decorator +13 -0
  26. data/app/helpers/workarea/admin/global_e_helpers.rb +28 -0
  27. data/app/models/workarea/address.decorator +11 -0
  28. data/app/models/workarea/catalog/product.decorator +14 -0
  29. data/app/models/workarea/fulfillment/status/partially_refunded.rb +13 -0
  30. data/app/models/workarea/fulfillment/status/refunded.rb +15 -0
  31. data/app/models/workarea/fulfillment.decorator +55 -0
  32. data/app/models/workarea/global_e/country_exception.rb +37 -0
  33. data/app/models/workarea/global_e/fixed_price.rb +93 -0
  34. data/app/models/workarea/global_e/order_api_events.rb +29 -0
  35. data/app/models/workarea/order/item.decorator +46 -0
  36. data/app/models/workarea/order/status/pending_global_e_fraud_check.rb +12 -0
  37. data/app/models/workarea/order.decorator +64 -0
  38. data/app/models/workarea/payment/status/global_e_appoved.rb +9 -0
  39. data/app/models/workarea/payment/status/pending_global_e_fraud_check.rb +9 -0
  40. data/app/models/workarea/payment/tender/global_e_payment.rb +16 -0
  41. data/app/models/workarea/payment.decorator +10 -0
  42. data/app/models/workarea/price_adjustment.decorator +13 -0
  43. data/app/models/workarea/price_adjustment_set.decorator +25 -0
  44. data/app/models/workarea/pricing/calculators/item_calculator.decorator +48 -0
  45. data/app/models/workarea/pricing/collection.decorator +90 -0
  46. data/app/models/workarea/pricing/discount/appliation_group.decorator +16 -0
  47. data/app/models/workarea/pricing/discount/international_item_proxy.rb +27 -0
  48. data/app/models/workarea/pricing/discount/international_order.rb +29 -0
  49. data/app/models/workarea/pricing/discount.decorator +65 -0
  50. data/app/models/workarea/pricing/price_distributor.decorator +37 -0
  51. data/app/models/workarea/pricing/request.decorator +17 -0
  52. data/app/models/workarea/pricing/sku.decorator +17 -0
  53. data/app/models/workarea/search/admin/order.decorator +11 -0
  54. data/app/models/workarea/shipping/sku.decorator +23 -0
  55. data/app/models/workarea/shipping.decorator +11 -0
  56. data/app/models/workarea/user.decorator +10 -0
  57. data/app/seeds/workarea/global_e_seeds.rb +66 -0
  58. data/app/services/workarea/create_fulfillment.decorator +12 -0
  59. data/app/services/workarea/global_e/address_details.rb +218 -0
  60. data/app/services/workarea/global_e/api/notify_order_refunded.rb +45 -0
  61. data/app/services/workarea/global_e/api/perform_order_payment.rb +46 -0
  62. data/app/services/workarea/global_e/api/remove_restricted_products.rb +28 -0
  63. data/app/services/workarea/global_e/api/send_order_to_merchant/item_pricer.rb +147 -0
  64. data/app/services/workarea/global_e/api/send_order_to_merchant/save_user.rb +59 -0
  65. data/app/services/workarea/global_e/api/send_order_to_merchant.rb +359 -0
  66. data/app/services/workarea/global_e/api/update_order_shipping_info.rb +38 -0
  67. data/app/services/workarea/global_e/api/update_order_status/canceled.rb +42 -0
  68. data/app/services/workarea/global_e/api/update_order_status.rb +28 -0
  69. data/app/services/workarea/global_e/attribute.rb +44 -0
  70. data/app/services/workarea/global_e/brand.rb +19 -0
  71. data/app/services/workarea/global_e/cart_user_details.rb +34 -0
  72. data/app/services/workarea/global_e/category.rb +19 -0
  73. data/app/services/workarea/global_e/checkout_cart_info.rb +358 -0
  74. data/app/services/workarea/global_e/custom_product_attribute.rb +19 -0
  75. data/app/services/workarea/global_e/discount.rb +215 -0
  76. data/app/services/workarea/global_e/merchant/brand.rb +21 -0
  77. data/app/services/workarea/global_e/merchant/category.rb +21 -0
  78. data/app/services/workarea/global_e/merchant/customer.rb +36 -0
  79. data/app/services/workarea/global_e/merchant/customer_details.rb +201 -0
  80. data/app/services/workarea/global_e/merchant/discount.rb +127 -0
  81. data/app/services/workarea/global_e/merchant/international_details.rb +296 -0
  82. data/app/services/workarea/global_e/merchant/order.rb +425 -0
  83. data/app/services/workarea/global_e/merchant/order_refund.rb +103 -0
  84. data/app/services/workarea/global_e/merchant/original_order.rb +28 -0
  85. data/app/services/workarea/global_e/merchant/parcel_tracking.rb +31 -0
  86. data/app/services/workarea/global_e/merchant/payment_details.rb +161 -0
  87. data/app/services/workarea/global_e/merchant/product.rb +222 -0
  88. data/app/services/workarea/global_e/merchant/refund_product.rb +69 -0
  89. data/app/services/workarea/global_e/merchant/response_info.rb +115 -0
  90. data/app/services/workarea/global_e/merchant_cart_product_attribute.rb +21 -0
  91. data/app/services/workarea/global_e/order_status.rb +20 -0
  92. data/app/services/workarea/global_e/order_status_details.rb +79 -0
  93. data/app/services/workarea/global_e/order_status_reason.rb +20 -0
  94. data/app/services/workarea/global_e/parcel.rb +53 -0
  95. data/app/services/workarea/global_e/product.rb +612 -0
  96. data/app/services/workarea/global_e/product_meta_data.rb +13 -0
  97. data/app/services/workarea/global_e/tracking_details.rb +23 -0
  98. data/app/services/workarea/global_e/update_order_dispatch_exception.rb +46 -0
  99. data/app/services/workarea/global_e/update_order_dispatch_request.rb +108 -0
  100. data/app/services/workarea/global_e/user_id_number_type.rb +21 -0
  101. data/app/services/workarea/global_e/users_details.rb +151 -0
  102. data/app/services/workarea/global_e/vat_category.rb +20 -0
  103. data/app/services/workarea/global_e/vat_rate_type.rb +27 -0
  104. data/app/services/workarea/save_order_analytics.decorator +18 -0
  105. data/app/view_models/workarea/admin/order_view_model.decorator +13 -0
  106. data/app/view_models/workarea/storefront/cart_view_model.decorator +7 -0
  107. data/app/view_models/workarea/storefront/order_item_view_model.decorator +16 -0
  108. data/app/view_models/workarea/storefront/order_view_model.decorator +45 -0
  109. data/app/view_models/workarea/storefront/product_view_model.decorator +35 -0
  110. data/app/views/workarea/admin/catalog_products/_country_exceptions_card.html.haml +31 -0
  111. data/app/views/workarea/admin/catalog_products/_global_e_attributes.html.haml +3 -0
  112. data/app/views/workarea/admin/catalog_products/_global_e_fields.html.haml +4 -0
  113. data/app/views/workarea/admin/country_exceptions/edit.html.haml +48 -0
  114. data/app/views/workarea/admin/country_exceptions/index.html.haml +47 -0
  115. data/app/views/workarea/admin/country_exceptions/new.html.haml +44 -0
  116. data/app/views/workarea/admin/fixed_prices/edit.html.haml +73 -0
  117. data/app/views/workarea/admin/fixed_prices/index.html.haml +55 -0
  118. data/app/views/workarea/admin/fixed_prices/new.html.haml +70 -0
  119. data/app/views/workarea/admin/orders/_global_e.html.haml +27 -0
  120. data/app/views/workarea/admin/orders/attributes.html.haml +131 -0
  121. data/app/views/workarea/admin/orders/global_e.html.haml +110 -0
  122. data/app/views/workarea/admin/orders/show.html.haml +27 -0
  123. data/app/views/workarea/admin/orders/tenders/_global_e_payment.html.haml +3 -0
  124. data/app/views/workarea/admin/pricing_skus/_cards.html.haml +98 -0
  125. data/app/views/workarea/storefront/cart_items/create.html.haml +71 -0
  126. data/app/views/workarea/storefront/carts/_pricing.html.haml +14 -0
  127. data/app/views/workarea/storefront/carts/show.html.haml +187 -0
  128. data/app/views/workarea/storefront/ge_checkouts/show.html.haml +1 -0
  129. data/app/views/workarea/storefront/global_e/_country_picker.html.haml +1 -0
  130. data/app/views/workarea/storefront/global_e/_head.html.haml +10 -0
  131. data/app/views/workarea/storefront/orders/_summary.html.haml +275 -0
  132. data/app/views/workarea/storefront/orders/tenders/_global_e_payment.html.haml +3 -0
  133. data/app/views/workarea/storefront/products/_pricing.html.haml +49 -0
  134. data/app/views/workarea/storefront/products/_restricted_item_text.html.haml +1 -0
  135. data/app/views/workarea/storefront/users/orders/_summary.html.haml +22 -0
  136. data/app/workers/workarea/global_e/update_order_dispatch.rb +28 -0
  137. data/app/workers/workarea/save_user_order_details.decorator +9 -0
  138. data/bin/rails +25 -0
  139. data/config/initializers/appends.rb +46 -0
  140. data/config/initializers/seeds.rb +1 -0
  141. data/config/initializers/workarea.rb +64 -0
  142. data/config/locales/en.yml +105 -0
  143. data/config/routes.rb +31 -0
  144. data/lib/workarea/global_e/engine.rb +10 -0
  145. data/lib/workarea/global_e/error.rb +8 -0
  146. data/lib/workarea/global_e/version.rb +5 -0
  147. data/lib/workarea/global_e.rb +58 -0
  148. data/script/admin_ci +5 -0
  149. data/script/ci +8 -0
  150. data/script/core_ci +5 -0
  151. data/script/plugins_ci +5 -0
  152. data/script/storefront_ci +5 -0
  153. data/test/dummy/.ruby-version +1 -0
  154. data/test/dummy/Rakefile +6 -0
  155. data/test/dummy/app/assets/config/manifest.js +3 -0
  156. data/test/dummy/app/assets/images/.keep +0 -0
  157. data/test/dummy/app/assets/javascripts/application.js +14 -0
  158. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  159. data/test/dummy/app/controllers/application_controller.rb +2 -0
  160. data/test/dummy/app/controllers/concerns/.keep +0 -0
  161. data/test/dummy/app/helpers/application_helper.rb +2 -0
  162. data/test/dummy/app/jobs/application_job.rb +2 -0
  163. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  164. data/test/dummy/app/models/concerns/.keep +0 -0
  165. data/test/dummy/app/views/layouts/application.html.erb +15 -0
  166. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  167. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  168. data/test/dummy/bin/bundle +3 -0
  169. data/test/dummy/bin/rails +4 -0
  170. data/test/dummy/bin/rake +4 -0
  171. data/test/dummy/bin/setup +28 -0
  172. data/test/dummy/bin/update +28 -0
  173. data/test/dummy/bin/yarn +11 -0
  174. data/test/dummy/config/application.rb +23 -0
  175. data/test/dummy/config/boot.rb +5 -0
  176. data/test/dummy/config/environment.rb +5 -0
  177. data/test/dummy/config/environments/development.rb +52 -0
  178. data/test/dummy/config/environments/production.rb +83 -0
  179. data/test/dummy/config/environments/test.rb +45 -0
  180. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  181. data/test/dummy/config/initializers/assets.rb +14 -0
  182. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  183. data/test/dummy/config/initializers/content_security_policy.rb +25 -0
  184. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  185. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  186. data/test/dummy/config/initializers/inflections.rb +16 -0
  187. data/test/dummy/config/initializers/mime_types.rb +4 -0
  188. data/test/dummy/config/initializers/workarea.rb +5 -0
  189. data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
  190. data/test/dummy/config/locales/en.yml +33 -0
  191. data/test/dummy/config/puma.rb +34 -0
  192. data/test/dummy/config/routes.rb +5 -0
  193. data/test/dummy/config/secrets.yml +18 -0
  194. data/test/dummy/config/spring.rb +6 -0
  195. data/test/dummy/config.ru +5 -0
  196. data/test/dummy/db/seeds.rb +2 -0
  197. data/test/dummy/lib/assets/.keep +0 -0
  198. data/test/dummy/log/.keep +0 -0
  199. data/test/factories/workarea/global_e_factories.rb +836 -0
  200. data/test/integration/workarea/admin/catalog_product_country_exceptions_integration_test.rb +81 -0
  201. data/test/integration/workarea/admin/global_e_jump_to_integration_test.rb +20 -0
  202. data/test/integration/workarea/admin/pricing_sku_fixed_prices_integration_test.rb +83 -0
  203. data/test/integration/workarea/storefront/global_e_api/receive_order_integration_test.rb +278 -0
  204. data/test/integration/workarea/storefront/global_e_api/receive_order_refund_integration_test.rb +25 -0
  205. data/test/integration/workarea/storefront/global_e_api/receive_payment_integration_test.rb +34 -0
  206. data/test/integration/workarea/storefront/global_e_api/receive_shipping_info_integration_test.rb +29 -0
  207. data/test/integration/workarea/storefront/global_e_api/remove_restricted_products_integration_test.rb +27 -0
  208. data/test/integration/workarea/storefront/global_e_api/update_order_status_integration_test.rb +29 -0
  209. data/test/integration/workarea/storefront/global_e_checkout_cart_info/fixed_pricing_test.rb +438 -0
  210. data/test/integration/workarea/storefront/global_e_checkout_cart_info/gift_card_test.rb +63 -0
  211. data/test/integration/workarea/storefront/global_e_checkout_cart_info_integration_test.rb +660 -0
  212. data/test/integration/workarea/storefront/global_e_checkouts_integration_test.rb +71 -0
  213. data/test/integration/workarea/storefront/users/global_e_logins_integration_test.rb +20 -0
  214. data/test/models/workarea/catalog/product_global_e_test.rb +13 -0
  215. data/test/models/workarea/fixed_pricing_test.rb +117 -0
  216. data/test/models/workarea/global_e/country_exception_test.rb +36 -0
  217. data/test/models/workarea/payment_test.decorator +31 -0
  218. data/test/models/workarea/pricing/calculators/item_calculator_fixed_prices_test.rb +83 -0
  219. data/test/models/workarea/pricing/collection_fixed_prices_test.rb +83 -0
  220. data/test/models/workarea/pricing/price_distributor_test.decorator +21 -0
  221. data/test/models/workarea/pricing/sku_fixed_price_test.rb +133 -0
  222. data/test/support/workarea/global_e_support.rb +18 -0
  223. data/test/system/workarea/admin/global_e_system_test.rb +21 -0
  224. data/test/system/workarea/storefront/global_e_cart_system_test.rb +48 -0
  225. data/test/system/workarea/storefront/global_e_order_history_system_test.rb +43 -0
  226. data/test/teaspoon_env.rb +6 -0
  227. data/test/test_helper.rb +9 -0
  228. data/test/view_models/workarea/admin/global_e_order_view_model_test.rb +22 -0
  229. data/test/workers/workarea/global_e/update_order_dispatch_test.rb +64 -0
  230. data/test/workers/workarea/global_e_save_user_order_details_test.rb +41 -0
  231. data/workarea-global_e.gemspec +16 -0
  232. metadata +293 -0
@@ -0,0 +1,71 @@
1
+ .view
2
+ - if @item.blank?
3
+ = render_message 'error', data: { message_show_dismiss: 'false' } do
4
+ = t('workarea.storefront.flash_messages.cart_item_error')
5
+
6
+ - else
7
+ = render_message 'success', data: { message_show_dismiss: 'false' } do
8
+ = t('workarea.storefront.flash_messages.cart_item_added')
9
+
10
+ .product-list__item{ data: { cart_count: current_order.quantity, analytics: add_to_cart_confirmation_analytics_data(@item).to_json, ge_basket_cartitemid: @item.id.to_s } }
11
+ .product-list__item-cell
12
+ .product-list__summary
13
+ %p.product-list__media= link_to image_tag(product_image_url(@item.image, :small_thumb), alt: @item.product_name, class: 'product-list__media-image'), product_url(@item.product, sku: @item.sku), class: 'product-list__media-link'
14
+ .product-list__info
15
+ %p.product-list__name= link_to @item.product_name, product_path(@item.product, sku: @item.sku)
16
+ %p.product-list__id= @item.sku_name
17
+ - if @item.has_options?
18
+ .product-list__option-group
19
+ - @item.details.each do |name, value|
20
+ %p.product-list__option #{name.titleize}: #{value}
21
+ - @item.customizations.each do |name, value|
22
+ %p.product-list__customization #{name.titleize}: #{value}
23
+ = append_partials('storefront.cart_item_details', item: @item, index: 0)
24
+ .product-list__item-cell
25
+ %table.table
26
+ %thead
27
+ %tr
28
+ %th.table__prices= t('workarea.storefront.orders.price')
29
+ %th.table__quantity= t('workarea.storefront.orders.quantity')
30
+ %th.table__prices= t('workarea.storefront.orders.total')
31
+ %tbody
32
+ %tr
33
+ %td.table__prices
34
+ = render 'workarea/storefront/carts/pricing', item: @item, css_block: 'table'
35
+ %td.table__quantity
36
+ = form_tag cart_item_path(@item), method: :patch, class: 'inline-form', data: { analytics: update_cart_item_analytics_data(@item).to_json } do
37
+ .inline-form__cell
38
+ .value= number_field_tag :quantity, @item.quantity, min: 1, required: true, class: 'text-box text-box--x-small', data: { form_submitting_control: '' }, title: t('workarea.storefront.orders.quantity'), id: dom_id(@item, 'cart_item')
39
+ %p.inline-form__cell.hidden-if-js-enabled= button_tag t('workarea.storefront.carts.update'), value: 'change_quantity', class: 'button'
40
+ %td.table__prices
41
+ - @item.total_adjustments.each do |adjustment|
42
+ %p.table__price
43
+ - if @item.total_adjustments.many?
44
+ %span.table__price-label= adjustment.description.titleize
45
+
46
+ - if adjustment.discount?
47
+ %strong.table__price-discount{ data: { ge_basket_productdiscountsprice: adjustment.global_e_discount_code } }= number_to_currency(adjustment.amount)
48
+ - elsif @item.total_adjustments.one?
49
+ %span{ data: { ge_basket_producttotalprice: "" } }= number_to_currency(adjustment.amount)
50
+ - else
51
+ %span{ data: { ge_basket_productsubtotalprice: "" } }= number_to_currency(adjustment.amount)
52
+
53
+ - if @item.total_adjustments.many?
54
+ %p.table__price
55
+ %span.table__price-label= t('workarea.storefront.orders.item_total')
56
+ %span{ data: { ge_basket_subtotals: "" } }= number_to_currency(@item.total_price)
57
+
58
+ .grid.grid--auto.grid--center
59
+ .grid__cell= link_to t('workarea.storefront.carts.continue_shopping'), root_path, class: 'button button--large', data: { dialog_close_button: true }
60
+ .grid__cell= link_to t('workarea.storefront.carts.view_cart'), cart_path, class: 'button button--large'
61
+ .grid__cell= link_to t('workarea.storefront.carts.checkout'), checkout_path, class: 'button button--large'
62
+
63
+ - if @cart.recommendations.any?
64
+ .hidden.hidden--for-small-only
65
+ %h2= t('workarea.storefront.recommendations.you_may_also_like')
66
+
67
+ .grid
68
+ - @cart.recommendations.each do |product|
69
+ .grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
70
+ .product-summary.product-summary--small{ itemscope: true, itemtype: 'http://schema.org/Product' }
71
+ = render 'workarea/storefront/products/summary', product: product
@@ -0,0 +1,14 @@
1
+ - if item.on_sale?
2
+ %p{class: "#{css_block}__price"}
3
+ %span{class: "#{css_block}__label" } #{t('workarea.storefront.orders.price_now')}:
4
+ %strong{ data: { ge_basket_productsaleprice: "", fp: item.product.sell_min_fixed_prices.presence&.to_json } }= number_to_currency(item.original_unit_price)
5
+ %p{class: "#{css_block}__price"}
6
+ %span{class: "#{css_block}__label" } #{t('workarea.storefront.orders.price_was')}:
7
+ %s{ data: { ge_basket_productlistprice: "" } }= number_to_currency(item.original_price)
8
+ - else
9
+ %p{class: "#{css_block}__price" }
10
+ %span{ data: { ge_basket_productsaleprice: "", fp: item.product.sell_min_fixed_prices.presence&.to_json } }= number_to_currency(item.original_unit_price)
11
+ - if item.customized?
12
+ %p{class: "#{css_block}__price"}
13
+ %span{class: "#{css_block}__label" } #{t('workarea.storefront.orders.customizations')}:
14
+ %span{ data: { ge_customizations_price: "" } }= number_to_currency(item.customizations_unit_price)
@@ -0,0 +1,187 @@
1
+ - @title = t('workarea.storefront.carts.title')
2
+
3
+ .cart.view{ data: { analytics: cart_view_analytics_data(@cart).to_json } }
4
+
5
+ %ul.order-help-menu
6
+ %li.order-help-menu__item
7
+ = link_to t('workarea.storefront.layouts.contact_us'), contact_path, data: { dialog_button: '' }
8
+ %li.order-help-menu__item
9
+ = link_to page_path('shipping-information'), target: '_blank', rel: 'noopener', data: { dialog_button: '' } do
10
+ = t('workarea.storefront.layouts.shipping_policy')
11
+ %li.order-help-menu__item
12
+ = link_to page_path('return-information'), target: '_blank', rel: 'noopener', data: { dialog_button: '' } do
13
+ = t('workarea.storefront.layouts.returns')
14
+
15
+ - if @cart.no_items?
16
+
17
+ %h1= t('workarea.storefront.carts.empty')
18
+
19
+ %p.cart__continue-shopping
20
+ = link_to t('workarea.storefront.carts.continue_shopping'), root_path, class: 'button'
21
+
22
+ - else
23
+
24
+ .grid.grid--middle
25
+ .grid__cell.grid__cell--80-at-medium
26
+ %h1= t('workarea.storefront.carts.title')
27
+
28
+ .grid__cell.grid__cell--20-at-medium
29
+ .cart__checkout-action-group
30
+ %p.cart__checkout-action= link_to t('workarea.storefront.carts.checkout'), checkout_path, class: 'button button--large'
31
+ = append_partials('storefront.cart_checkout_actions', cart: @cart)
32
+
33
+ %ul.product-list{ data: { analytics: product_list_analytics_data('Cart').to_json } }
34
+ - @cart.items.each_with_index do |item, index|
35
+ %li.product-list__item{ data: { ge_basket_cartitemid: item.id.to_s } }
36
+ .product-list__item-cell
37
+ .product-list__summary
38
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
39
+ .product-list__info
40
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
41
+ %p.product-list__id= item.sku_name
42
+ %p.product-list__inventory-status= item.inventory_status
43
+ - if item.has_options?
44
+ .product-list__option-group
45
+ - item.details.each do |name, value|
46
+ %p.product-list__option #{name.titleize}: #{value}
47
+ - item.customizations.each do |name, value|
48
+ %p.product-list__customization #{name.titleize}: #{value}
49
+ = append_partials('storefront.cart_item_details', item: item, index: index)
50
+ .grid.grid--auto
51
+ .grid__cell
52
+ = form_tag cart_item_path(item), method: 'delete', class: 'action-group__item', data: { analytics: remove_from_cart_analytics_data(item).to_json } do
53
+ %p= button_tag t('workarea.storefront.carts.remove'), value: 'remove_item', class: 'text-button'
54
+ = append_partials('storefront.cart_item_actions', item: item)
55
+ .product-list__item-cell
56
+ %table.table
57
+ %thead
58
+ %tr
59
+ %th.table__prices= t('workarea.storefront.orders.price')
60
+ %th.table__quantity= t('workarea.storefront.orders.quantity')
61
+ %th.table__prices= t('workarea.storefront.orders.total')
62
+ %tbody
63
+ %tr
64
+ %td.table__prices
65
+ = render 'workarea/storefront/carts/pricing', item: item, css_block: 'table'
66
+ %td.table__quantity
67
+ = form_tag cart_item_path(item), method: :patch, class: 'inline-form', data: { analytics: update_cart_item_analytics_data(item).to_json } do
68
+ .inline-form__cell
69
+ .value= number_field_tag :quantity, item.quantity, min: 1, required: true, class: 'text-box text-box--x-small', data: { form_submitting_control: '' }, title: t('workarea.storefront.orders.quantity'), id: "quantity_#{index}", aria: { label: t('workarea.storefront.orders.quantity') }
70
+ %p.inline-form__cell.hidden-if-js-enabled= button_tag t('workarea.storefront.carts.update'), value: 'change_quantity', class: 'button'
71
+ %td.table__prices
72
+ - item.total_adjustments.each do |adjustment|
73
+ %p.table__price
74
+ - if item.total_adjustments.many?
75
+ %span.table__price-label= adjustment.description.titleize
76
+
77
+ - if adjustment.discount?
78
+ %strong.table__price-discount{ data: { ge_basket_productdiscountsprice: adjustment.global_e_discount_code } }= number_to_currency(adjustment.amount)
79
+ - elsif item.total_adjustments.one?
80
+ %span{ data: { ge_basket_producttotalprice: "" } }= number_to_currency(adjustment.amount)
81
+ - else
82
+ %span{ data: { ge_basket_productsubtotalprice: "" } }= number_to_currency(adjustment.amount)
83
+
84
+ - if item.total_adjustments.many?
85
+ %p.table__price
86
+ %span.table__price-label= t('workarea.storefront.orders.item_total')
87
+ %span{ data: { ge_basket_producttotalprice: "" } }= number_to_currency(item.total_price)
88
+ - @cart.free_gifts.each do |item|
89
+ %li.product-list__item{ data: { ge_basket_cartitemid: item.id.to_s, ge_basket_freegift: '' } }
90
+ .product-list__item-cell
91
+ .product-list__summary
92
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
93
+ .product-list__info
94
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
95
+ %p.product-list__id= item.sku
96
+ .product-list__item-cell
97
+ %table.table
98
+ %thead
99
+ %tr
100
+ %th.table__prices= t('workarea.storefront.orders.price')
101
+ %th.table__quantity= t('workarea.storefront.orders.quantity')
102
+ %th.table__prices= t('workarea.storefront.orders.total')
103
+ %tbody
104
+ %tr
105
+ %td.table__prices
106
+ %p.table__price
107
+ %span= t('workarea.storefront.carts.free_gift')
108
+ %td.table__quantity
109
+ %p= item.quantity
110
+ %td.table__prices
111
+ %p.table__price
112
+ %span= t('workarea.storefront.carts.free_gift')
113
+
114
+ = append_partials('storefront.cart_additional_information', cart: @cart)
115
+
116
+ .grid.grid--auto.grid--right
117
+ .grid__cell
118
+ = optional_field(t('workarea.storefront.carts.enter_promo_code_prompt'), params[:promo_code]) do
119
+ .cart__promo-code
120
+ = form_tag add_promo_code_to_cart_path, id: 'promo_code_form', method: 'post', class: 'inline-form' do
121
+ .inline-form__cell
122
+ .value= text_field_tag :promo_code, params[:promo_code], class: 'text-box', autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', required: true, title: t('workarea.storefront.orders.promo_code'), aria: { label: t('workarea.storefront.orders.promo_code') }
123
+ %p.inline-form__cell= button_tag t('workarea.storefront.carts.add'), value: 'add_promo_code', class: 'button'
124
+
125
+ .grid.grid--right
126
+ .grid__cell.grid__cell--50-at-medium
127
+ %table.table.table--totals
128
+ %tbody
129
+ %tr
130
+ %th
131
+ %span= t('workarea.storefront.orders.subtotal')
132
+ %td
133
+ %span{ data: { ge_basket_subtotals: "" } }= number_to_currency @cart.subtotal_price
134
+ - @cart.total_adjustments.each do |adjustment|
135
+ %tr
136
+ %th
137
+ %span= adjustment.description.titleize
138
+ %td
139
+ - if adjustment.discount?
140
+ %strong{ data: { ge_basket_discounts: adjustment.global_e_discount_code }}= number_to_currency(adjustment.amount)
141
+ - else
142
+ %span= number_to_currency(adjustment.amount)
143
+ - if @cart.requires_shipping?
144
+ %tr{ data: { globale_hide: "" } }
145
+ %th
146
+ %span= t('workarea.storefront.orders.shipping')
147
+ %td
148
+ - if @cart.show_shipping_services?
149
+ #{@cart.shipping_service} - #{number_to_currency(@cart.shipping_total)}
150
+ - else
151
+ = t('workarea.storefront.carts.calculated_at_checkout')
152
+ %tr{ data: { globale_hide: "" } }
153
+ %th
154
+ %span= t('workarea.storefront.orders.tax')
155
+ %td
156
+ - if @cart.show_taxes?
157
+ = number_to_currency @cart.tax_total
158
+ - else
159
+ = t('workarea.storefront.carts.calculated_at_checkout')
160
+ %tr.table__total
161
+ %th
162
+ %span= t('workarea.storefront.orders.total')
163
+ %td
164
+ %span{ data: { ge_basket_totals: "" } }= number_to_currency(@cart.total_price)
165
+
166
+ .cart__checkout-action-group
167
+ %p.cart__checkout-action= link_to t('workarea.storefront.carts.checkout'), checkout_path, class: 'button button--large'
168
+ = append_partials('storefront.cart_checkout_actions', cart: @cart)
169
+
170
+ = append_partials('storefront.cart_show', cart: @cart)
171
+
172
+ - cache @cart.cache_key, expires_in: Workarea.config.cache_expirations.cart_recommendations_fragment_cache do
173
+ - if @cart.recommendations.any?
174
+ .recommendations
175
+ %h2.recommendations__heading= t('workarea.storefront.recommendations.heading')
176
+
177
+ .recommendations__products
178
+ .grid
179
+ - @cart.recommendations.each do |product|
180
+ .grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
181
+ .product-summary.product-summary--small{ itemscope: true, itemtype: 'http://schema.org/Product' }
182
+ = render 'workarea/storefront/products/summary', product: product
183
+
184
+ %div{ data: { recommendations_placeholder: recent_views_path } }
185
+
186
+ - if @cart.quantity.zero?
187
+ %div{ data: { recommendations_placeholder: recommendations_path } }
@@ -0,0 +1 @@
1
+ %div{ data: { ge_checkout: "" } }
@@ -0,0 +1 @@
1
+ %div{ data: { ge_shippingswitcher_flag: "" } }
@@ -0,0 +1,10 @@
1
+ - if Workarea::GlobalE.enabled?
2
+ :javascript
3
+ (function() {
4
+ var s = document.createElement('script');
5
+ s.type = 'text/javascript';
6
+ s.async = true;
7
+ s.src = '#{Workarea::GlobalE.javascript_source}';
8
+ document.getElementsByTagName('head')[0].appendChild(s);
9
+ })();
10
+ %link{ id: "GEPIStyles", rel: "stylesheet", href: Workarea::GlobalE.css_source }
@@ -0,0 +1,275 @@
1
+ .order-summary
2
+ .box
3
+ .box__header
4
+ .grid.grid--middle.grid--auto.grid--large
5
+ .grid__cell
6
+ %h2.box__heading #{t('workarea.storefront.orders.order')} ##{order.id}
7
+ .grid__cell
8
+ %strong
9
+ #{t('workarea.storefront.orders.placed_at')}:
10
+ = local_time(order.placed_at, '%B %e, %Y')
11
+ .grid__cell
12
+ %strong
13
+ #{t('workarea.storefront.orders.status')}:
14
+ = order.fulfillment_status
15
+ .box__body
16
+ .grid
17
+ .grid__cell.grid__cell--25-at-medium
18
+ %h3= t('workarea.storefront.orders.billing_address')
19
+ = order.billing_address.first_name
20
+ = order.billing_address.last_name
21
+ - if order.billing_address.company.present?
22
+ %br
23
+ = order.billing_address.company
24
+ %br
25
+ = order.billing_address.street
26
+ - if order.billing_address.street_2.present?
27
+ %br
28
+ = order.billing_address.street_2
29
+ %br
30
+ = order.billing_address.city
31
+ = order.billing_address.region
32
+ = order.billing_address.postal_code
33
+ %br
34
+ = order.billing_address.country
35
+ %br
36
+ = number_to_phone order.billing_address.phone_number, extension: order.billing_address.phone_extension
37
+
38
+ .grid__cell.grid__cell--25-at-medium
39
+ %h3= t('workarea.storefront.orders.payment_method')
40
+ - order.tenders.each do |tender|
41
+ = render "workarea/storefront/orders/tenders/#{tender.slug}", tender: tender
42
+
43
+ .grid__cell.grid__cell--25-at-medium
44
+ %h3= t('workarea.storefront.orders.items')
45
+ %ol{ data: { gem_ignore: '' } }
46
+ - order.items.each do |item|
47
+ %li
48
+ %p
49
+ = link_to item.product_name, product_path(item.product, sku: item.sku)
50
+ %br
51
+ %strong #{item.quantity} @ #{number_to_currency(item.original_price)} #{t('workarea.storefront.orders.each')}
52
+ %br
53
+ = item.sku
54
+ %br
55
+ - if item.has_options?
56
+ - item.details.each do |name, value|
57
+ #{name.titleize}: #{value}
58
+ %br
59
+ - item.customizations.each do |name, value|
60
+ #{name.titleize}: #{value}
61
+ %br
62
+ = append_partials('storefront.order_summary_item_details', item: item)
63
+
64
+ .grid__cell.grid__cell--25-at-medium
65
+ %h3= t('workarea.storefront.orders.totals')
66
+ %table.table.table--totals{ data: { gem_ignore: '' } }
67
+ %tbody
68
+ %tr
69
+ %th
70
+ %span #{t('workarea.storefront.orders.subtotal')}:
71
+ %td= number_to_currency(order.subtotal_price)
72
+
73
+ - if order.total_adjustments.any?
74
+ - order.total_adjustments.each do |adjustment|
75
+ %tr
76
+ %th
77
+ %span= adjustment.description.titleize
78
+ %td
79
+ - if adjustment.discount?
80
+ %strong.table__price-discount= number_to_currency(adjustment.amount)
81
+ - else
82
+ %span= number_to_currency(adjustment.amount)
83
+
84
+ - if order.requires_shipping?
85
+ %tr
86
+ %th
87
+ %span #{t('workarea.storefront.orders.shipping')}:
88
+ %td= number_to_currency(order.shipping_total)
89
+
90
+ - if order.global_e?
91
+ %tr
92
+ %th
93
+ %span #{t('workarea.storefront.orders.tax_and_duties')}:
94
+ %td= number_to_currency(order.total_duties_price)
95
+
96
+ - else
97
+ %tr
98
+ %th
99
+ %span #{t('workarea.storefront.orders.tax')}:
100
+ %td= number_to_currency(order.tax_total)
101
+
102
+ - if order.store_credit_amount > 0
103
+ %tr
104
+ %th
105
+ %span= t('workarea.storefront.orders.store_credit')
106
+ %td
107
+ %strong.table__price-discount −#{number_to_currency(order.store_credit_amount)}
108
+
109
+ = append_partials('storefront.order_summary_payment', order: order)
110
+
111
+ %tr.table__total
112
+ %th
113
+ %span
114
+ %strong #{t('workarea.storefront.orders.total')}:
115
+ %td
116
+ %strong= number_to_currency(order.paid_amount)
117
+
118
+ = append_partials('storefront.orders_summary_top', order: order)
119
+
120
+ - if order.requires_shipping?
121
+ .box
122
+ .box__header
123
+ %h2.box__heading= t('workarea.storefront.orders.shipping')
124
+ .box__body
125
+ .grid
126
+ - order.shippings.each do |shipping|
127
+ .grid__cell.grid__cell--33-at-medium
128
+ = shipping.address.first_name
129
+ = shipping.address.last_name
130
+ - if shipping.address.company.present?
131
+ %br
132
+ = shipping.address.company
133
+ %br
134
+ = shipping.address.street
135
+ - if shipping.address.street_2.present?
136
+ %br
137
+ = shipping.address.street_2
138
+ %br
139
+ = shipping.address.city
140
+ = shipping.address.region
141
+ = shipping.address.postal_code
142
+ %br
143
+ = shipping.address.country
144
+ %br
145
+ = number_to_phone shipping.address.phone_number, extension: shipping.address.phone_extension
146
+
147
+ %strong= shipping.try(:shipping_service).try(:name)
148
+ - if shipping.instructions.present?
149
+ %p
150
+ %strong= t('workarea.storefront.orders.shipping_instructions')
151
+ %br
152
+ = shipping.instructions
153
+
154
+ .grid__cell.grid__cell--66-at-medium
155
+ - if shipping.partial?
156
+ %ul.product-list
157
+ - shipping.items.each do |item|
158
+ %li.product-list__item
159
+ .product-list__item-cell
160
+ .product-list__summary
161
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
162
+ .product-list__info
163
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
164
+ %p.product-list__id= item.sku_name
165
+ - if item.has_options?
166
+ .product-list__option-group
167
+ - item.details.each do |name, value|
168
+ %p.product-list__option #{name.titleize}: #{value}
169
+ - item.customizations.each do |name, value|
170
+ %p.product-list__customization #{name.titleize}: #{value}
171
+ = append_partials('storefront.order_summary_item_details', item: item)
172
+ .product-list__item-cell
173
+ %table.table
174
+ %thead
175
+ %tr
176
+ %th.table__quantity= t('workarea.storefront.orders.quantity')
177
+ %tbody
178
+ %tr
179
+ %td.table__quantity
180
+ %p= item.quantity
181
+
182
+ - if order.packages.any?
183
+ .box
184
+ .box__body
185
+ .grid
186
+ - order.packages.each_with_index do |package, index|
187
+ .grid__cell.grid__cell--50-at-medium
188
+ .box
189
+ .box__header
190
+ %h3.box__heading= "#{t('workarea.storefront.orders.package')} #{index + 1}"
191
+ .box__body
192
+ %ul.product-list
193
+ - package.items.each do |item|
194
+ %li.product-list__item
195
+ .product-list__item-cell
196
+ .product-list__summary
197
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
198
+ .product-list__info
199
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
200
+ %p.product-list__id= item.sku
201
+
202
+ .grid__cell.grid__cell--50-at-medium
203
+ - if !package.tracking_number.present?
204
+ %p= t('workarea.storefront.orders.no_tracking')
205
+ - else
206
+ %p= link_to t('workarea.storefront.orders.track_package'), package.tracking_link, target: '_blank', rel: 'noopener', class: 'button button--full'
207
+ = append_partials('storefront.order_summary_package_actions', package: package)
208
+
209
+ = append_partials('storefront.order_summary_shipping', shipping: shipping)
210
+
211
+ - if order.pending_items.any? && (!local_assigns.key?(:show_fullfillment) || show_fullfillment)
212
+ .box
213
+ .box__header
214
+ %h3.box__heading= t('workarea.storefront.orders.pending')
215
+ .box__body
216
+ %ul.product-list
217
+ - order.pending_items.each do |item|
218
+ %li.product-list__item
219
+ .product-list__item-cell
220
+ .product-list__summary
221
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
222
+ .product-list__info
223
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
224
+ %p.product-list__id= item.sku
225
+ %p.product-list__quantity #{t('workarea.storefront.orders.quantity')}: #{item.quantity}
226
+
227
+ - if order.refunds.any? && (!local_assigns.key?(:show_fullfillment) || show_fullfillment)
228
+ .box
229
+ .box__header
230
+ %h2.box__heading= t('workarea.storefront.orders.refunds')
231
+ .box__body
232
+ - order.refunds.each do |refund|
233
+ %ul
234
+ - refund.tenders.each do |tender, amount|
235
+ %li
236
+ = t('workarea.storefront.orders.issued')
237
+ = local_time(refund.created_at, :short_date_at_time)
238
+ = t('workarea.storefront.orders.refund_description_html', type: tender.name.downcase, amount: number_to_currency(amount))
239
+
240
+ - if order.canceled_items.any? && (!local_assigns.key?(:show_fullfillment) || show_fullfillment)
241
+ .box
242
+ .box__header
243
+ %h2.box__heading= t('workarea.storefront.orders.cancelations')
244
+ .box__body
245
+ %ul.product-list
246
+ - order.canceled_items.each do |item|
247
+ %li.product-list__item
248
+ .product-list__item-cell
249
+ .product-list__summary
250
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
251
+ .product-list__info
252
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
253
+ %p.product-list__id= item.sku
254
+ %p.product-list__quantity #{t('workarea.storefront.orders.quantity')}: #{item.quantity}
255
+
256
+ = append_partials('storefront.orders_summary_bottom', order: order)
257
+
258
+ - if local_assigns[:recommendations].present?
259
+ .hidden.hidden--for-small-only
260
+ %h2= t('workarea.storefront.recommendations.you_may_also_like')
261
+ .grid
262
+ - recommendations.each do |product|
263
+ .grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
264
+ .product-summary.product-summary--small{ itemscope: true, itemtype: 'http://schema.org/Product' }
265
+ = render 'workarea/storefront/products/summary', product: product
266
+
267
+ %ul.order-help-menu
268
+ %li.order-help-menu__item
269
+ = link_to t('workarea.storefront.layouts.contact_us'), contact_path, data: { dialog_button: '' }
270
+ %li.order-help-menu__item
271
+ = link_to page_path('shipping-information'), target: '_blank', rel: 'noopener', data: { dialog_button: '' } do
272
+ = t('workarea.storefront.layouts.shipping_policy')
273
+ %li.order-help-menu__item
274
+ = link_to page_path('return-information'), target: '_blank', rel: 'noopener', data: { dialog_button: '' } do
275
+ = t('workarea.storefront.layouts.returns')
@@ -0,0 +1,3 @@
1
+ %p= tender.name
2
+
3
+ %p= number_to_currency(tender.amount)
@@ -0,0 +1,49 @@
1
+ -# TODO v4 rewrite, simply and add better classes
2
+ - cache "#{product.cache_key}/prices", expires_in: Workarea.config.cache_expirations.product_pricing_fragment_cache do
3
+ - if product.one_price?
4
+ %p.product-prices__price
5
+ - if product.show_sell_range?
6
+ %span.product-prices__sell-price.product-prices__sell-price--min{ data: { fp: product.sell_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
7
+ = number_to_currency(product.sell_min_price)
8
+
9
+ %span.product-prices__sell-price.product-prices__sell-price--max{ data: { fp: product.sell_max_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
10
+ = number_to_currency product.sell_max_price
11
+ - else
12
+ %span.product-prices__sell-price{ data: { fp: product.sell_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
13
+ = number_to_currency(product.sell_min_price)
14
+
15
+ - else
16
+ - if product.on_sale?
17
+ %p.product-prices__price.product-prices__price--on-sale
18
+ - if product.show_sell_range?
19
+ %strong.product-prices__sell-price.product-prices__sell-price--min{ data: { fp: product.sell_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
20
+ = number_to_currency(product.sell_min_price)
21
+
22
+ %strong.product-prices__sell-price.product-prices__sell-price--max{ data: { fp: product.sell_max_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
23
+ = number_to_currency product.sell_max_price
24
+ - else
25
+ %strong.product-prices__sell-price{ data: { fp: product.sell_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
26
+ = number_to_currency(product.sell_min_price)
27
+
28
+ - else
29
+ %p.product-prices__price
30
+ - if product.show_sell_range?
31
+ %span.product-prices__sell-price.product-prices__sell-price--min{ data: { fp: product.sell_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
32
+ = number_to_currency(product.sell_min_price)
33
+
34
+ %span.product-prices__sell-price.product-prices__sell-price--max{ data: { fp: product.sell_max_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
35
+ =number_to_currency product.sell_max_price
36
+ - else
37
+ %span.product-prices__sell-price{ data: { fp: product.sell_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }
38
+ = number_to_currency(product.sell_min_price)
39
+
40
+ %p.product-prices__price.product-prices__price--original
41
+ - if product.show_original_range?
42
+ %s.product-prices__original-price.product-prices__original-price--range
43
+ %span{ data: { fp: product.original_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }= number_to_currency product.original_min_price
44
+
45
+ %span{ data: { fp: product.original_max_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }= number_to_currency product.original_max_price
46
+ - else
47
+ %s.product-prices__original-price{ data: { fp: product.original_min_fixed_prices.presence&.to_json, countries: product.country_exceptions_data }.compact }= number_to_currency product.original_min_price
48
+
49
+ = append_partials('storefront.product_pricing', product: product)
@@ -0,0 +1 @@
1
+ #ge_RestrictedItemMessage.hidden{ data: { ge_restricted_message: '' } }= t('workarea.storefront.products.restricted_item_message')
@@ -0,0 +1,22 @@
1
+ .data-card.data-card--row
2
+ .data-card__cell
3
+ %p.data-card__line
4
+ %strong= t('workarea.storefront.orders.placed_at')
5
+ %span= local_time(order.placed_at, :long)
6
+ %p.data-card__line
7
+ %strong= t('workarea.storefront.orders.id')
8
+ %span= order.id
9
+ %p.data-card__line
10
+ %strong= t('workarea.storefront.orders.status')
11
+ %span= order.fulfillment_status
12
+ %p.data-card__line{ data: { gem_ignore: '' } }
13
+ %strong= t('workarea.storefront.orders.items')
14
+ %span #{order.quantity} - #{number_to_currency(order.total_price)}
15
+ .data-card__cell
16
+ .grid.grid--auto
17
+ %p.grid__cell= link_to t('workarea.storefront.orders.view'), users_order_path(order), class: 'button button--small'
18
+ - order.packages.each_with_index do |package|
19
+ - if package.tracking_number.present?
20
+ %p.grid__cell= link_to t('workarea.storefront.orders.track_package'), package.tracking_link, target: '_blank', rel: 'noopener'
21
+
22
+ = append_partials('storefront.order_summary_actions', order: order)