spree_frontend 4.0.9 → 4.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/app/assets/images/arrow-right.svg +1 -0
  4. data/app/assets/images/arrow.svg +1 -0
  5. data/app/assets/images/bag.svg +1 -0
  6. data/app/assets/images/burger.svg +1 -0
  7. data/app/assets/images/check-mark-circle.png +0 -0
  8. data/app/assets/images/check-mark-circle.svg +1 -0
  9. data/app/assets/images/check-mark.svg +1 -0
  10. data/app/assets/images/circle-radio.svg +1 -0
  11. data/app/assets/images/circle.svg +1 -0
  12. data/app/assets/images/close.svg +1 -0
  13. data/app/assets/images/credit_cards/icons/american_express.svg +1 -0
  14. data/app/assets/images/credit_cards/icons/diners_club.svg +1 -0
  15. data/app/assets/images/credit_cards/icons/discover.svg +1 -0
  16. data/app/assets/images/credit_cards/icons/generic.svg +1 -0
  17. data/app/assets/images/credit_cards/icons/jcb.svg +1 -0
  18. data/app/assets/images/credit_cards/icons/maestro.svg +1 -0
  19. data/app/assets/images/credit_cards/icons/master.svg +1 -0
  20. data/app/assets/images/credit_cards/icons/visa.svg +1 -0
  21. data/app/assets/images/edit.svg +1 -0
  22. data/app/assets/images/empty-cart.svg +1 -0
  23. data/app/assets/images/error.svg +1 -0
  24. data/app/assets/images/facebook.svg +1 -0
  25. data/app/assets/images/full_circle-radio.svg +1 -0
  26. data/app/assets/images/full_circle.svg +1 -0
  27. data/app/assets/images/garbage.svg +1 -0
  28. data/app/assets/images/garbage_2.svg +1 -0
  29. data/app/assets/images/homepage/big_category_banner.jpg +0 -0
  30. data/app/assets/images/homepage/big_category_banner_mobile.jpg +0 -0
  31. data/app/assets/images/homepage/big_category_banner_tablet_landscape.jpg +0 -0
  32. data/app/assets/images/homepage/big_category_banner_tablet_portrait.jpg +0 -0
  33. data/app/assets/images/homepage/category_banner_lower.jpg +0 -0
  34. data/app/assets/images/homepage/category_banner_lower_mobile.jpg +0 -0
  35. data/app/assets/images/homepage/category_banner_lower_tablet_landscape.jpg +0 -0
  36. data/app/assets/images/homepage/category_banner_lower_tablet_portrait.jpg +0 -0
  37. data/app/assets/images/homepage/category_banner_upper.jpg +0 -0
  38. data/app/assets/images/homepage/category_banner_upper_mobile.jpg +0 -0
  39. data/app/assets/images/homepage/category_banner_upper_tablet_landscape.jpg +0 -0
  40. data/app/assets/images/homepage/category_banner_upper_tablet_portrait.jpg +0 -0
  41. data/app/assets/images/homepage/main_banner.jpg +0 -0
  42. data/app/assets/images/homepage/main_banner_mobile.jpg +0 -0
  43. data/app/assets/images/homepage/main_banner_tablet_landscape.jpg +0 -0
  44. data/app/assets/images/homepage/main_banner_tablet_portrait.jpg +0 -0
  45. data/app/assets/images/homepage/products.jpg +0 -0
  46. data/app/assets/images/homepage/promo_banner_left.jpg +0 -0
  47. data/app/assets/images/homepage/promo_banner_left_mobile.jpg +0 -0
  48. data/app/assets/images/homepage/promo_banner_left_tablet_landscape.jpg +0 -0
  49. data/app/assets/images/homepage/promo_banner_left_tablet_portrait.jpg +0 -0
  50. data/app/assets/images/homepage/promo_banner_right.jpg +0 -0
  51. data/app/assets/images/homepage/promo_banner_right_mobile.jpg +0 -0
  52. data/app/assets/images/homepage/promo_banner_right_tablet_landscape.jpg +0 -0
  53. data/app/assets/images/homepage/promo_banner_right_tablet_portrait.jpg +0 -0
  54. data/app/assets/images/instagram.svg +1 -0
  55. data/app/assets/images/logo-spree.png +0 -0
  56. data/app/assets/images/logo.png +0 -0
  57. data/app/assets/images/logo.svg +1 -0
  58. data/app/assets/images/logo@2x.png +0 -0
  59. data/app/assets/images/logo@3x.png +0 -0
  60. data/app/assets/images/magnifying-glass.svg +1 -0
  61. data/app/assets/images/meganav/promo_banner_left-first-category.jpg +0 -0
  62. data/app/assets/images/meganav/promo_banner_left-second-category.jpg +0 -0
  63. data/app/assets/images/meganav/promo_banner_left-third-category.jpg +0 -0
  64. data/app/assets/images/meganav/promo_banner_right-first-category.jpg +0 -0
  65. data/app/assets/images/meganav/promo_banner_right-second-category.jpg +0 -0
  66. data/app/assets/images/meganav/promo_banner_right-third-category.jpg +0 -0
  67. data/app/assets/images/minus.svg +1 -0
  68. data/app/assets/images/noimage/big_category_banner.jpg +0 -0
  69. data/app/assets/images/noimage/big_category_banner_mobile.jpg +0 -0
  70. data/app/assets/images/noimage/big_category_banner_tablet_landscape.jpg +0 -0
  71. data/app/assets/images/noimage/big_category_banner_tablet_portrait.jpg +0 -0
  72. data/app/assets/images/noimage/category_banner.jpg +0 -0
  73. data/app/assets/images/noimage/category_banner_mobile.jpg +0 -0
  74. data/app/assets/images/noimage/category_banner_plp.jpg +0 -0
  75. data/app/assets/images/noimage/category_banner_tablet_landscape.jpg +0 -0
  76. data/app/assets/images/noimage/category_banner_tablet_portrait.jpg +0 -0
  77. data/app/assets/images/noimage/main_banner.jpg +0 -0
  78. data/app/assets/images/noimage/main_banner_mobile.jpg +0 -0
  79. data/app/assets/images/noimage/main_banner_tablet_landscape.jpg +0 -0
  80. data/app/assets/images/noimage/main_banner_tablet_portrait.jpg +0 -0
  81. data/app/assets/images/noimage/plp.png +0 -0
  82. data/app/assets/images/noimage/product_photo.jpg +0 -0
  83. data/app/assets/images/noimage/promo_banner.jpg +0 -0
  84. data/app/assets/images/noimage/promo_banner_megamenu.jpg +0 -0
  85. data/app/assets/images/noimage/promo_banner_mobile.jpg +0 -0
  86. data/app/assets/images/noimage/promo_banner_tablet_landscape.jpg +0 -0
  87. data/app/assets/images/noimage/promo_banner_tablet_portrait.jpg +0 -0
  88. data/app/assets/images/pagination-arrow-right.svg +12 -0
  89. data/app/assets/images/pagination-double-arrow-right.svg +15 -0
  90. data/app/assets/images/person.svg +1 -0
  91. data/app/assets/images/picture-zoom.svg +31 -0
  92. data/app/assets/images/plus.svg +1 -0
  93. data/app/assets/images/radio-button.svg +1 -0
  94. data/app/assets/images/search-no-results.svg +1 -0
  95. data/app/assets/images/search.svg +1 -0
  96. data/app/assets/images/spark-logo@3x.png +0 -0
  97. data/app/assets/images/twitter.svg +1 -0
  98. data/app/assets/images/vimeo.svg +1 -0
  99. data/app/assets/javascripts/spree/frontend/account.js +12 -0
  100. data/app/assets/javascripts/spree/frontend/api_tokens.js +4 -1
  101. data/app/assets/javascripts/spree/frontend/carousel-noconflict.js +3 -0
  102. data/app/assets/javascripts/spree/frontend/cart.js +61 -3
  103. data/app/assets/javascripts/spree/frontend/checkout/payment.js +24 -6
  104. data/app/assets/javascripts/spree/frontend/checkout/shipment.js +1 -1
  105. data/app/assets/javascripts/spree/frontend/checkout.js +42 -0
  106. data/app/assets/javascripts/spree/frontend/components-bootstrap/.gitkeep +0 -0
  107. data/app/assets/javascripts/spree/frontend/components-custom/.gitkeep +0 -0
  108. data/app/assets/javascripts/spree/frontend/coupon_manager.js +49 -1
  109. data/app/assets/javascripts/spree/frontend/viewport.js +7 -0
  110. data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +31 -0
  111. data/app/assets/javascripts/spree/frontend/views/spree/layouts/spree_application.js +35 -0
  112. data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +30 -0
  113. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +280 -0
  114. data/app/assets/javascripts/spree/frontend/views/spree/products/description.js +8 -0
  115. data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +37 -0
  116. data/app/assets/javascripts/spree/frontend/views/spree/products/modal_carousel.js +35 -0
  117. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/single.js +139 -0
  118. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/swipes.js +53 -0
  119. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/thumbnails.js +137 -0
  120. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel.js +129 -0
  121. data/app/assets/javascripts/spree/frontend/views/spree/shared/delete_address_popup.js +27 -0
  122. data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +123 -0
  123. data/app/assets/javascripts/spree/frontend/views/spree/shared/nav_bar.js +16 -0
  124. data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +28 -0
  125. data/app/assets/javascripts/spree/frontend/views/spree/shared/quantity_select.js +58 -0
  126. data/app/assets/javascripts/spree/frontend.js +9 -7
  127. data/app/assets/javascripts/spree/lazysizes.config.js +8 -0
  128. data/app/assets/stylesheets/spree/frontend/application.scss +54 -0
  129. data/app/assets/stylesheets/spree/frontend/bootstrap-patches.scss +11 -0
  130. data/app/assets/stylesheets/spree/frontend/components-bootstrap/.gitkeep +0 -0
  131. data/app/assets/stylesheets/spree/frontend/components-bootstrap/alert.scss +3 -0
  132. data/app/assets/stylesheets/spree/frontend/components-bootstrap/button.scss +8 -0
  133. data/app/assets/stylesheets/spree/frontend/components-bootstrap/carousel.scss +85 -0
  134. data/app/assets/stylesheets/spree/frontend/components-bootstrap/modal.scss +3 -0
  135. data/app/assets/stylesheets/spree/frontend/components-custom/.gitkeep +0 -0
  136. data/app/assets/stylesheets/spree/frontend/components-custom/headers.scss +28 -0
  137. data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +265 -0
  138. data/app/assets/stylesheets/spree/frontend/fonts.scss +137 -0
  139. data/app/assets/stylesheets/spree/frontend/functions.scss +104 -0
  140. data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +23 -0
  141. data/app/assets/stylesheets/spree/frontend/margins.scss +53 -0
  142. data/app/assets/stylesheets/spree/frontend/mixins.scss +20 -0
  143. data/app/assets/stylesheets/spree/frontend/variables/.gitkeep +0 -0
  144. data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +40 -0
  145. data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +10 -0
  146. data/app/assets/stylesheets/spree/frontend/variables/variables.scss +20 -0
  147. data/app/assets/stylesheets/spree/frontend/views/spree/.gitkeep +0 -0
  148. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +255 -0
  149. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +505 -0
  150. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/payment.scss +98 -0
  151. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/registration.scss +26 -0
  152. data/app/assets/stylesheets/spree/frontend/views/spree/errors/not_found.scss +3 -0
  153. data/app/assets/stylesheets/spree/frontend/views/spree/home/index.scss +293 -0
  154. data/app/assets/stylesheets/spree/frontend/views/spree/icon.scss +13 -0
  155. data/app/assets/stylesheets/spree/frontend/views/spree/layouts/spree_application.scss +44 -0
  156. data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +467 -0
  157. data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +273 -0
  158. data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +250 -0
  159. data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +317 -0
  160. data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +165 -0
  161. data/app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss +27 -0
  162. data/app/assets/stylesheets/spree/frontend/views/spree/shared/_images.scss +9 -0
  163. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/single.scss +142 -0
  164. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +97 -0
  165. data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +57 -0
  166. data/app/assets/stylesheets/spree/frontend/views/spree/shared/category_nav_bar.scss +86 -0
  167. data/app/assets/stylesheets/spree/frontend/views/spree/shared/delete_address_popup.scss +141 -0
  168. data/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss +56 -0
  169. data/app/assets/stylesheets/spree/frontend/views/spree/shared/header.scss +82 -0
  170. data/app/assets/stylesheets/spree/frontend/views/spree/shared/login.scss +30 -0
  171. data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +103 -0
  172. data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +87 -0
  173. data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +78 -0
  174. data/app/assets/stylesheets/spree/frontend/views/spree/shared/no_product_available.scss +135 -0
  175. data/app/assets/stylesheets/spree/frontend/views/spree/shared/order_details.scss +37 -0
  176. data/app/assets/stylesheets/spree/frontend/views/spree/shared/product.scss +45 -0
  177. data/app/assets/stylesheets/spree/frontend/views/spree/shared/product_added_modal.scss +61 -0
  178. data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +55 -0
  179. data/app/assets/stylesheets/spree/frontend/views/spree/shared/registration.scss +7 -0
  180. data/app/assets/stylesheets/spree/frontend/views/spree/taxons/show.scss +47 -0
  181. data/app/assets/stylesheets/spree/frontend/views/spree/user_passwords/user_passwords.scss +12 -0
  182. data/app/assets/stylesheets/spree/frontend/views/spree/user_sessions/new.scss +3 -0
  183. data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +325 -0
  184. data/app/assets/stylesheets/spree/frontend.css +1 -1
  185. data/app/controllers/concerns/spree/checkout/address_book.rb +7 -9
  186. data/app/controllers/spree/addresses_controller.rb +5 -6
  187. data/app/controllers/spree/checkout_controller.rb +3 -1
  188. data/app/controllers/spree/home_controller.rb +1 -5
  189. data/app/controllers/spree/orders_controller.rb +3 -1
  190. data/app/controllers/spree/products_controller.rb +45 -15
  191. data/app/controllers/spree/store_controller.rb +14 -2
  192. data/app/controllers/spree/taxons_controller.rb +20 -5
  193. data/app/helpers/spree/addresses_helper.rb +11 -12
  194. data/app/helpers/spree/frontend_helper.rb +168 -14
  195. data/app/helpers/spree/navigation_helper.rb +34 -0
  196. data/app/helpers/spree/structured_data_helper.rb +3 -3
  197. data/app/helpers/spree/taxons_helper.rb +4 -0
  198. data/app/models/spree/frontend_configuration.rb +1 -0
  199. data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +1 -1
  200. data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +1 -1
  201. data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +1 -1
  202. data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +1 -1
  203. data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +1 -1
  204. data/app/views/spree/address/_form.html.erb +24 -27
  205. data/app/views/spree/addresses/_form.html.erb +13 -8
  206. data/app/views/spree/addresses/edit.html.erb +11 -21
  207. data/app/views/spree/addresses/new.html.erb +11 -21
  208. data/app/views/spree/checkout/_address.html.erb +61 -54
  209. data/app/views/spree/checkout/_confirm.html.erb +112 -16
  210. data/app/views/spree/checkout/_credit_card.html.erb +9 -0
  211. data/app/views/spree/checkout/_delivery.html.erb +10 -86
  212. data/app/views/spree/checkout/_payment.html.erb +39 -64
  213. data/app/views/spree/checkout/_summary.html.erb +46 -73
  214. data/app/views/spree/checkout/edit.html.erb +22 -25
  215. data/app/views/spree/checkout/payment/_gateway.html.erb +14 -34
  216. data/app/views/spree/checkout/payment/_storecredit.html.erb +8 -8
  217. data/app/views/spree/checkout/registration.html.erb +30 -0
  218. data/app/views/spree/errors/not_found.html.erb +7 -0
  219. data/app/views/spree/home/index.html.erb +124 -10
  220. data/app/views/spree/layouts/checkout.html.erb +26 -0
  221. data/app/views/spree/layouts/spree_application.html.erb +10 -15
  222. data/app/views/spree/orders/_coupon_code.html.erb +24 -0
  223. data/app/views/spree/orders/_form.html.erb +25 -39
  224. data/app/views/spree/orders/_line_item.html.erb +19 -25
  225. data/app/views/spree/orders/_line_item_data.html.erb +31 -0
  226. data/app/views/spree/orders/edit.html.erb +50 -40
  227. data/app/views/spree/orders/show.html.erb +83 -17
  228. data/app/views/spree/products/_cart_form.html.erb +69 -73
  229. data/app/views/spree/products/_cart_form_availability_templates.html.erb +10 -0
  230. data/app/views/spree/products/_color_option_type.html.erb +36 -0
  231. data/app/views/spree/products/_description.html.erb +17 -0
  232. data/app/views/spree/products/_filter_and_sort_mobile_buttons.html.erb +16 -0
  233. data/app/views/spree/products/_filters_desktop.html.erb +58 -0
  234. data/app/views/spree/products/_filters_mobile.html.erb +62 -0
  235. data/app/views/spree/products/_gallery.html.erb +31 -0
  236. data/app/views/spree/products/_gallery_modal.html.erb +33 -0
  237. data/app/views/spree/products/_no_results.html.erb +14 -0
  238. data/app/views/spree/products/_no_results_with_filters.html.erb +13 -0
  239. data/app/views/spree/products/_option_type.html.erb +32 -0
  240. data/app/views/spree/products/_product.html.erb +5 -5
  241. data/app/views/spree/products/_promotions.html.erb +19 -12
  242. data/app/views/spree/products/_properties.html.erb +9 -20
  243. data/app/views/spree/products/_sort_desktop.html.erb +30 -0
  244. data/app/views/spree/products/_sort_mobile.html.erb +43 -0
  245. data/app/views/spree/products/_taxons.html.erb +1 -0
  246. data/app/views/spree/products/index.html.erb +40 -24
  247. data/app/views/spree/products/related.html.erb +8 -0
  248. data/app/views/spree/products/show.html.erb +39 -37
  249. data/app/views/spree/shared/_address.html.erb +0 -12
  250. data/app/views/spree/shared/_breadcrumbs.html.erb +23 -0
  251. data/app/views/spree/shared/_carousel_4_products.html.erb +99 -0
  252. data/app/views/spree/shared/_cart.html.erb +11 -0
  253. data/app/views/spree/shared/_checkout_header.html.erb +19 -0
  254. data/app/views/spree/shared/_color_select.html.erb +9 -0
  255. data/app/views/spree/shared/_copyright.html.erb +18 -0
  256. data/app/views/spree/shared/_delete_address_popup.html.erb +26 -0
  257. data/app/views/spree/shared/_error_messages.html.erb +2 -4
  258. data/app/views/spree/shared/_flashes.html.erb +9 -0
  259. data/app/views/spree/shared/_footer.html.erb +73 -0
  260. data/app/views/spree/shared/_head.html.erb +4 -9
  261. data/app/views/spree/shared/_header.html.erb +26 -13
  262. data/app/views/spree/shared/_link_to_account.html.erb +7 -0
  263. data/app/views/spree/shared/_link_to_cart.html.erb +2 -1
  264. data/app/views/spree/shared/_login.html.erb +34 -17
  265. data/app/views/spree/shared/_main_nav_bar.html.erb +41 -15
  266. data/app/views/spree/shared/_mobile_navigation.html.erb +68 -0
  267. data/app/views/spree/shared/_nav_bar.html.erb +52 -6
  268. data/app/views/spree/shared/_no_product_available.html.erb +23 -0
  269. data/app/views/spree/shared/_option_values.html.erb +24 -0
  270. data/app/views/spree/shared/_order_details.html.erb +5 -4
  271. data/app/views/spree/shared/_payment.html.erb +0 -3
  272. data/app/views/spree/shared/_payment_sources.html.erb +8 -0
  273. data/app/views/spree/shared/_product.html.erb +12 -0
  274. data/app/views/spree/shared/_product_added_modal.html.erb +66 -0
  275. data/app/views/spree/shared/_products.html.erb +22 -18
  276. data/app/views/spree/shared/_quantity_select.html.erb +6 -0
  277. data/app/views/spree/shared/_registration.html.erb +4 -0
  278. data/app/views/spree/shared/_search.html.erb +17 -20
  279. data/app/views/spree/shared/_translations.html.erb +9 -5
  280. data/app/views/spree/shared/_user_form.html.erb +12 -0
  281. data/app/views/spree/shared/carousel/_single.html.erb +83 -0
  282. data/app/views/spree/shared/carousel/_thumbnails.html.erb +68 -0
  283. data/app/views/spree/taxons/_header.html.erb +19 -0
  284. data/app/views/spree/taxons/_subcategories.html.erb +26 -0
  285. data/app/views/spree/taxons/product_carousel.html.erb +5 -0
  286. data/app/views/spree/taxons/show.html.erb +8 -20
  287. data/app/views/spree/users/_address.html.erb +25 -0
  288. data/app/views/spree/users/edit.html.erb +11 -0
  289. data/app/views/spree/users/show.html.erb +79 -0
  290. data/config/initializers/assets.rb +13 -1
  291. data/config/routes.rb +3 -0
  292. data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +24 -0
  293. data/lib/spree/frontend.rb +2 -0
  294. data/spree_frontend.gemspec +7 -11
  295. data/vendor/assets/javascripts/lazysizes.min.js +2 -0
  296. metadata +265 -25
  297. data/README.md +0 -50
  298. data/app/assets/javascripts/spree/frontend/product.js +0 -143
  299. data/app/assets/stylesheets/spree/frontend/_variables.scss +0 -4
  300. data/app/assets/stylesheets/spree/frontend/frontend_bootstrap.css.scss +0 -94
  301. data/app/views/spree/shared/_filters.html.erb +0 -48
  302. data/app/views/spree/shared/_login_bar.html.erb +0 -12
  303. data/app/views/spree/taxons/_taxon.html.erb +0 -4
  304. data/lib/generators/spree/frontend/copy_views/copy_views_generator.rb +0 -15
