solidus_starter_frontend 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (301) hide show
  1. checksums.yaml +4 -4
  2. metadata +30 -514
  3. data/.circleci/config.yml +0 -57
  4. data/.erb-lint.yml +0 -22
  5. data/.eslintrc +0 -5
  6. data/.gem_release.yml +0 -5
  7. data/.github/pull_request_template.md +0 -28
  8. data/.github/stale.yml +0 -17
  9. data/.gitignore +0 -17
  10. data/.hound.yml +0 -16
  11. data/.rspec +0 -2
  12. data/.rubocop.yml +0 -19
  13. data/.rubocop_todo.yml +0 -229
  14. data/.scss-lint.yml +0 -4
  15. data/Gemfile +0 -34
  16. data/LICENSE +0 -26
  17. data/README.md +0 -69
  18. data/Rakefile +0 -6
  19. data/app/assets/config/solidus_starter_frontend_manifest.js +0 -2
  20. data/app/assets/javascripts/spree/frontend/cart.js +0 -26
  21. data/app/assets/javascripts/spree/frontend/checkout/address.js +0 -124
  22. data/app/assets/javascripts/spree/frontend/checkout/payment.js +0 -44
  23. data/app/assets/javascripts/spree/frontend/checkout.js +0 -34
  24. data/app/assets/javascripts/spree/frontend/locale_selector.js +0 -9
  25. data/app/assets/javascripts/spree/frontend/product.js +0 -21
  26. data/app/assets/javascripts/spree/frontend/solidus_starter_frontend.js +0 -9
  27. data/app/assets/javascripts/spree/frontend/utils.js.erb +0 -18
  28. data/app/assets/javascripts/spree/frontend.js +0 -6
  29. data/app/assets/stylesheets/spree/frontend/base/_base.scss +0 -29
  30. data/app/assets/stylesheets/spree/frontend/base/_reset.scss +0 -179
  31. data/app/assets/stylesheets/spree/frontend/base/_responsive.scss +0 -21
  32. data/app/assets/stylesheets/spree/frontend/components/account/_account_order.scss +0 -23
  33. data/app/assets/stylesheets/spree/frontend/components/account/_account_summary.scss +0 -17
  34. data/app/assets/stylesheets/spree/frontend/components/auth/_auth_container.scss +0 -11
  35. data/app/assets/stylesheets/spree/frontend/components/auth/_auth_form.scss +0 -5
  36. data/app/assets/stylesheets/spree/frontend/components/brand/_logo.scss +0 -4
  37. data/app/assets/stylesheets/spree/frontend/components/buttons/_button_inline.scss +0 -8
  38. data/app/assets/stylesheets/spree/frontend/components/buttons/_button_primary.scss +0 -26
  39. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_adjustments.scss +0 -6
  40. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_amount_row.scss +0 -11
  41. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_empty.scss +0 -10
  42. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_footer.scss +0 -20
  43. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_header.scss +0 -12
  44. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_item.scss +0 -86
  45. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_link.scss +0 -22
  46. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_page.scss +0 -15
  47. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_secondary_actions.scss +0 -19
  48. data/app/assets/stylesheets/spree/frontend/components/cart/_coupon_code.scss +0 -8
  49. data/app/assets/stylesheets/spree/frontend/components/cart/_item_info.scss +0 -19
  50. data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout.scss +0 -27
  51. data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout_header.scss +0 -19
  52. data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout_summary.scss +0 -31
  53. data/app/assets/stylesheets/spree/frontend/components/checkout/_existing_cards.scss +0 -27
  54. data/app/assets/stylesheets/spree/frontend/components/checkout/_payment_method_controls.scss +0 -5
  55. data/app/assets/stylesheets/spree/frontend/components/checkout/_payment_method_selector.scss +0 -14
  56. data/app/assets/stylesheets/spree/frontend/components/checkout/_progress_steps.scss +0 -38
  57. data/app/assets/stylesheets/spree/frontend/components/checkout/_proposed_shipment.scss +0 -18
  58. data/app/assets/stylesheets/spree/frontend/components/checkout/_shipment_items.scss +0 -50
  59. data/app/assets/stylesheets/spree/frontend/components/checkout/_shipping_methods.scss +0 -9
  60. data/app/assets/stylesheets/spree/frontend/components/checkout/payments/_gateway_payment_method.scss +0 -11
  61. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_address_step.scss +0 -20
  62. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_confirm_step.scss +0 -13
  63. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_delivery_step.scss +0 -13
  64. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_payment_step.scss +0 -13
  65. data/app/assets/stylesheets/spree/frontend/components/forms/_address_inputs.scss +0 -13
  66. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_checkbox_input.scss +0 -3
  67. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_radio_input.scss +0 -3
  68. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_select_input.scss +0 -27
  69. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_text.scss +0 -32
  70. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_textarea_input.scss +0 -25
  71. data/app/assets/stylesheets/spree/frontend/components/general/_flash.scss +0 -20
  72. data/app/assets/stylesheets/spree/frontend/components/layout/_aside.scss +0 -4
  73. data/app/assets/stylesheets/spree/frontend/components/layout/_breadcrumbs.scss +0 -16
  74. data/app/assets/stylesheets/spree/frontend/components/layout/_category_navigation.scss +0 -3
  75. data/app/assets/stylesheets/spree/frontend/components/layout/_footer.scss +0 -8
  76. data/app/assets/stylesheets/spree/frontend/components/layout/_header.scss +0 -12
  77. data/app/assets/stylesheets/spree/frontend/components/layout/_horizontal_input_group.scss +0 -7
  78. data/app/assets/stylesheets/spree/frontend/components/layout/_top_bar.scss +0 -44
  79. data/app/assets/stylesheets/spree/frontend/components/navigation/_auth_link.scss +0 -11
  80. data/app/assets/stylesheets/spree/frontend/components/navigation/_categories.scss +0 -29
  81. data/app/assets/stylesheets/spree/frontend/components/navigation/_locale_selector.scss +0 -21
  82. data/app/assets/stylesheets/spree/frontend/components/navigation/_taxonomies.scss +0 -7
  83. data/app/assets/stylesheets/spree/frontend/components/navigation/_taxonomy.scss +0 -28
  84. data/app/assets/stylesheets/spree/frontend/components/orders/_address_overview.scss +0 -27
  85. data/app/assets/stylesheets/spree/frontend/components/orders/_coupon_codes.scss +0 -4
  86. data/app/assets/stylesheets/spree/frontend/components/orders/_line_items.scss +0 -20
  87. data/app/assets/stylesheets/spree/frontend/components/orders/_order_details.scss +0 -18
  88. data/app/assets/stylesheets/spree/frontend/components/orders/_order_item.scss +0 -85
  89. data/app/assets/stylesheets/spree/frontend/components/orders/_order_page.scss +0 -41
  90. data/app/assets/stylesheets/spree/frontend/components/orders/_order_shipments.scss +0 -27
  91. data/app/assets/stylesheets/spree/frontend/components/orders/_payment_info.scss +0 -29
  92. data/app/assets/stylesheets/spree/frontend/components/presentation/_hero.scss +0 -18
  93. data/app/assets/stylesheets/spree/frontend/components/products/_product_card.scss +0 -35
  94. data/app/assets/stylesheets/spree/frontend/components/products/_product_image.scss +0 -7
  95. data/app/assets/stylesheets/spree/frontend/components/products/_product_info.scss +0 -14
  96. data/app/assets/stylesheets/spree/frontend/components/products/_product_page.scss +0 -31
  97. data/app/assets/stylesheets/spree/frontend/components/products/_product_properties.scss +0 -23
  98. data/app/assets/stylesheets/spree/frontend/components/products/_product_submit.scss +0 -9
  99. data/app/assets/stylesheets/spree/frontend/components/products/_product_taxons.scss +0 -27
  100. data/app/assets/stylesheets/spree/frontend/components/products/_product_thumbnails.scss +0 -7
  101. data/app/assets/stylesheets/spree/frontend/components/products/_product_variants.scss +0 -20
  102. data/app/assets/stylesheets/spree/frontend/components/products/_products.scss +0 -13
  103. data/app/assets/stylesheets/spree/frontend/components/products/_products_by_taxon.scss +0 -6
  104. data/app/assets/stylesheets/spree/frontend/components/products/_products_grid.scss +0 -18
  105. data/app/assets/stylesheets/spree/frontend/components/search/_filter.scss +0 -32
  106. data/app/assets/stylesheets/spree/frontend/components/search/_search_bar.scss +0 -34
  107. data/app/assets/stylesheets/spree/frontend/components/typography/_hero_title.scss +0 -6
  108. data/app/assets/stylesheets/spree/frontend/components/typography/_subtitle.scss +0 -7
  109. data/app/assets/stylesheets/spree/frontend/placeholders/main.scss +0 -5
  110. data/app/assets/stylesheets/spree/frontend/screen.scss +0 -89
  111. data/app/assets/stylesheets/spree/frontend/solidus_starter_frontend.css +0 -7
  112. data/app/assets/stylesheets/spree/frontend/variables/_colors.scss +0 -20
  113. data/app/assets/stylesheets/spree/frontend.css +0 -8
  114. data/app/controllers/concerns/solidus_starter_frontend/auth_views.rb +0 -16
  115. data/app/controllers/concerns/solidus_starter_frontend/taxonomies.rb +0 -16
  116. data/app/controllers/spree/checkout_controller.rb +0 -249
  117. data/app/controllers/spree/coupon_codes_controller.rb +0 -35
  118. data/app/controllers/spree/home_controller.rb +0 -13
  119. data/app/controllers/spree/locale_controller.rb +0 -20
  120. data/app/controllers/spree/orders_controller.rb +0 -126
  121. data/app/controllers/spree/products_controller.rb +0 -51
  122. data/app/controllers/spree/store_controller.rb +0 -31
  123. data/app/controllers/spree/taxons_controller.rb +0 -30
  124. data/app/helpers/spree/orders_helper.rb +0 -18
  125. data/app/helpers/spree/taxon_filters_helper.rb +0 -13
  126. data/app/views/spree/address/_form_hidden.html.erb +0 -12
  127. data/app/views/spree/checkout/_terms_and_conditions.en.html.erb +0 -1
  128. data/app/views/spree/checkout/edit.html.erb +0 -16
  129. data/app/views/spree/checkout/existing_payment/_gateway.html.erb +0 -9
  130. data/app/views/spree/checkout/payment/_check.html.erb +0 -0
  131. data/app/views/spree/checkout/payment/_gateway.html.erb +0 -43
  132. data/app/views/spree/components/auth/_change_form.html.erb +0 -40
  133. data/app/views/spree/components/auth/_forgot_form.html.erb +0 -28
  134. data/app/views/spree/components/auth/_guest_form.html.erb +0 -31
  135. data/app/views/spree/components/auth/_login_form.html.erb +0 -42
  136. data/app/views/spree/components/auth/_signup_form.html.erb +0 -48
  137. data/app/views/spree/components/brand/_logo.html.erb +0 -3
  138. data/app/views/spree/components/buttons/_button_inline.html.erb +0 -23
  139. data/app/views/spree/components/buttons/_button_primary.html.erb +0 -29
  140. data/app/views/spree/components/cart/_cart_adjustment.html.erb +0 -15
  141. data/app/views/spree/components/cart/_cart_adjustments.html.erb +0 -47
  142. data/app/views/spree/components/cart/_cart_amount_row.html.erb +0 -12
  143. data/app/views/spree/components/cart/_cart_empty.html.erb +0 -9
  144. data/app/views/spree/components/cart/_cart_footer.html.erb +0 -15
  145. data/app/views/spree/components/cart/_cart_header.html.erb +0 -17
  146. data/app/views/spree/components/cart/_cart_item.html.erb +0 -52
  147. data/app/views/spree/components/cart/_cart_items.html.erb +0 -23
  148. data/app/views/spree/components/cart/_cart_link.html.erb +0 -9
  149. data/app/views/spree/components/cart/_cart_secondary_actions.html.erb +0 -17
  150. data/app/views/spree/components/cart/_item_info.html.erb +0 -26
  151. data/app/views/spree/components/checkout/_checkout_header.html.erb +0 -8
  152. data/app/views/spree/components/checkout/_checkout_step.html.erb +0 -21
  153. data/app/views/spree/components/checkout/_checkout_summary.html.erb +0 -70
  154. data/app/views/spree/components/checkout/_existing_cards.html.erb +0 -39
  155. data/app/views/spree/components/checkout/_payment_method_controls.html.erb +0 -10
  156. data/app/views/spree/components/checkout/_payment_method_selector.html.erb +0 -14
  157. data/app/views/spree/components/checkout/_proposed_shipment.erb +0 -18
  158. data/app/views/spree/components/checkout/_shipment_items.html.erb +0 -22
  159. data/app/views/spree/components/checkout/_shipping_methods.html.erb +0 -20
  160. data/app/views/spree/components/checkout/_unshippable_items.html.erb +0 -7
  161. data/app/views/spree/components/checkout/steps/_address_step.html.erb +0 -60
  162. data/app/views/spree/components/checkout/steps/_confirm_step.html.erb +0 -31
  163. data/app/views/spree/components/checkout/steps/_delivery_step.html.erb +0 -31
  164. data/app/views/spree/components/checkout/steps/_payment_step.html.erb +0 -25
  165. data/app/views/spree/components/forms/_address_inputs.html.erb +0 -152
  166. data/app/views/spree/components/forms/inputs/_checkbox_input.html.erb +0 -29
  167. data/app/views/spree/components/forms/inputs/_collection_select.html.erb +0 -42
  168. data/app/views/spree/components/forms/inputs/_radio_input.html.erb +0 -29
  169. data/app/views/spree/components/forms/inputs/_select_input.html.erb +0 -31
  170. data/app/views/spree/components/forms/inputs/_text.html.erb +0 -54
  171. data/app/views/spree/components/forms/inputs/_textarea_input.html.erb +0 -42
  172. data/app/views/spree/components/layout/_category_navigation.html.erb +0 -3
  173. data/app/views/spree/components/layout/_footer.html.erb +0 -7
  174. data/app/views/spree/components/layout/_header.html.erb +0 -8
  175. data/app/views/spree/components/layout/_top_bar.html.erb +0 -8
  176. data/app/views/spree/components/navigation/_auth_link.html.erb +0 -1
  177. data/app/views/spree/components/navigation/_breadcrumbs.html.erb +0 -47
  178. data/app/views/spree/components/navigation/_categories.html.erb +0 -12
  179. data/app/views/spree/components/navigation/_locale_selector.html.erb +0 -25
  180. data/app/views/spree/components/navigation/_taxonomies.html.erb +0 -17
  181. data/app/views/spree/components/navigation/_taxons.html.erb +0 -17
  182. data/app/views/spree/components/navigation/_taxons_tree.html.erb +0 -29
  183. data/app/views/spree/components/orders/_address_overview.html.erb +0 -40
  184. data/app/views/spree/components/orders/_coupon_code.html.erb +0 -22
  185. data/app/views/spree/components/orders/_line_items.html.erb +0 -55
  186. data/app/views/spree/components/orders/_order_details.html.erb +0 -35
  187. data/app/views/spree/components/orders/_order_item.html.erb +0 -33
  188. data/app/views/spree/components/orders/_order_items.html.erb +0 -5
  189. data/app/views/spree/components/orders/_order_shipments.html.erb +0 -25
  190. data/app/views/spree/components/orders/_payment_info.html.erb +0 -31
  191. data/app/views/spree/components/presentation/_hero.html.erb +0 -14
  192. data/app/views/spree/components/products/_product-card.html.erb +0 -36
  193. data/app/views/spree/components/products/_product_availability.html.erb +0 -19
  194. data/app/views/spree/components/products/_product_form.html.erb +0 -21
  195. data/app/views/spree/components/products/_product_image.html.erb +0 -6
  196. data/app/views/spree/components/products/_product_info.html.erb +0 -9
  197. data/app/views/spree/components/products/_product_promotions.html.erb +0 -25
  198. data/app/views/spree/components/products/_product_properties.html.erb +0 -19
  199. data/app/views/spree/components/products/_product_submit.html.erb +0 -39
  200. data/app/views/spree/components/products/_product_taxons.html.erb +0 -15
  201. data/app/views/spree/components/products/_product_thumbnails.html.erb +0 -19
  202. data/app/views/spree/components/products/_product_variants.html.erb +0 -36
  203. data/app/views/spree/components/products/_products-grid.html.erb +0 -13
  204. data/app/views/spree/components/products/_products.html.erb +0 -28
  205. data/app/views/spree/components/products/_products_by_taxon.html.erb +0 -7
  206. data/app/views/spree/components/products/_variants_list.html.erb +0 -12
  207. data/app/views/spree/components/search/_filter.html.erb +0 -42
  208. data/app/views/spree/components/search/_filters.html.erb +0 -20
  209. data/app/views/spree/components/search/_form.html.erb +0 -12
  210. data/app/views/spree/components/search/_products_search.html.erb +0 -36
  211. data/app/views/spree/components/search/_search_bar.html.erb +0 -36
  212. data/app/views/spree/components/typography/_hero_title.html.erb +0 -11
  213. data/app/views/spree/components/typography/_subtitle.html.erb +0 -11
  214. data/app/views/spree/home/index.html.erb +0 -7
  215. data/app/views/spree/layouts/spree_application.html.erb +0 -27
  216. data/app/views/spree/orders/edit.html.erb +0 -21
  217. data/app/views/spree/orders/show.html.erb +0 -29
  218. data/app/views/spree/products/index.html.erb +0 -22
  219. data/app/views/spree/products/show.html.erb +0 -18
  220. data/app/views/spree/shared/_image.html.erb +0 -12
  221. data/app/views/spree/shared/_link_to_cart.html.erb +0 -1
  222. data/app/views/spree/shared/_login_bar_items.html.erb +0 -1
  223. data/app/views/spree/shared/_shipment_tracking.html.erb +0 -11
  224. data/app/views/spree/shared/unauthorized.html.erb +0 -0
  225. data/app/views/spree/taxons/show.html.erb +0 -17
  226. data/bin/console +0 -17
  227. data/bin/r +0 -13
  228. data/bin/rails +0 -7
  229. data/bin/rake +0 -7
  230. data/bin/rspec +0 -29
  231. data/bin/sandbox +0 -84
  232. data/bin/sandbox_rails +0 -18
  233. data/bin/setup +0 -8
  234. data/bin/solidus_compare +0 -155
  235. data/config/initializers/assets.rb +0 -1
  236. data/config/initializers/canonical_rails.rb +0 -16
  237. data/config/locales/en.yml +0 -5
  238. data/config/routes.rb +0 -33
  239. data/config/solidus_compare.yml +0 -33
  240. data/docs/development.md +0 -28
  241. data/exe/solidus_starter_frontend +0 -9
  242. data/lib/generators/solidus_starter_frontend/install/install_generator.rb +0 -15
  243. data/lib/generators/solidus_starter_frontend/solidus_starter_frontend_generator.rb +0 -30
  244. data/lib/generators/solidus_starter_frontend/views/override_generator.rb +0 -50
  245. data/lib/solidus_starter_frontend/config.rb +0 -7
  246. data/lib/solidus_starter_frontend/engine.rb +0 -34
  247. data/lib/solidus_starter_frontend/factories.rb +0 -4
  248. data/lib/solidus_starter_frontend/solidus_support_extensions.rb +0 -9
  249. data/lib/solidus_starter_frontend/version.rb +0 -5
  250. data/lib/solidus_starter_frontend.rb +0 -12
  251. data/lib/solidus_starter_frontend_configuration.rb +0 -8
  252. data/lib/views/auth/spree/checkout/registration.html.erb +0 -7
  253. data/lib/views/auth/spree/components/navigation/_auth_link.html.erb +0 -5
  254. data/lib/views/auth/spree/user_passwords/edit.html.erb +0 -7
  255. data/lib/views/auth/spree/user_passwords/new.html.erb +0 -5
  256. data/lib/views/auth/spree/user_registrations/new.html.erb +0 -7
  257. data/lib/views/auth/spree/user_sessions/guest.html.erb +0 -5
  258. data/lib/views/auth/spree/user_sessions/new.html.erb +0 -7
  259. data/lib/views/auth/spree/users/edit.html.erb +0 -45
  260. data/lib/views/auth/spree/users/show.html.erb +0 -55
  261. data/solidus_starter_frontend.gemspec +0 -43
  262. data/spec/controllers/controller_helpers_spec.rb +0 -29
  263. data/spec/controllers/locale_controller_spec.rb +0 -57
  264. data/spec/controllers/spree/checkout_controller_spec.rb +0 -563
  265. data/spec/controllers/spree/checkout_controller_with_views_spec.rb +0 -37
  266. data/spec/controllers/spree/current_order_tracking_spec.rb +0 -33
  267. data/spec/controllers/spree/home_controller_spec.rb +0 -29
  268. data/spec/controllers/spree/orders_controller_ability_spec.rb +0 -90
  269. data/spec/controllers/spree/orders_controller_spec.rb +0 -241
  270. data/spec/controllers/spree/orders_controller_transitions_spec.rb +0 -33
  271. data/spec/controllers/spree/products_controller_spec.rb +0 -38
  272. data/spec/controllers/spree/taxons_controller_spec.rb +0 -14
  273. data/spec/fixtures/thinking-cat.jpg +0 -0
  274. data/spec/generators/solidus/views/override_generator_spec.rb +0 -50
  275. data/spec/helpers/base_helper_spec.rb +0 -13
  276. data/spec/helpers/order_helper_spec.rb +0 -14
  277. data/spec/helpers/taxon_filters_helper_spec.rb +0 -12
  278. data/spec/spec_helper.rb +0 -64
  279. data/spec/support/shared_contexts/checkout_setup.rb +0 -12
  280. data/spec/support/shared_contexts/custom_products.rb +0 -28
  281. data/spec/support/shared_contexts/locales.rb +0 -16
  282. data/spec/system/address_spec.rb +0 -87
  283. data/spec/system/automatic_promotion_adjustments_spec.rb +0 -49
  284. data/spec/system/caching/products_spec.rb +0 -48
  285. data/spec/system/caching/taxons_spec.rb +0 -35
  286. data/spec/system/cart_spec.rb +0 -81
  287. data/spec/system/checkout_confirm_insufficient_stock_spec.rb +0 -71
  288. data/spec/system/checkout_spec.rb +0 -699
  289. data/spec/system/checkout_unshippable_spec.rb +0 -37
  290. data/spec/system/coupon_code_spec.rb +0 -267
  291. data/spec/system/currency_spec.rb +0 -20
  292. data/spec/system/first_order_promotion_spec.rb +0 -59
  293. data/spec/system/free_shipping_promotions_spec.rb +0 -60
  294. data/spec/system/locale_spec.rb +0 -26
  295. data/spec/system/order_spec.rb +0 -57
  296. data/spec/system/products_spec.rb +0 -302
  297. data/spec/system/promotion_code_invalidation_spec.rb +0 -54
  298. data/spec/system/quantity_promotions_spec.rb +0 -130
  299. data/spec/system/taxons_spec.rb +0 -158
  300. data/spec/system/template_rendering_spec.rb +0 -20
  301. data/spec/views/spree/checkout/_summary_spec.rb +0 -11