@@ -1,68 +1,75 @@
1
1
  <% @addresses = try_spree_current_user ? try_spree_current_user.addresses : [] %>
2
2
 
3
+ <% if !try_spree_current_user || try_spree_current_user.email.blank? %>
4
+ <div class="row">
5
+ <div class="col-12 mb-4">
6
+ <p class="form-group checkout-content-inner-field">
7
+ <%= form.label :email, class: 'text-uppercase' %>
8
+ <span class="required">*</span>
9
+ <br />
10
+ <%= form.email_field :email, class: 'required spree-flat-input', required: true %>
11
+ </p>
12
+ </div>
13
+ </div>
14
+ <% end %>
15
+
3
16
  <div class="row">
4
17
  <% ['billing', 'shipping'].each do |address_type|
5
18
  address_name = "#{address_type[0...4]}_address" %>
6
- <div class="col-12 col-md-6 mb-4" data-hook="<%= address_type %>_fieldset_wrapper">
7
- <div class="card card-default" id="<%= address_type %>" data-hook>
8
- <div class="card-header">
9
- <h5 class="mb-0">
10
- <%= Spree.t(address_type + '_address') %>
11
- </h5>
12
- </div>
13
- <div class="card-body">
14
- <% if address_type == 'shipping' %>
15
- <div class="mb-0 form-check" data-hook="use_billing">
16
- <%= label_tag :order_use_billing, id: 'use_billing' do %>
17
- <%= check_box_tag 'order[use_billing]', '1', @order.shipping_eq_billing_address?, { class: 'form-check-input'} %>
18
- <%= Spree.t(:use_billing_address) %>
19
- <% end %>
20
- </div>
21
- <% end %>
22
- <% if @addresses.present? %>
23
- <div class="select_address">
24
- <div class="form-group">
25
- <% @addresses.each_with_index do |address, idx| %>
26
- <span class="d-block mb-2" id="<%= [address_type, dom_id(address)].join('_') %>">
27
- <label class="form-check-label">
28
- <%= form.radio_button "#{address_name}_id", address.id, checked: (address.id == try_spree_current_user["#{address_name}_id"] || idx == 0) %> <%= address.to_s.html_safe %>
29
- </label>
30
- <a class="mb-3" href="<%= edit_address_path(address) %>" data-hook="edit_address"><%= Spree.t(:edit) %></a>
31
- </span>
32
- <% end %>
33
- <div class="form-check">
34
- <label class="form-check-label">
35
- <%= form.radio_button "#{address_name}_id", 0, class: 'form-check-input' %> <%= Spree.t('address_book.other_address') %>
36
- </label>
37
- </div>
19
+ <div class="col-12 mb-4" data-hook="<%= address_type %>_fieldset_wrapper">
20
+ <div id="<%= address_type %>" data-hook>
21
+ <h5 class="text-uppercase checkout-content-header">
22
+ <%= Spree.t(address_type + '_address') %>
23
+ </h5>
24
+ <% if address_type == 'shipping' %>
25
+ <div class="spree-checkbox-container checkout-content-billing-checkbox" data-hook="use_billing">
26
+ <div class="spree-checkbox">
27
+ <%= check_box_tag 'order[use_billing]', '1', @order.shipping_eq_billing_address?, { class: 'form-check-input'} %>
28
+ <%= label_tag :order_use_billing, nil, id: 'use_billing' %>
38
29
  </div>
30
+ <%= label_tag :order_use_billing, Spree.t(:use_billing_address), class: 'spree-checkbox-label' %>
31
+ </div>
32
+ <% end %>
33
+ <% if @addresses.present? %>
34
+ <div class="select_address">
35
+ <div class="form-group">
36
+ <% @addresses.each_with_index do |address, idx| %>
37
+ <span class="d-block mb-2" id="<%= [address_type, dom_id(address)].join('_') %>">
38
+ <label class="form-check-label spree-radio-label">
39
+ <%= form.radio_button "#{address_name}_id", address.id, checked: (address.id == try_spree_current_user["#{address_name}_id"] || idx == 0) %>
40
+ <span class="spree-radio-label-custom-input"></span>
41
+ <span class="d-inline-block align-top">
42
+ <%= render "spree/users/address", address: address %>
43
+ </span>
44
+ </label>
45
+ </span>
46
+ <% end %>
47
+ <label class="form-check-label spree-radio-label">
48
+ <%= form.radio_button "#{address_name}_id", 0, class: 'form-check-input' %> <%= Spree.t('address_book.other_address') %>
49
+ <span class="spree-radio-label-custom-input"></span>
50
+ </label>
39
51
  </div>
40
- <% end %>
41
- <%= form.fields_for address_name do |address_form| %>
42
- <div class="inner" data-hook=<%="#{address_type}_inner" %>>
43
- <%= render partial: 'spree/addresses/form', locals: {
44
- address_name: address_name,
45
- address_form: address_form,
46
- address_type: address_type,
47
- address: Spree::Address.default
48
- } %>
49
- </div>
50
- <% end %>
51
52
  </div>