@@ -1,89 +0,0 @@
1
- // General
2
- @import "spree/frontend/variables/colors";
3
-
4
- // Base
5
- @import "spree/frontend/base/reset";
6
- @import "spree/frontend/base/base";
7
- @import 'spree/frontend/base/responsive';
8
-
9
- // Placeholders
10
- @import "spree/frontend/placeholders/main";
11
-
12
- // Components
13
- @import "spree/frontend/components/account/account_summary";
14
- @import "spree/frontend/components/account/account_order";
15
- @import "spree/frontend/components/auth/auth_container";
16
- @import "spree/frontend/components/auth/auth_form";
17
- @import "spree/frontend/components/brand/logo";
18
- @import "spree/frontend/components/buttons/button_inline";
19
- @import "spree/frontend/components/buttons/button_primary";
20
- @import "spree/frontend/components/cart/cart_adjustments";
21
- @import "spree/frontend/components/cart/cart_amount_row";
22
- @import "spree/frontend/components/cart/cart_empty";
23
- @import "spree/frontend/components/cart/cart_footer";
24
- @import "spree/frontend/components/cart/cart_header";
25
- @import "spree/frontend/components/cart/cart_item";
26
- @import "spree/frontend/components/cart/cart_link";
27
- @import "spree/frontend/components/cart/cart_page";
28
- @import "spree/frontend/components/cart/cart_secondary_actions";
29
- @import "spree/frontend/components/cart/coupon_code";
30
- @import "spree/frontend/components/cart/item_info";
31
- @import "spree/frontend/components/checkout/checkout";
32
- @import "spree/frontend/components/checkout/checkout_header";
33
- @import "spree/frontend/components/checkout/checkout_summary";
34
- @import "spree/frontend/components/checkout/proposed_shipment";
35
- @import "spree/frontend/components/checkout/existing_cards";
36
- @import "spree/frontend/components/checkout/payment_method_controls";
37
- @import "spree/frontend/components/checkout/payment_method_selector";
38
- @import "spree/frontend/components/checkout/progress_steps";
39
- @import "spree/frontend/components/checkout/shipment_items";
40
- @import "spree/frontend/components/checkout/shipping_methods";
41
- @import "spree/frontend/components/checkout/payments/gateway_payment_method";
42
- @import "spree/frontend/components/checkout/steps/address_step";
43
- @import "spree/frontend/components/checkout/steps/confirm_step";
44
- @import "spree/frontend/components/checkout/steps/delivery_step";
45
- @import "spree/frontend/components/checkout/steps/payment_step";
46
- @import "spree/frontend/components/forms/address_inputs";
47
- @import "spree/frontend/components/forms/inputs/checkbox_input";
48
- @import "spree/frontend/components/forms/inputs/radio_input";
49
- @import "spree/frontend/components/forms/inputs/select_input";
50
- @import "spree/frontend/components/forms/inputs/textarea_input";
51
- @import "spree/frontend/components/forms/inputs/text";
52
- @import "spree/frontend/components/general/flash";
53
- @import "spree/frontend/components/layout/header";
54
- @import "spree/frontend/components/layout/breadcrumbs";
55
- @import "spree/frontend/components/layout/aside";
56
- @import "spree/frontend/components/layout/footer";
57
- @import "spree/frontend/components/layout/horizontal_input_group";
58
- @import 'spree/frontend/components/layout/top_bar';
59
- @import 'spree/frontend/components/layout/category_navigation';
60
- @import "spree/frontend/components/navigation/auth_link";
61
- @import "spree/frontend/components/navigation/categories";
62
- @import "spree/frontend/components/navigation/taxonomies";
63
- @import "spree/frontend/components/navigation/taxonomy";
64
- @import "spree/frontend/components/navigation/locale_selector";
65
- @import "spree/frontend/components/orders/address_overview";
66
- @import "spree/frontend/components/orders/coupon_codes";
67
- @import "spree/frontend/components/orders/line_items";
68
- @import "spree/frontend/components/orders/order_details";
69
- @import "spree/frontend/components/orders/order_item";
70
- @import "spree/frontend/components/orders/order_page";
71
- @import "spree/frontend/components/orders/order_shipments";
72
- @import "spree/frontend/components/orders/payment_info";
73
- @import "spree/frontend/components/presentation/hero";
74
- @import "spree/frontend/components/products/products";
75
- @import "spree/frontend/components/products/product_card";
76
- @import "spree/frontend/components/products/product_image";
77
- @import "spree/frontend/components/products/product_info";
78
- @import "spree/frontend/components/products/product_page";
79
- @import "spree/frontend/components/products/product_properties";
80
- @import "spree/frontend/components/products/product_submit";
81
- @import "spree/frontend/components/products/product_taxons";
82
- @import "spree/frontend/components/products/product_thumbnails";
83
- @import "spree/frontend/components/products/product_variants";
84
- @import "spree/frontend/components/products/products_by_taxon";
85
- @import "spree/frontend/components/products/products_grid";
86
- @import "spree/frontend/components/search/search_bar";
87
- @import "spree/frontend/components/search/filter";
88
- @import "spree/frontend/components/typography/hero_title";
89
- @import "spree/frontend/components/typography/subtitle";
@@ -1,7 +0,0 @@
1
- /*
2
- * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
- * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
- * the top of the compiled file, but it's generally better to create a new file per style scope.
5
- *
6
- *= require spree/frontend/screen
7
- */
@@ -1,20 +0,0 @@
1
- /*--------------------------------------*/
2
- /* Colors
3
- /*--------------------------------------*/
4
-
5
- $color_accent: #3C76f0;
6
-
7
- $color-background-alert: #fdd200;
8
- $color-background-dark: #24282f;
9
- $color-background-error: #e4361b;
10
- $color-background-light: #f2f2f2;
11
- $color-background-success: #1bc16d;
12
-
13
- $color-border: #ddd;
14
- $color-border-dark: #222;
15
- $color-border-medium: #d8d8d8;
16
- $color-border-light: #f2f2f2;
17
-
18
- $color-copy: #222;
19
- $color-copy-light: #777;
20
- $color-copy-bright: #fff;
@@ -1,8 +0,0 @@
1
- /*
2
- Solidus Dummy app generator creates a vendor manifest in vendor/assets/stylesheets/frontend/all
3
- that requires this file: spree/frontend.
4
- Inside solidus_starter_frontend we don't need anything from spree/frontend,
5
- but the file must be there for the dummy application that expects it.
6
- This approach is in order to don't have to make changes in the solidus_core
7
- dummy app generator in the process of developing this extension.
8
- */
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusStarterFrontend
4
- module AuthViews
5
- extend ActiveSupport::Concern
6
- included do
7
- before_action :configure_views
8
- end
9
-
10
- protected
11
-
12
- def configure_views
13
- prepend_view_path Engine.root.join('lib', 'views', 'auth')
14
- end
15
- end
16
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusStarterFrontend
4
- module Taxonomies
5
- extend ActiveSupport::Concern
6
- included do
7
- helper_method :taxonomies
8
- end
9
-
10
- protected
11
-
12
- def taxonomies
13
- @taxonomies ||= Spree::Taxonomy.includes(root: :children)
14
- end
15
- end
16
- end
@@ -1,249 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- # This is somewhat contrary to standard REST convention since there is not
5
- # actually a Checkout object. There's enough distinct logic specific to
6
- # checkout which has nothing to do with updating an order that this approach
7
- # is warranted.
8
- class CheckoutController < Spree::StoreController
9
- before_action :load_order
10
- around_action :lock_order
11
-
12
- before_action :ensure_order_is_not_skipping_states
13
- before_action :ensure_order_not_completed
14
- before_action :ensure_checkout_allowed
15
- before_action :ensure_sufficient_stock_lines
16
- before_action :ensure_valid_state
17
-
18
- before_action :associate_user
19
- before_action :check_authorization
20
-
21
- before_action :setup_for_current_state, only: [:edit, :update]
22
-
23
- helper 'spree/orders'
24
-
25
- rescue_from Spree::Core::GatewayError, with: :rescue_from_spree_gateway_error
26
- rescue_from Spree::Order::InsufficientStock, with: :insufficient_stock_error
27
-
28
- # Updates the order and advances to the next state (when possible.)
29
- def update
30
- if update_order
31
-
32
- assign_temp_address
33
-
34
- unless transition_forward
35
- redirect_on_failure
36
- return
37
- end
38
-
39
- if @order.completed?
40
- finalize_order
41
- else
42
- send_to_next_state
43
- end
44
-
45
- else
46
- render :edit
47
- end
48
- end
49
-
50
- private
51
-
52
- def update_order
53
- OrderUpdateAttributes.new(@order, update_params, request_env: request.headers.env).apply
54
- end
55
-
56
- def assign_temp_address
57
- @order.temporary_address = !params[:save_user_address]
58
- end
59
-
60
- def redirect_on_failure
61
- flash[:error] = @order.errors.full_messages.join("\n")
62
- redirect_to(checkout_state_path(@order.state))
63
- end
64
-
65
- def transition_forward
66
- if @order.can_complete?
67
- @order.complete
68
- else
69
- @order.next
70
- end
71
- end
72
-
73
- def finalize_order
74
- @current_order = nil
75
- set_successful_flash_notice
76
- redirect_to completion_route
77
- end
78
-
79
- def set_successful_flash_notice
80
- flash.notice = t('spree.order_processed_successfully')
81
- flash['order_completed'] = true
82
- end
83
-
84
- def send_to_next_state
85
- redirect_to checkout_state_path(@order.state)
86
- end
87
-
88
- def update_params
89
- case params[:state].to_sym
90
- when :address
91
- massaged_params.require(:order).permit(
92
- permitted_checkout_address_attributes
93
- )
94
- when :delivery
95
- massaged_params.require(:order).permit(
96
- permitted_checkout_delivery_attributes
97
- )
98
- when :payment
99
- massaged_params.require(:order).permit(
100
- permitted_checkout_payment_attributes
101
- )
102
- else
103
- massaged_params.fetch(:order, {}).permit(
104
- permitted_checkout_confirm_attributes
105
- )
106
- end
107
- end
108
-
109
- def massaged_params
110
- massaged_params = params.deep_dup
111
-
112
- move_payment_source_into_payments_attributes(massaged_params)
113
- move_wallet_payment_source_id_into_payments_attributes(massaged_params)
114
- set_payment_parameters_amount(massaged_params, @order)
115
-
116
- massaged_params
117
- end
118
-
119
- def ensure_valid_state
120
- unless skip_state_validation?
121
- if (params[:state] && !@order.has_checkout_step?(params[:state])) ||
122
- (!params[:state] && !@order.has_checkout_step?(@order.state))
123
- @order.state = 'cart'
124
- redirect_to checkout_state_path(@order.checkout_steps.first)
125
- end
126
- end
127
-
128
- # Fix for https://github.com/spree/spree/issues/4117
129
- # If confirmation of payment fails, redirect back to payment screen
130
- if params[:state] == "confirm" && @order.payment_required? && @order.payments.valid.empty?
131
- flash.keep
132
- redirect_to checkout_state_path("payment")
133
- end
134
- end
135
-
136
- # Should be overriden if you have areas of your checkout that don't match
137
- # up to a step within checkout_steps, such as a registration step
138
- def skip_state_validation?
139
- false
140
- end
141
-
142
- def load_order
143
- @order = current_order
144
- redirect_to(spree.cart_path) && return unless @order
145
- end
146
-
147
- # Allow the customer to only go back or stay on the current state
148
- # when trying to change it via params[:state]. It's not allowed to
149
- # jump forward and skip states (unless #skip_state_validation? is
150
- # truthy).
151
- def ensure_order_is_not_skipping_states
152
- if params[:state]
153
- redirect_to checkout_state_path(@order.state) if @order.can_go_to_state?(params[:state]) && !skip_state_validation?
154
- @order.state = params[:state]
155
- end
156
- end
157
-
158
- def set_state_if_present
159
- ensure_order_is_not_skipping_states
160
- end
161
- deprecate set_state_if_present: :prevent_order_from_skipping_states, deprecator: Spree::Deprecation
162
-
163
- def ensure_checkout_allowed
164
- unless @order.checkout_allowed?
165
- redirect_to spree.cart_path
166
- end
167
- end
168
-
169
- def ensure_order_not_completed
170
- redirect_to spree.cart_path if @order.completed?
171
- end
172
-
173
- def ensure_sufficient_stock_lines
174
- if @order.insufficient_stock_lines.present?
175
- out_of_stock_items = @order.insufficient_stock_lines.collect(&:name).to_sentence
176
- flash[:error] = t('spree.inventory_error_flash_for_insufficient_quantity', names: out_of_stock_items)
177
- redirect_to spree.cart_path
178
- end
179
- end
180
-
181
- # Provides a route to redirect after order completion
182
- def completion_route
183
- spree.order_path(@order)
184
- end
185
-
186
- def setup_for_current_state
187
- method_name = :"before_#{@order.state}"
188
- send(method_name) if respond_to?(method_name, true)
189
- end
190
-
191
- def before_address
192
- @order.assign_default_user_addresses
193
- # If the user has a default address, the previous method call takes care
194
- # of setting that; but if he doesn't, we need to build an empty one here
195
- @order.bill_address ||= Spree::Address.build_default
196
- @order.ship_address ||= Spree::Address.build_default if @order.checkout_steps.include?('delivery')
197
- end
198
-
199
- def before_delivery
200
- return if params[:order].present?
201
-
202
- packages = @order.shipments.map(&:to_package)
203
- @differentiator = Spree::Stock::Differentiator.new(@order, packages)
204
- end
205
-
206
- def before_payment
207
- if @order.checkout_steps.include? "delivery"
208
- packages = @order.shipments.map(&:to_package)
209
- @differentiator = Spree::Stock::Differentiator.new(@order, packages)
210
- @differentiator.missing.each do |variant, quantity|
211
- @order.contents.remove(variant, quantity)
212
- end
213
- end
214
-
215
- if try_spree_current_user && try_spree_current_user.respond_to?(:wallet)
216
- @wallet_payment_sources = try_spree_current_user.wallet.wallet_payment_sources
217
- @default_wallet_payment_source = @wallet_payment_sources.detect(&:default) ||
218
- @wallet_payment_sources.first
219
- end
220
- end
221
-
222
- def rescue_from_spree_gateway_error(exception)
223
- flash.now[:error] = t('spree.spree_gateway_error_flash_for_checkout')
224
- @order.errors.add(:base, exception.message)
225
- render :edit
226
- end
227
-
228
- def check_authorization
229
- authorize!(:edit, current_order, cookies.signed[:guest_token])
230
- end
231
-
232
- def insufficient_stock_error
233
- packages = @order.shipments.map(&:to_package)
234
- if packages.empty?
235
- flash[:error] = I18n.t('spree.insufficient_stock_for_order')
236
- redirect_to cart_path
237
- else
238
- availability_validator = Spree::Stock::AvailabilityValidator.new
239
- unavailable_items = @order.line_items.reject { |line_item| availability_validator.validate(line_item) }
240
- if unavailable_items.any?
241
- item_names = unavailable_items.map(&:name).to_sentence
242
- flash[:error] = t('spree.inventory_error_flash_for_insufficient_shipment_quantity', unavailable_items: item_names)
243
- @order.restart_checkout_flow
244
- redirect_to spree.checkout_state_path(@order.state)
245
- end
246
- end
247
- end
248
- end
249
- end
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- class CouponCodesController < Spree::StoreController
5
- before_action :load_order, only: :create
6
- around_action :lock_order, only: :create
7
-
8
- def create
9
- authorize! :update, @order, cookies.signed[:guest_token]
10
-
11
- if params[:coupon_code].present?
12
- @order.coupon_code = params[:coupon_code]
13
- handler = PromotionHandler::Coupon.new(@order).apply
14
-
15
- respond_with(@order) do |format|
16
- format.html do
17
- if handler.successful?
18
- flash[:success] = handler.success
19
- else
20
- flash[:error] = handler.error
21
- end
22
-
23
- redirect_back fallback_location: cart_path
24
- end
25
- end
26
- end
27
- end
28
-
29
- private
30
-
31
- def load_order
32
- @order = current_order
33
- end
34
- end
35
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- class HomeController < Spree::StoreController
5
- helper 'spree/products'
6
- respond_to :html
7
-
8
- def index
9
- @searcher = build_searcher(params.merge(include_images: true))
10
- @products = @searcher.retrieve_products
11
- end
12
- end
13
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- class LocaleController < Spree::StoreController
5
- def set
6
- available_locales = Spree.i18n_available_locales
7
- requested_locale = params[:switch_to_locale] || params[:locale]
8
-
9
- if requested_locale && available_locales.map(&:to_s).include?(requested_locale)
10
- session[set_user_language_locale_key] = requested_locale
11
- I18n.locale = requested_locale
12
- flash.notice = t('spree.locale_changed')
13
- else
14
- flash[:error] = t('spree.locale_not_changed')
15
- end
16
-
17
- redirect_to spree.root_path
18
- end
19
- end
20
- end
@@ -1,126 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- class OrdersController < Spree::StoreController
5
- helper 'spree/products', 'spree/orders'
6
-
7
- respond_to :html
8
-
9
- before_action :store_guest_token
10
- before_action :assign_order, only: :update
11
- # note: do not lock the #edit action because that's where we redirect when we fail to acquire a lock
12
- around_action :lock_order, only: :update
13
- skip_before_action :verify_authenticity_token, only: [:populate]
14
-
15
- def show
16
- @order = Spree::Order.find_by!(number: params[:id])
17
- authorize! :read, @order, cookies.signed[:guest_token]
18
- end
19
-
20
- def update
21
- authorize! :update, @order, cookies.signed[:guest_token]
22
- if @order.contents.update_cart(order_params)
23
- @order.next if params.key?(:checkout) && @order.cart?
24
-
25
- respond_with(@order) do |format|
26
- format.html do
27
- if params.key?(:checkout)
28
- redirect_to checkout_state_path(@order.checkout_steps.first)
29
- else
30
- redirect_to cart_path
31
- end
32
- end
33
- end
34
- else
35
- respond_with(@order)
36
- end
37
- end
38
-
39
- # Shows the current incomplete order from the session
40
- def edit
41
- @order = current_order(build_order_if_necessary: true)
42
- authorize! :read, @order, cookies.signed[:guest_token]
43
- associate_user
44
- if params[:id] && @order.number != params[:id]
45
- flash[:error] = t('spree.cannot_edit_orders')
46
- redirect_to cart_path
47
- end
48
- end
49
-
50
- # Adds a new item to the order (creating a new order if none already exists)
51
- def populate
52
- @order = current_order(create_order_if_necessary: true)
53
- authorize! :update, @order, cookies.signed[:guest_token]
54
-
55
- variant = Spree::Variant.find(params[:variant_id])
56
- quantity = params[:quantity].present? ? params[:quantity].to_i : 1
57
-
58
- # 2,147,483,647 is crazy. See issue https://github.com/spree/spree/issues/2695.
59
- if !quantity.between?(1, 2_147_483_647)
60
- @order.errors.add(:base, t('spree.please_enter_reasonable_quantity'))
61
- else
62
- begin
63
- @line_item = @order.contents.add(variant, quantity)
64
- rescue ActiveRecord::RecordInvalid => e
65
- @order.errors.add(:base, e.record.errors.full_messages.join(", "))
66
- end
67
- end
68
-
69
- respond_with(@order) do |format|
70
- format.html do
71
- if @order.errors.any?
72
- flash[:error] = @order.errors.full_messages.join(", ")
73
- redirect_back_or_default(spree.root_path)
74
- return
75
- else
76
- redirect_to cart_path
77
- end
78
- end
79
- end
80
- end
81
-
82
- def populate_redirect
83
- flash[:error] = t('spree.populate_get_error')
84
- redirect_to spree.cart_path
85
- end
86
-
87
- def empty
88
- if @order = current_order
89
- authorize! :update, @order, cookies.signed[:guest_token]
90
- @order.empty!
91
- end
92
-
93
- redirect_to spree.cart_path
94
- end
95
-
96
- def accurate_title
97
- if @order && @order.completed?
98
- t('spree.order_number', number: @order.number)
99
- else
100
- t('spree.shopping_cart')
101
- end
102
- end
103
-
104
- private
105
-
106
- def store_guest_token
107
- cookies.permanent.signed[:guest_token] = params[:token] if params[:token]
108
- end
109
-
110
- def order_params
111
- if params[:order]
112
- params[:order].permit(*permitted_order_attributes)
113
- else
114
- {}
115
- end
116
- end
117
-
118
- def assign_order
119
- @order = current_order
120
- unless @order
121
- flash[:error] = t('spree.order_not_found')
122
- redirect_to(root_path) && return
123
- end
124
- end
125
- end
126
- end
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- class ProductsController < Spree::StoreController
5
- before_action :load_product, only: :show
6
- before_action :load_taxon, only: :index
7
-
8
- helper 'spree/taxons', 'spree/taxon_filters'
9
-
10
- respond_to :html
11
-
12
- def index
13
- @searcher = build_searcher(params.merge(include_images: true))
14
- @products = @searcher.retrieve_products
15
- end
16
-
17
- def show
18
- @variants = @product.
19
- variants_including_master.
20
- display_includes.
21
- with_prices(current_pricing_options).
22
- includes([:option_values, :images])
23
-
24
- @product_properties = @product.product_properties.includes(:property)
25
- @taxon = Spree::Taxon.find(params[:taxon_id]) if params[:taxon_id]
26
- end
27
-
28
- private
29
-
30
- def accurate_title
31
- if @product
32
- @product.meta_title.blank? ? @product.name : @product.meta_title
33
- else
34
- super
35
- end
36
- end
37
-
38
- def load_product
39
- if try_spree_current_user.try(:has_spree_role?, "admin")
40
- @products = Spree::Product.with_discarded
41
- else
42
- @products = Spree::Product.available
43
- end
44
- @product = @products.friendly.find(params[:id])
45
- end
46
-
47
- def load_taxon
48
- @taxon = Spree::Taxon.find(params[:taxon]) if params[:taxon].present?
49
- end
50
- end
51
- end