53
+ <% end %>
54
+ <%= form.fields_for address_name do |address_form| %>
55
+ <div class="inner checkout-content-inner" data-hook=<%="#{address_type}_inner" %>>
56
+ <%= render partial: 'spree/addresses/form', locals: {
57
+ address_name: address_name,
58
+ address_form: address_form,
59
+ address_type: address_type,
60
+ address: Spree::Address.default,
61
+ form: form
62
+ } %>
63
+ <p class="text-right text-uppercase checkout-content-inner-field">*<%= Spree.t(:required_fields) %></p>
64
+ </div>
65
+ <% end %>
52
66
  </div>
53
67
  </div>
54
68
  <% end %>
69
+
70
+ <%= hidden_field_tag 'save_user_address', true, data: { hook: "save_user_address" } %>
55
71
  </div>
56
72
 
57
- <div class="card text-right form-buttons my-4" data-hook="buttons">
58
- <div class="card-body">
59
- <%= submit_tag Spree.t(:save_and_continue), class: 'btn btn-lg btn-success' %>
60
- <% if try_spree_current_user %>
61
- <span data-hook="save_user_address" class='save-user-address-wrapper'>
62
- &nbsp; &nbsp;
63
- <%= check_box_tag 'save_user_address', '1', try_spree_current_user.respond_to?(:persist_order_address) %>
64
- <%= label_tag :save_user_address, Spree.t(:save_my_address) %>
65
- </span>
66
- <% end %>
67
- </div>
73
+ <div id="delete-address-popup" class="delete-address-popup-dropdown hide-on-esc">
74
+ <%= render 'spree/shared/delete_address_popup' %>
68
75
  </div>
@@ -1,18 +1,114 @@
1
- <div class="card" id="order_details" data-hook>
2
- <div class="card-header">
3
- <h3 class="card-title mb-0 h5"><%= Spree.t(:confirm) %></h3>
4
- </div>
5
- <div class="card-body">
6
- <%= render partial: 'spree/shared/order_details', locals: { order: @order } %>
7
- </div>
8
- </div>
9
-
10
- <div class="card text-right form-buttons mt-4" data-hook="buttons">
11
- <div class="card-body">
12
- <% if @order.using_store_credit? %>
13
- <%= button_tag Spree.t('store_credit.remove'), name: 'remove_store_credit', class: 'continue btn' %>
14
- <% end %>
15
- <%= submit_tag Spree.t(:place_order), class: 'btn btn-lg btn-success' %>
16
- <script>Spree.disableSaveOnClick();</script>
1
+ <div class="checkout-confirm" id="order_details" data-hook>
2
+ <p class="checkout-content-header">
3
+ <%= Spree.t(:summary).upcase %>
4
+ </p>
5
+ <div class='checkout-confirm-order-details d-flex flex-column flex-lg-wrap' id="order_summary" data-hook>
6
+ <div class="checkout-confirm-order-details-line-items d-flex flex-column align-items-center w-100 order-0 order-lg-1">
7
+ <div class="checkout-confirm-order-details-line-items-header d-none d-sm-block d-lg-none align-self-start mb-3">
8
+ <%= Spree.t(:products) %>
9
+ </div>
10
+ <div class="d-table w-100">
11
+ <div class="d-none d-lg-table-row text-secondary text-uppercase">
12
+ <p class="d-table-cell pb-1">
13
+ <%= Spree.t(:product) %>
14
+ </p>
15
+ <p class="d-table-cell pb-1">
16
+ <%= Spree.t(:price) %>
17
+ </p>
18
+ <p class="d-table-cell pb-1">
19
+ <%= Spree.t(:quantity) %>
20
+ </p>
21
+ <p class="d-table-cell pb-1">
22
+ <%= Spree.t(:total) %>
23
+ </p>
24
+ </div>
25
+ <% @order.line_items.each do |item| %>
26
+ <div class="checkout-confirm-order-details-line-items-line-item w-100 d-table-row">
27
+ <div class="checkout-confirm-order-details-line-items-line-item-name d-table-cell align-middle py-3 py-sm-4">
28
+ <div class="d-flex align-items-lg-center">
29
+ <% if item.variant.images.length == 0 %>
30
+ <%= link_to product_image(item.variant.product), item.variant.product %>
31
+ <% else %>
32
+ <%= link_to image_tag(main_app.url_for(item.variant.images.first.url(:plp_and_carousel))), item.variant.product %>
33
+ <% end %>
34
+ <div class="d-flex flex-column mt-2 mt-lg-0">
35
+ <div><%= item.name %></div>
36
+ <ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0">
37
+ <% item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
38
+ <li><%= "#{ov.option_type.presentation}: #{ov.name.titleize}" %></li>
39
+ <% end %>
40
+ </ul>
41
+ <div class="d-lg-none">
42
+ <div class="font-weight-bold"><%= item.single_money.to_html %></div>
43
+ </div>
44
+ <div class="d-lg-none">
45
+ <span>Quantity:</span>
46
+ <span class="font-weight-bold"><%= item.quantity %></span>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <div class="checkout-confirm-order-details-line-items-line-item-price d-none d-lg-table-cell align-middle py-4">
52
+ <div><%= item.single_money.to_html %></div>
53
+ </div>
54
+ <div class="checkout-confirm-order-details-line-items-line-item-quantity d-none d-lg-table-cell align-middle py-4">
55
+ <span class="checkout-confirm-order-details-line-items-line-item-quantity-val d-lg-block"><%= item.quantity %></span>
56
+ </div>
57
+ <div class="checkout-confirm-order-details-line-items-line-item-total d-none d-lg-table-cell align-middle py-4">
58
+ <div><%= item.display_total.to_s %></div>
59
+ </div>
60
+ </div>
61
+ <% end %>
62
+ </div>
63
+ </div>
64
+ <div class="checkout-confirm-delivery-informations text-left mt-3 order-1 order-lg-0">
65
+ <div class="d-lg-none checkout-confirm-delivery-informations-header">
66
+ <%= Spree.t(:delivery_information) %>
67
+ </div>
68
+ <dl>
69
+ <div>
70
+ <dt class="text-uppercase">
71
+ <%= Spree.t(:shipping_address) %>
72
+ <%= checkout_edit_link %>
73
+ </dt>
74
+ <dd><%= sanitize @order.ship_address.to_s, tags: %w[br] %></dd>
75
+ </div>
76
+ <div>
77
+ <dt class="text-uppercase">
78
+ <%= Spree.t(:billing_address) %>
79
+ <%= checkout_edit_link %>
80
+ </dt>
81
+ <dd><%= sanitize @order.bill_address.to_s, tags: %w[br] %></dd>
82
+ </div>
83
+ <div>
84
+ <dt class="text-uppercase">
85
+ <%= Spree.t(:shipping) %>
86
+ <%= checkout_edit_link('delivery') %>
87
+ </dt>
88
+ <dd><%= @order.shipments.first.shipping_method&.name if @order.shipments.any? %></dd>
89
+ </div>
90
+ <div>
91
+ <dt class="text-uppercase">
92
+ <%= Spree.t(:payment) %>
93
+ <%= checkout_edit_link('payment') %>
94
+ </dt>
95
+ <dd>
96
+ <%= render collection: @order.payments.valid, partial: 'spree/shared/payment' %>
97
+ </dd>
98
+ <dd>
99
+ <% if @order.using_store_credit? %>
100
+ <%= button_tag Spree.t('store_credit.remove'), name: 'remove_store_credit', class: 'continue btn' %>
101
+ <% end %>
102
+ </dd>
103
+ </div>
104
+ </dl>
105
+ </div>
106
+ <div id="checkout-summary" class="w-100 order-2" data-hook="checkout_summary_box">
107
+ <%= render partial: 'spree/checkout/summary', locals: { order: @order } %>
108
+ <div data-hook="buttons">
109
+ <% submit_label_key = @order.confirm? ? :place_order : :save_and_continue %>
110
+ <%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary text-uppercase font-weight-bold w-100 checkout-content-save-continue-button' %>
111
+ </div>
112
+ </div>
17
113
  </div>
18
114
  </div>
@@ -0,0 +1,9 @@
1
+ <div id="<%= dom_id(card,'spree')%>" class="payment-sources-list-item">
2
+ <label class="form-check-label spree-radio-label">
3
+ <%= radio_button_tag "order[existing_card]", card.id, (card == @payment_sources.first), { class: "existing-cc-radio" } %>
4
+ <span class="spree-radio-label-custom-input"></span>
5
+ <%= credit_card_icon(card.cc_type) %>
6
+ <span>****<%= card.last_digits %>,&nbsp</span>
7
+ <span><%= card.name %></span>
8
+ </label>
9
+ </div>
@@ -1,99 +1,31 @@
1
- <div class="card" id='shipping_method' data-hook>
2
- <div class="card-header">
3
- <h3 class="card-title mb-0 h5"><%= Spree.t(:delivery) %></h3>
4
- </div>
5
- <div class="card-body" data-hook="shipping_method_inner">
1
+ <div id="shipping-method" data-hook>
2
+ <div data-hook="shipping_method_inner">
6
3
  <div id="methods">
7
4
  <%= form.fields_for :shipments do |ship_form| %>
8
5
  <div class="shipment">
9
- <h4 class="stock-location h5" data-hook="stock-location">
10
- <%= Spree.t(:package_from) %>
11
- <strong class="stock-location-name" data-hook="stock-location-name">
12
- <%= ship_form.object.stock_location.name %>
13
- </strong>
14
- </h4>
15
-
16
- <table class="table stock-contents" data-hook="stock-contents">
17
- <colgroup>
18
- <col style="width: 10%;" />
19
- <col style="width: 60%;" />
20
- <col style="width: 10%;" />
21
- <col style="width: 20%;" />
22
- </colgroup>
23
- <thead>
24
- <tr class="active">
25
- <th></th>
26
- <th align='left'><%= Spree.t(:item) %></th>
27
- <th><%= Spree.t(:qty) %></th>
28
- <th><%= Spree.t(:price) %></th>
29
- </tr>
30
- </thead>
31
- <tbody>
32
- <% ship_form.object.manifest.each do |item| %>
33
- <tr class="stock-item">
34
- <td class="item-image"><%= mini_image(item.variant) %></td>
35
- <td class="item-name"><%= item.variant.name %></td>
36
- <td class="item-qty"><%= item.quantity %></td>
37
- <td class="item-price"><%= display_price(item.variant) %></td>
38
- </tr>
39
- <% end %>
40
- </tbody>
41
- </table>
42
-
43
- <h4 class="stock-shipping-method-title h5">
44
- <%= Spree.t(:shipping_method) %>
6
+ <h4 class="text-uppercase checkout-content-header checkout-content-shipping-methods-header">
7
+ <%= Spree.t('checkout_page.delivery_method') %>
45
8
  </h4>
46
9
 
47
- <ul class="list-group shipping-methods">
10
+ <ul class="checkout-content-shipping-methods-list">
48
11
  <% ship_form.object.shipping_rates.each do |rate| %>
49
- <li class="list-group-item shipping-method">
50
- <label>
12
+ <li class="shipping-method">
13
+ <label class="spree-radio-label">
51
14
  <%= ship_form.radio_button :selected_shipping_rate_id,
52
15
  rate.id,
53
16
  data: {
54
17
  behavior: 'shipping-method-selector',
55
18
  cost: rate.display_cost
56
- } %>
19
+ } %>
20
+ <span class="spree-radio-label-custom-input"></span>
57
21
  <span class="rate-name"><%= rate.name %></span>
58
- <span class="badge badge-secondary rate-cost"><%= rate.display_cost %></span>
22
+ <p class="rate-cost"><%= rate.display_cost %></p>
59
23
  </label>
60
24
  </li>
61
25
  <% end %>
62
26
  </ul>
63
27
  </div>
64
28
  <% end %>
65
-
66
- <% if @differentiator.try(:missing?) %>
67
- <div class="shipment unshippable">
68
- <h3 class="stock-location mb-0 h5" data-hook="stock-location">
69
- <%= Spree.t(:unshippable_items) %>
70
- </h3>
71
- <table class="table stock-contents" data-hook="stock-missing">
72
- <colgroup>
73
- <col style="width: 10%;" />
74
- <col style="width: 60%;" />
75
- <col style="width: 10%;" />
76
- <col style="width: 20%;" />
77
- </colgroup>
78
- <thead>
79
- <th></th>
80
- <th align='left'><%= Spree.t(:item) %></th>
81
- <th><%= Spree.t(:qty) %></th>
82
- <th><%= Spree.t(:price) %></th>
83
- </thead>
84
- <tbody>
85
- <% @differentiator.missing.each do |variant, quantity| %>
86
- <tr class="stock-item">
87
- <td class="item-image"><%= mini_image(variant) %></td>
88
- <td class="item-name"><%= variant.name %></td>
89
- <td class="item-qty"><%= quantity %></td>
90
- <td class="item-price"><%= display_price(variant) %></td>
91
- </tr>
92
- <% end %>
93
- </tbody>
94
- </table>
95
- </div>
96
- <% end %>
97
29
  </div>
98
30
  <% if Spree::Config[:shipping_instructions] %>
99
31
  <p id="minstrs" data-hook>
@@ -105,11 +37,3 @@
105
37
  <% end %>
106
38
  </div>
107
39
  </div>
108
-
109
- <div class="card my-4 text-right form-buttons" data-hook="buttons">
110
- <div class="card-body">
111
- <%= submit_tag Spree.t(:save_and_continue), class: 'btn btn-lg btn-success' %>
112
- </div>
113
- </div>
114
-
115
- <%= javascript_include_tag 'spree/frontend/checkout/shipment' %>
@@ -1,79 +1,54 @@
1
- <div class="card" id="payment" data-hook>
2
- <div class="card-header">
3
- <h3 class="card-title mb-0 h5">
4
- <%= Spree.t(:payment_information) %>
5
- </h3>
6
- </div>
7
-
8
- <div class="card-body" data-hook="checkout_payment_step">
9
- <% if @payment_sources.present? %>
10
- <div class="card_options">
11
- <%= radio_button_tag 'use_existing_card', 'yes', true %>
12
- <label for="use_existing_card_yes">
13
- <%= Spree.t(:use_existing_cc) %>
14
- </label>
15
- <%= radio_button_tag 'use_existing_card', 'no' %>
16
- <label for="use_existing_card_no">
17
- <%= Spree.t(:use_new_cc_or_payment_method) %>
18
- </label>
19
- </div>
1
+ <div id="payment" data-hook>
2
+ <p class="payment-type checkout-content-header">
3
+ <%= Spree.t(:payment_type).upcase %>
4
+ </p>
20
5
 
21
- <div id="existing_cards">
22
- <p class="form-group" data-hook="existing_cards">
23
- <table class="existing-credit-card-list">
24
- <tbody>
25
- <% @payment_sources.each do |card| %>
26
- <tr id="<%= dom_id(card,'spree')%>" class="<%= cycle('even', 'odd') %>">
27
- <td>
28
- <%= radio_button_tag "order[existing_card]", card.id, (card == @payment_sources.first), { class: "existing-cc-radio" } %>
29
- </td>
30
- <td><%= card.name %></td>
31
- <td><%= card.display_number %></td>
32
- <td><%= card.month %> / <%= card.year %></td>
33
- </tr>
34
- <% end %>
35
- </tbody>
36
- </table>
37
- </p>
38
- </div>
39
- <% end %>
6
+ <div data-hook="checkout_payment_step">
40
7
 
41
8
  <%= render partial: 'spree/checkout/payment/storecredit' %>
42
9
 
43
- <ul class="list-group" id="payment-method-fields" data-hook>
10
+ <ul id="payment-method-fields" class="list-unstyled position-relative" data-hook>
44
11
  <% @order.available_payment_methods.each do |method| %>
45
- <li class="list-group-item radio">
46
- <label>
12
+ <li class="radio">
13
+ <%= label_tag '', class: "form-check-label spree-radio-label payment-option", data: { type: method.id == @payment_sources&.first&.payment_method_id ? 'card' : nil } do %>
47
14
  <%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.available_payment_methods.first %>
15
+ <span class="spree-radio-label-custom-input"></span>
48
16
  <%= Spree.t(method.name, scope: :payment_methods, default: method.name) %>
49
- </label>
17
+ <% end %>
50
18
  </li>
51
19
  <% end %>
52
20
  </ul>
53
21
 
54
- <ul id="payment-methods" class="list-unstyled position-relative" data-hook>
55
- <% @order.available_payment_methods.each do |method| %>
56
- <li id="payment_method_<%= method.id %>" class="<%= 'last' if method == @order.available_payment_methods.last %>" data-hook>
57
- <fieldset>
58
- <%= render partial: "spree/checkout/payment/#{method.method_type}", locals: { payment_method: method } %>
59
- </fieldset>
60
- </li>
22
+ <div class="payment-sources">
23
+ <% if @payment_sources.present? %>
24
+ <div id="existing_cards" class="payment-sources-existing-cards">
25
+ <%= radio_button_tag 'use_existing_card', 'yes', true, class: 'd-none' %>
26
+ <div class="form-group" data-hook="existing_cards">
27
+ <div class="d-flex flex-column payment-sources-list">
28
+ <% @payment_sources.each do |card| %>
29
+ <%= render partial: 'credit_card', locals: { card: card } %>
30
+ <% end %>
31
+ <div>
32
+ <label class="form-check-label spree-radio-label col-6 mb-2">
33
+ <%= radio_button_tag 'use_existing_card', 'no' %>
34
+ <span class="spree-radio-label-custom-input"></span>
35
+ <span><%= Spree.t(:add_new_credit_card) %></span>
36
+ </label>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
61
41
  <% end %>
62
- </ul>
63
-
64
-
65
- <% if Spree::Frontend::Config[:coupon_codes_enabled] %>
66
- <p class='field mb-0' data-hook='coupon_code'>
67
- <%= form.label :coupon_code %>
68
- <%= form.text_field :coupon_code, class: 'form-control' %>
69
- </p>
70
- <% end %>
71
- </div>
72
- </div>
73
42
 
74
- <div class="card text-right form-buttons my-4" data-hook="buttons">
75
- <div class="card-body">
76
- <%= submit_tag Spree.t(:save_and_continue), class: 'btn btn-lg btn-success primary' %>
77
- <script>Spree.disableSaveOnClick();</script>
43
+ <ul id="payment-methods" class="list-unstyled position-relative mb-0 payment-sources-add-form" data-hook>
44
+ <% @order.available_payment_methods.each do |method| %>
45
+ <li id="payment_method_<%= method.id %>" class="<%= 'last' if method == @order.available_payment_methods.last %>" data-hook>
46
+ <fieldset>
47
+ <%= render partial: "spree/checkout/payment/#{method.method_type}", locals: { payment_method: method } %>
48
+ </fieldset>
49
+ </li>
50
+ <% end %>
51
+ </ul>
52
+ </div>
78
53
  </div>
79
54
  </div>
@@ -1,79 +1,52 @@
1
- <h3><%= Spree.t(:order_summary) %></h3>
2
-
3
- <div class="table-responsive">
4
- <table class="table" data-hook="order_summary">
5
- <tbody>
6
- <tr data-hook="item_total">
7
- <td><strong><%= Spree.t(:item_total) %>:</strong></td>
8
- <td><strong><%= order.display_item_total.to_html %></strong></td>
9
- </tr>
10
-
11
- <% if order.line_item_adjustments.nonzero.exists? %>
12
- <tbody data-hook="order_details_promotion_adjustments">
13
- <% order.line_item_adjustments.nonzero.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
14
- <tr class="total">
15
- <td><%= label %></td>
16
- <td><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></td>
17
- </tr>
18
- <% end %>
19
- </tbody>
1
+ <div class="checkout-content-summary">
2
+ <h3 class="text-uppercase text-center checkout-content-summary-header"><%= Spree.t(:order_summary) %></h3>
3
+ <div class="w-100 text-uppercase checkout-content-summary-table" data-hook="order_summary">
4
+ <div class="d-table-cell"><%= Spree.t(:item_total) %>:</div>
5
+ <div class="d-table-cell text-right"><%= order.display_item_total.to_html %></div>
6
+
7
+ <% if order.line_item_adjustments.nonzero.exists? %>
8
+ <% order.line_item_adjustments.nonzero.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
9
+ <div class="d-table-cell"><%= label %></div>
10
+ <div class="d-table-cell text-right"><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></div>
20
11
  <% end %>
21
-
22
- <tbody data-hook="order_details_tax_adjustments">
23
- <% order.all_adjustments.nonzero.tax.eligible.group_by(&:label).each do |label, adjustments| %>
24
- <tr class="total">
25
- <td><%= label %></td>
26
- <td><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></td>
27
- </tr>
12
+ <% end %>
13
+
14
+ <% order.all_adjustments.nonzero.tax.eligible.group_by(&:label).each do |label, adjustments| %>
15
+ <div class="d-table-cell"><%= label %></div>
16
+ <div class="d-table-cell text-right"><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></div>
17
+ <% end %>
18
+
19
+ <% if order.passed_checkout_step?("address") && order.shipments.any? %>
20
+ <div class="d-table-cell"><%= Spree.t(:shipping) %>:</div>
21
+ <% shipping_total = Spree::Money.new(order.shipments.to_a.sum(&:cost), currency: order.currency) %>
22
+ <div class="d-table-cell text-right" data-hook='shipping-total' data-currency='<%= Money::Currency.find(order.currency).symbol %>' thousands-separator='<%= shipping_total.thousands_separator %>' decimal-mark='<%= shipping_total.decimal_mark %>' precision='<%= Money::Currency.find(order.currency).exponent %>'><%= shipping_total.to_html %></div>
23
+
24
+ <% if order.shipment_adjustments.nonzero.exists? %>
25
+ <% order.shipment_adjustments.nonzero.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
26
+ <div class="d-table-cell"><%= label %>:</div>
27
+ <div class="d-table-cell text-right"><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></div>
28
28
  <% end %>
29
- </tbody>
30
-
31
- <% if order.passed_checkout_step?("address") && order.shipments.any? %>
32
- <tr data-hook="shipping_total">
33
- <td><%= Spree.t(:shipping_total) %>:</td>
34
- <% shipping_total = Spree::Money.new(order.shipments.to_a.sum(&:cost), currency: order.currency) %>
35
- <td data-hook='shipping-total' data-currency='<%= Money::Currency.find(order.currency).symbol %>' thousands-separator='<%= shipping_total.thousands_separator %>' decimal-mark='<%= shipping_total.decimal_mark %>'><%= shipping_total.to_html %></td>
36
- </tr>
37
-
38
- <% if order.shipment_adjustments.nonzero.exists? %>
39
- <tbody data-hook="order_details_shipment_promotion_adjustments">
40
- <% order.shipment_adjustments.nonzero.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
41
- <tr class="total">
42
- <td><%= label %>:</td>
43
- <td><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></td>
44
- </tr>
45
- <% end %>
46
- </tbody>
47
- <% end %>
48
- <% end %>
49
-
50
- <% if order.adjustments.nonzero.eligible.exists? %>
51
- <tbody id="summary-order-charges" data-hook>
52
- <% order.adjustments.nonzero.eligible.each do |adjustment| %>
53
- <% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
54
- <tr class="total">
55
- <td><%= adjustment.label %>:</td>
56
- <td><%= adjustment.display_amount.to_html %></td>
57
- </tr>
58
- <% end %>
59
- </tbody>
60
29
  <% end %>
30
+ <% end %>
61
31
 
62
- <tr data-hook="order_total">
63
- <td><strong><%= Spree.t(:order_total) %>:</strong></td>
64
- <td>
65
- <strong>
66
- <span id='summary-order-total' class="lead text-primary" data-currency="<%= Money::Currency.find(order.currency).symbol %>"><%= order.display_total.to_html %></span>
67
- </strong>
68
- </td>
69
- </tr>
70
-
71
- <% if order.using_store_credit? %>
72
- <tr data-hook="order_details_store_credit">
73
- <td><strong><%= Spree.t(:store_credit_name) %>:</strong></td>
74
- <td><span id='summary-store-credit'><%= order.display_total_applied_store_credit.to_html %></span></td>
75
- </tr>
32
+ <% if order.adjustments.nonzero.eligible.exists? %>
33
+ <% order.adjustments.nonzero.eligible.each do |adjustment| %>
34
+ <% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
35
+ <div class="d-table-cell total"><%= adjustment.label %>:</div>
36
+ <div class="d-table-cell total text-right"><%= adjustment.display_amount.to_html %></div>
76
37
  <% end %>
77
- </tbody>
78
- </table>
38
+ <% end %>
39
+
40
+ <div class="checkout-content-summary-table-order-total">
41
+ <div class="d-table-cell"><%= Spree.t(:order_total) %>:</div>
42
+ <div class="d-table-cell text-right">
43
+ <span id='summary-order-total' data-currency="<%= Money::Currency.find(order.currency).symbol %>"><%= order.display_total.to_html %></span>
44
+ </div>
45
+ </div>
46
+
47
+ <% if order.using_store_credit? %>
48
+ <div class="d-table-cell"><%= Spree.t(:store_credit_name) %>:</div>
49
+ <div class="d-table-cell text-right"><span id='summary-store-credit'><%= order.display_total_applied_store_credit.to_html %></span></div>
50
+ <% end %>
51
+ </div>
79
52
  </div>