spree_frontend 4.4.0 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +48 -35
  3. data/.eslintrc +1 -1
  4. data/Gemfile +4 -8
  5. data/README.md +56 -2
  6. data/app/assets/config/spree_frontend_manifest.js +1 -0
  7. data/app/assets/images/favicon.ico +0 -0
  8. data/app/assets/images/logo/spree_50.png +0 -0
  9. data/app/assets/images/logo-spree.png +0 -0
  10. data/app/assets/images/logo.png +0 -0
  11. data/app/assets/images/logo.svg +10 -1
  12. data/app/assets/images/logo@2x.png +0 -0
  13. data/app/assets/images/logo@3x.png +0 -0
  14. data/app/assets/images/noimage/large.png +0 -0
  15. data/app/assets/images/noimage/mini.png +0 -0
  16. data/app/assets/images/noimage/plp.png +0 -0
  17. data/app/assets/images/noimage/plp.svg +13 -20
  18. data/app/assets/images/noimage/product.png +0 -0
  19. data/app/assets/images/noimage/small.png +0 -0
  20. data/app/assets/javascripts/spree/{api → frontend/api}/main.js +4 -4
  21. data/app/assets/javascripts/spree/{api → frontend/api}/storefront/cart.js +1 -1
  22. data/app/assets/javascripts/spree/frontend/checkout/address.js +3 -3
  23. data/app/assets/javascripts/spree/frontend/currency.js +6 -7
  24. data/app/assets/javascripts/spree/frontend/locale.es6 +1 -2
  25. data/app/assets/javascripts/{spree.js → spree/frontend/main.js} +5 -5
  26. data/app/assets/javascripts/spree/frontend/{turbolinks_scroll_fix.js → turbo_scroll_fix.js} +3 -3
  27. data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +1 -1
  28. data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +1 -1
  29. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +8 -8
  30. data/app/assets/javascripts/spree/frontend/views/spree/products/description.js +1 -1
  31. data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +1 -1
  32. data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +4 -4
  33. data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +3 -3
  34. data/app/assets/javascripts/spree/frontend.js +10 -17
  35. data/app/controllers/spree/addresses_controller.rb +2 -2
  36. data/app/controllers/spree/checkout_controller.rb +2 -2
  37. data/app/controllers/spree/locale_controller.rb +7 -1
  38. data/app/controllers/spree/orders_controller.rb +1 -1
  39. data/app/controllers/spree/products_controller.rb +1 -1
  40. data/app/controllers/spree/taxons_controller.rb +1 -1
  41. data/app/helpers/spree/frontend_helper.rb +14 -8
  42. data/app/helpers/spree/navigation_helper.rb +1 -1
  43. data/app/helpers/spree/products_filters_helper.rb +1 -1
  44. data/app/services/spree/build_localized_redirect_url.rb +48 -8
  45. data/app/views/spree/addresses/new.html.erb +1 -1
  46. data/app/views/spree/checkout/edit.html.erb +1 -1
  47. data/app/views/spree/checkout/registration.html.erb +1 -1
  48. data/app/views/spree/orders/_line_item.html.erb +1 -1
  49. data/app/views/spree/orders/_line_item_data.html.erb +1 -1
  50. data/app/views/spree/products/_color_option_type.html.erb +2 -2
  51. data/app/views/spree/products/_filters_desktop.html.erb +3 -3
  52. data/app/views/spree/products/_filters_mobile.html.erb +2 -2
  53. data/app/views/spree/products/_thumbnails.html.erb +2 -2
  54. data/app/views/spree/shared/_head.html.erb +3 -2
  55. data/app/views/spree/shared/_line_item.html.erb +1 -1
  56. data/app/views/spree/shared/_link_to_account.html.erb +1 -1
  57. data/app/views/spree/shared/_login.html.erb +1 -1
  58. data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
  59. data/app/views/spree/shared/_nav_bar.html.erb +1 -1
  60. data/app/views/spree/shared/_order_details.html.erb +1 -1
  61. data/app/views/spree/shared/_translations.html.erb +1 -1
  62. data/app/views/spree/shared/carousel/_single.html.erb +2 -2
  63. data/app/views/spree/shared/carousel/_thumbnails.html.erb +1 -1
  64. data/app/views/spree/shared/cms/sections/_hero_image.html.erb +9 -9
  65. data/app/views/spree/shared/cms/sections/_image_gallery.html.erb +21 -21
  66. data/app/views/spree/shared/cms/sections/_side_by_side_images.html.erb +14 -14
  67. data/app/views/spree/taxons/_header.html.erb +1 -1
  68. data/app/views/spree/users/_address_controls.html.erb +1 -1
  69. data/lib/generators/spree/frontend/install/install_generator.rb +1 -1
  70. data/lib/spree/frontend/configuration.rb +18 -0
  71. data/lib/spree/frontend/engine.rb +3 -8
  72. data/lib/spree/frontend/version.rb +1 -1
  73. data/lib/spree/frontend.rb +2 -1
  74. data/spree_frontend.gemspec +4 -2
  75. metadata +49 -278
  76. data/app/assets/images/flags/4x3/ad.svg +0 -150
  77. data/app/assets/images/flags/4x3/ae.svg +0 -6
  78. data/app/assets/images/flags/4x3/af.svg +0 -81
  79. data/app/assets/images/flags/4x3/ag.svg +0 -14
  80. data/app/assets/images/flags/4x3/ai.svg +0 -763
  81. data/app/assets/images/flags/4x3/al.svg +0 -5
  82. data/app/assets/images/flags/4x3/am.svg +0 -5
  83. data/app/assets/images/flags/4x3/ao.svg +0 -13
  84. data/app/assets/images/flags/4x3/aq.svg +0 -5
  85. data/app/assets/images/flags/4x3/ar.svg +0 -31
  86. data/app/assets/images/flags/4x3/as.svg +0 -33
  87. data/app/assets/images/flags/4x3/at.svg +0 -6
  88. data/app/assets/images/flags/4x3/au.svg +0 -9
  89. data/app/assets/images/flags/4x3/aw.svg +0 -186
  90. data/app/assets/images/flags/4x3/ax.svg +0 -18
  91. data/app/assets/images/flags/4x3/az.svg +0 -8
  92. data/app/assets/images/flags/4x3/ba.svg +0 -12
  93. data/app/assets/images/flags/4x3/bb.svg +0 -6
  94. data/app/assets/images/flags/4x3/bd.svg +0 -4
  95. data/app/assets/images/flags/4x3/be.svg +0 -7
  96. data/app/assets/images/flags/4x3/bf.svg +0 -7
  97. data/app/assets/images/flags/4x3/bg.svg +0 -7
  98. data/app/assets/images/flags/4x3/bh.svg +0 -9
  99. data/app/assets/images/flags/4x3/bi.svg +0 -15
  100. data/app/assets/images/flags/4x3/bj.svg +0 -14
  101. data/app/assets/images/flags/4x3/bl.svg +0 -7
  102. data/app/assets/images/flags/4x3/bm.svg +0 -98
  103. data/app/assets/images/flags/4x3/bn.svg +0 -36
  104. data/app/assets/images/flags/4x3/bo.svg +0 -676
  105. data/app/assets/images/flags/4x3/bq.svg +0 -5
  106. data/app/assets/images/flags/4x3/br.svg +0 -45
  107. data/app/assets/images/flags/4x3/bs.svg +0 -13
  108. data/app/assets/images/flags/4x3/bt.svg +0 -89
  109. data/app/assets/images/flags/4x3/bv.svg +0 -13
  110. data/app/assets/images/flags/4x3/bw.svg +0 -7
  111. data/app/assets/images/flags/4x3/by.svg +0 -20
  112. data/app/assets/images/flags/4x3/bz.svg +0 -145
  113. data/app/assets/images/flags/4x3/ca.svg +0 -4
  114. data/app/assets/images/flags/4x3/cc.svg +0 -19
  115. data/app/assets/images/flags/4x3/cd.svg +0 -5
  116. data/app/assets/images/flags/4x3/cf.svg +0 -15
  117. data/app/assets/images/flags/4x3/cg.svg +0 -12
  118. data/app/assets/images/flags/4x3/ch.svg +0 -9
  119. data/app/assets/images/flags/4x3/ci.svg +0 -7
  120. data/app/assets/images/flags/4x3/ck.svg +0 -9
  121. data/app/assets/images/flags/4x3/cl.svg +0 -13
  122. data/app/assets/images/flags/4x3/cm.svg +0 -15
  123. data/app/assets/images/flags/4x3/cn.svg +0 -11
  124. data/app/assets/images/flags/4x3/co.svg +0 -7
  125. data/app/assets/images/flags/4x3/cr.svg +0 -7
  126. data/app/assets/images/flags/4x3/cu.svg +0 -13
  127. data/app/assets/images/flags/4x3/cv.svg +0 -13
  128. data/app/assets/images/flags/4x3/cw.svg +0 -14
  129. data/app/assets/images/flags/4x3/cx.svg +0 -15
  130. data/app/assets/images/flags/4x3/cy.svg +0 -6
  131. data/app/assets/images/flags/4x3/cz.svg +0 -5
  132. data/app/assets/images/flags/4x3/de.svg +0 -5
  133. data/app/assets/images/flags/4x3/dj.svg +0 -13
  134. data/app/assets/images/flags/4x3/dk.svg +0 -5
  135. data/app/assets/images/flags/4x3/dm.svg +0 -152
  136. data/app/assets/images/flags/4x3/do.svg +0 -6745
  137. data/app/assets/images/flags/4x3/dz.svg +0 -5
  138. data/app/assets/images/flags/4x3/ec.svg +0 -138
  139. data/app/assets/images/flags/4x3/ee.svg +0 -7
  140. data/app/assets/images/flags/4x3/eg.svg +0 -38
  141. data/app/assets/images/flags/4x3/eh.svg +0 -15
  142. data/app/assets/images/flags/4x3/er.svg +0 -8
  143. data/app/assets/images/flags/4x3/es-ca.svg +0 -4
  144. data/app/assets/images/flags/4x3/es.svg +0 -544
  145. data/app/assets/images/flags/4x3/et.svg +0 -14
  146. data/app/assets/images/flags/4x3/eu.svg +0 -28
  147. data/app/assets/images/flags/4x3/fi.svg +0 -5
  148. data/app/assets/images/flags/4x3/fj.svg +0 -122
  149. data/app/assets/images/flags/4x3/fk.svg +0 -90
  150. data/app/assets/images/flags/4x3/fm.svg +0 -11
  151. data/app/assets/images/flags/4x3/fo.svg +0 -12
  152. data/app/assets/images/flags/4x3/fr.svg +0 -7
  153. data/app/assets/images/flags/4x3/ga.svg +0 -7
  154. data/app/assets/images/flags/4x3/gb-eng.svg +0 -5
  155. data/app/assets/images/flags/4x3/gb-nir.svg +0 -132
  156. data/app/assets/images/flags/4x3/gb-sct.svg +0 -4
  157. data/app/assets/images/flags/4x3/gb-wls.svg +0 -9
  158. data/app/assets/images/flags/4x3/gb.svg +0 -7
  159. data/app/assets/images/flags/4x3/gd.svg +0 -27
  160. data/app/assets/images/flags/4x3/ge.svg +0 -6
  161. data/app/assets/images/flags/4x3/gf.svg +0 -7
  162. data/app/assets/images/flags/4x3/gg.svg +0 -9
  163. data/app/assets/images/flags/4x3/gh.svg +0 -6
  164. data/app/assets/images/flags/4x3/gi.svg +0 -32
  165. data/app/assets/images/flags/4x3/gl.svg +0 -4
  166. data/app/assets/images/flags/4x3/gm.svg +0 -14
  167. data/app/assets/images/flags/4x3/gn.svg +0 -7
  168. data/app/assets/images/flags/4x3/gp.svg +0 -7
  169. data/app/assets/images/flags/4x3/gq.svg +0 -23
  170. data/app/assets/images/flags/4x3/gr.svg +0 -16
  171. data/app/assets/images/flags/4x3/gs.svg +0 -201
  172. data/app/assets/images/flags/4x3/gt.svg +0 -204
  173. data/app/assets/images/flags/4x3/gu.svg +0 -39
  174. data/app/assets/images/flags/4x3/gw.svg +0 -13
  175. data/app/assets/images/flags/4x3/gy.svg +0 -9
  176. data/app/assets/images/flags/4x3/hk.svg +0 -30
  177. data/app/assets/images/flags/4x3/hm.svg +0 -9
  178. data/app/assets/images/flags/4x3/hn.svg +0 -18
  179. data/app/assets/images/flags/4x3/hr.svg +0 -58
  180. data/app/assets/images/flags/4x3/ht.svg +0 -116
  181. data/app/assets/images/flags/4x3/hu.svg +0 -7
  182. data/app/assets/images/flags/4x3/id.svg +0 -6
  183. data/app/assets/images/flags/4x3/ie.svg +0 -7
  184. data/app/assets/images/flags/4x3/il.svg +0 -14
  185. data/app/assets/images/flags/4x3/im.svg +0 -36
  186. data/app/assets/images/flags/4x3/in.svg +0 -25
  187. data/app/assets/images/flags/4x3/io.svg +0 -138
  188. data/app/assets/images/flags/4x3/iq.svg +0 -10
  189. data/app/assets/images/flags/4x3/ir.svg +0 -219
  190. data/app/assets/images/flags/4x3/is.svg +0 -12
  191. data/app/assets/images/flags/4x3/it.svg +0 -7
  192. data/app/assets/images/flags/4x3/je.svg +0 -29
  193. data/app/assets/images/flags/4x3/jm.svg +0 -8
  194. data/app/assets/images/flags/4x3/jo.svg +0 -16
  195. data/app/assets/images/flags/4x3/jp.svg +0 -11
  196. data/app/assets/images/flags/4x3/ke.svg +0 -23
  197. data/app/assets/images/flags/4x3/kg.svg +0 -15
  198. data/app/assets/images/flags/4x3/kh.svg +0 -61
  199. data/app/assets/images/flags/4x3/ki.svg +0 -36
  200. data/app/assets/images/flags/4x3/km.svg +0 -16
  201. data/app/assets/images/flags/4x3/kn.svg +0 -14
  202. data/app/assets/images/flags/4x3/kp.svg +0 -15
  203. data/app/assets/images/flags/4x3/kr.svg +0 -24
  204. data/app/assets/images/flags/4x3/kw.svg +0 -13
  205. data/app/assets/images/flags/4x3/ky.svg +0 -63
  206. data/app/assets/images/flags/4x3/kz.svg +0 -23
  207. data/app/assets/images/flags/4x3/la.svg +0 -12
  208. data/app/assets/images/flags/4x3/lb.svg +0 -15
  209. data/app/assets/images/flags/4x3/lc.svg +0 -8
  210. data/app/assets/images/flags/4x3/li.svg +0 -43
  211. data/app/assets/images/flags/4x3/lk.svg +0 -22
  212. data/app/assets/images/flags/4x3/lr.svg +0 -14
  213. data/app/assets/images/flags/4x3/ls.svg +0 -8
  214. data/app/assets/images/flags/4x3/lt.svg +0 -7
  215. data/app/assets/images/flags/4x3/lu.svg +0 -5
  216. data/app/assets/images/flags/4x3/lv.svg +0 -6
  217. data/app/assets/images/flags/4x3/ly.svg +0 -13
  218. data/app/assets/images/flags/4x3/ma.svg +0 -4
  219. data/app/assets/images/flags/4x3/mc.svg +0 -6
  220. data/app/assets/images/flags/4x3/md.svg +0 -70
  221. data/app/assets/images/flags/4x3/me.svg +0 -116
  222. data/app/assets/images/flags/4x3/mf.svg +0 -7
  223. data/app/assets/images/flags/4x3/mg.svg +0 -7
  224. data/app/assets/images/flags/4x3/mh.svg +0 -7
  225. data/app/assets/images/flags/4x3/mk.svg +0 -5
  226. data/app/assets/images/flags/4x3/ml.svg +0 -7
  227. data/app/assets/images/flags/4x3/mm.svg +0 -16
  228. data/app/assets/images/flags/4x3/mn.svg +0 -13
  229. data/app/assets/images/flags/4x3/mo.svg +0 -9
  230. data/app/assets/images/flags/4x3/mp.svg +0 -86
  231. data/app/assets/images/flags/4x3/mq.svg +0 -7
  232. data/app/assets/images/flags/4x3/mr.svg +0 -6
  233. data/app/assets/images/flags/4x3/ms.svg +0 -78
  234. data/app/assets/images/flags/4x3/mt.svg +0 -49
  235. data/app/assets/images/flags/4x3/mu.svg +0 -8
  236. data/app/assets/images/flags/4x3/mv.svg +0 -6
  237. data/app/assets/images/flags/4x3/mw.svg +0 -10
  238. data/app/assets/images/flags/4x3/mx.svg +0 -382
  239. data/app/assets/images/flags/4x3/my.svg +0 -15
  240. data/app/assets/images/flags/4x3/mz.svg +0 -21
  241. data/app/assets/images/flags/4x3/na.svg +0 -16
  242. data/app/assets/images/flags/4x3/nc.svg +0 -14
  243. data/app/assets/images/flags/4x3/ne.svg +0 -6
  244. data/app/assets/images/flags/4x3/nf.svg +0 -9
  245. data/app/assets/images/flags/4x3/ng.svg +0 -6
  246. data/app/assets/images/flags/4x3/ni.svg +0 -129
  247. data/app/assets/images/flags/4x3/nl.svg +0 -5
  248. data/app/assets/images/flags/4x3/no.svg +0 -7
  249. data/app/assets/images/flags/4x3/np.svg +0 -14
  250. data/app/assets/images/flags/4x3/nr.svg +0 -12
  251. data/app/assets/images/flags/4x3/nu.svg +0 -26
  252. data/app/assets/images/flags/4x3/nz.svg +0 -41
  253. data/app/assets/images/flags/4x3/om.svg +0 -115
  254. data/app/assets/images/flags/4x3/pa.svg +0 -14
  255. data/app/assets/images/flags/4x3/pe.svg +0 -244
  256. data/app/assets/images/flags/4x3/pf.svg +0 -19
  257. data/app/assets/images/flags/4x3/pg.svg +0 -9
  258. data/app/assets/images/flags/4x3/ph.svg +0 -9
  259. data/app/assets/images/flags/4x3/pk.svg +0 -15
  260. data/app/assets/images/flags/4x3/pl.svg +0 -6
  261. data/app/assets/images/flags/4x3/pm.svg +0 -7
  262. data/app/assets/images/flags/4x3/pn.svg +0 -62
  263. data/app/assets/images/flags/4x3/pr.svg +0 -13
  264. data/app/assets/images/flags/4x3/ps.svg +0 -15
  265. data/app/assets/images/flags/4x3/pt.svg +0 -57
  266. data/app/assets/images/flags/4x3/pw.svg +0 -11
  267. data/app/assets/images/flags/4x3/py.svg +0 -157
  268. data/app/assets/images/flags/4x3/qa.svg +0 -4
  269. data/app/assets/images/flags/4x3/re.svg +0 -7
  270. data/app/assets/images/flags/4x3/ro.svg +0 -7
  271. data/app/assets/images/flags/4x3/rs.svg +0 -292
  272. data/app/assets/images/flags/4x3/ru.svg +0 -7
  273. data/app/assets/images/flags/4x3/rw.svg +0 -13
  274. data/app/assets/images/flags/4x3/sa.svg +0 -26
  275. data/app/assets/images/flags/4x3/sb.svg +0 -13
  276. data/app/assets/images/flags/4x3/sc.svg +0 -14
  277. data/app/assets/images/flags/4x3/sd.svg +0 -13
  278. data/app/assets/images/flags/4x3/se.svg +0 -5
  279. data/app/assets/images/flags/4x3/sg.svg +0 -13
  280. data/app/assets/images/flags/4x3/sh.svg +0 -74
  281. data/app/assets/images/flags/4x3/si.svg +0 -18
  282. data/app/assets/images/flags/4x3/sj.svg +0 -7
  283. data/app/assets/images/flags/4x3/sk.svg +0 -9
  284. data/app/assets/images/flags/4x3/sl.svg +0 -7
  285. data/app/assets/images/flags/4x3/sm.svg +0 -91
  286. data/app/assets/images/flags/4x3/sn.svg +0 -8
  287. data/app/assets/images/flags/4x3/so.svg +0 -11
  288. data/app/assets/images/flags/4x3/sr.svg +0 -6
  289. data/app/assets/images/flags/4x3/ss.svg +0 -8
  290. data/app/assets/images/flags/4x3/st.svg +0 -16
  291. data/app/assets/images/flags/4x3/sv.svg +0 -594
  292. data/app/assets/images/flags/4x3/sx.svg +0 -56
  293. data/app/assets/images/flags/4x3/sy.svg +0 -6
  294. data/app/assets/images/flags/4x3/sz.svg +0 -45
  295. data/app/assets/images/flags/4x3/tc.svg +0 -67
  296. data/app/assets/images/flags/4x3/td.svg +0 -7
  297. data/app/assets/images/flags/4x3/tf.svg +0 -15
  298. data/app/assets/images/flags/4x3/tg.svg +0 -14
  299. data/app/assets/images/flags/4x3/th.svg +0 -7
  300. data/app/assets/images/flags/4x3/tj.svg +0 -22
  301. data/app/assets/images/flags/4x3/tk.svg +0 -5
  302. data/app/assets/images/flags/4x3/tl.svg +0 -13
  303. data/app/assets/images/flags/4x3/tm.svg +0 -206
  304. data/app/assets/images/flags/4x3/tn.svg +0 -13
  305. data/app/assets/images/flags/4x3/to.svg +0 -10
  306. data/app/assets/images/flags/4x3/tr.svg +0 -8
  307. data/app/assets/images/flags/4x3/tt.svg +0 -5
  308. data/app/assets/images/flags/4x3/tv.svg +0 -16
  309. data/app/assets/images/flags/4x3/tw.svg +0 -14
  310. data/app/assets/images/flags/4x3/tz.svg +0 -13
  311. data/app/assets/images/flags/4x3/ua.svg +0 -6
  312. data/app/assets/images/flags/4x3/ug.svg +0 -30
  313. data/app/assets/images/flags/4x3/um.svg +0 -15
  314. data/app/assets/images/flags/4x3/un.svg +0 -16
  315. data/app/assets/images/flags/4x3/us.svg +0 -10
  316. data/app/assets/images/flags/4x3/uy.svg +0 -28
  317. data/app/assets/images/flags/4x3/uz.svg +0 -30
  318. data/app/assets/images/flags/4x3/va.svg +0 -479
  319. data/app/assets/images/flags/4x3/vc.svg +0 -8
  320. data/app/assets/images/flags/4x3/ve.svg +0 -26
  321. data/app/assets/images/flags/4x3/vg.svg +0 -127
  322. data/app/assets/images/flags/4x3/vi.svg +0 -28
  323. data/app/assets/images/flags/4x3/vn.svg +0 -11
  324. data/app/assets/images/flags/4x3/vu.svg +0 -18
  325. data/app/assets/images/flags/4x3/wf.svg +0 -7
  326. data/app/assets/images/flags/4x3/ws.svg +0 -7
  327. data/app/assets/images/flags/4x3/xk.svg +0 -16
  328. data/app/assets/images/flags/4x3/ye.svg +0 -7
  329. data/app/assets/images/flags/4x3/yt.svg +0 -7
  330. data/app/assets/images/flags/4x3/za.svg +0 -17
  331. data/app/assets/images/flags/4x3/zm.svg +0 -27
  332. data/app/assets/images/flags/4x3/zw.svg +0 -21
  333. data/app/models/spree/frontend_configuration.rb +0 -16
@@ -8,7 +8,7 @@
8
8
  <% line_item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
9
9
  <li>
10
10
  <% # TODO: rework option values so options_text method can be used here %>
11
- <%= "#{ov.option_type.presentation}: #{ov.name.titleize}" %>
11
+ <%= "#{ov.option_type.presentation}: #{ov.presentation}" %>
12
12
  </li>
13
13
  <% end %>
14
14
  </ul>
@@ -1,6 +1,6 @@
1
1
  <% if try_spree_current_user %>
2
2
  <%= link_to Spree.t(:my_account).upcase, spree.account_path, class: 'dropdown-item' if spree.respond_to?(:account_path) %>
3
- <% if spree.respond_to(:admin_orders_path) %>
3
+ <% if spree.respond_to?(:admin_orders_path) %>
4
4
  <%= link_to Spree.t('nav_bar.admin_panel'), spree.admin_orders_path(locale: nil), class: 'dropdown-item text-uppercase' if try_spree_current_user.has_spree_role?(:admin) %>
5
5
  <% end %>
6
6
  <%= link_to Spree.t(:logout).upcase, spree_logout_path, class: 'dropdown-item', method: :get if defined?(spree_logout_path) %>
@@ -1,6 +1,6 @@
1
1
  <div class="col-lg-11 mx-auto">
2
2
  <h3 class="spree-mb-large spree-mt-large spree-header"><%= Spree.t(:log_in_to_continue) %></h3>
3
- <%= form_for Spree.user_class.new, as: :spree_user, url: spree_login_path do |f| %>
3
+ <%= form_for Spree.user_class.new, as: :spree_user, url: spree_login_path, data: { turbo: false } do |f| %>
4
4
  <div id="password-credentials" class="mb-4">
5
5
  <div class="form-group mb-4">
6
6
  <p class="form-group checkout-content-inner-field">
@@ -44,7 +44,7 @@
44
44
  <%= spree_nav_link_tag(promo_banner, { class: "dropdown-item" }) do %>
45
45
  <div class="category-image text-center my-4 mx-3">
46
46
  <% if promo_banner.icon.present? %>
47
- <%= image_tag main_app.url_for(promo_banner.icon.attachment), alt: promo_banner.icon.alt ,title: promo_banner.subtitle %>
47
+ <%= image_tag main_app.cdn_image_url(promo_banner.icon.attachment), alt: promo_banner.icon.alt ,title: promo_banner.subtitle %>
48
48
  <% end %>
49
49
  <div class="category-box">
50
50
  <div class="category-box-small-text">
@@ -1,4 +1,4 @@
1
- <ul id="nav-bar" class="nav align-items-center d-flex flex-nowrap justify-content-end navbar-right" data-turbo-permanent data-turbolinks-permanent>
1
+ <ul id="nav-bar" class="nav align-items-center d-flex flex-nowrap justify-content-end navbar-right" data-turbo-permanent data-turbo-permanent>
2
2
  <li>
3
3
  <div class="navbar-right-search-menu">
4
4
  <button type="button" class="navbar-right-dropdown-toggle search-icons" aria-label="<%= Spree.t('nav_bar.show_search') %>">
@@ -86,7 +86,7 @@
86
86
  <% item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
87
87
  <li>
88
88
  <% # TODO: rework option values so options_text method can be used here %>
89
- <%= "#{ov.option_type.presentation}: #{ov.name.titleize}" %>
89
+ <%= "#{ov.option_type.presentation}: #{ov.presentation}" %>
90
90
  </li>
91
91
  <% end %>
92
92
  </ul>
@@ -1,5 +1,5 @@
1
1
  <script>
2
- window.addEventListener('turbolinks:load', function() {
2
+ window.addEventListener('turbo:load', function() {
3
3
  Spree.translations = <%==
4
4
  {
5
5
  coupon_code_applied: Spree.t(:coupon_code_applied),
@@ -47,7 +47,7 @@
47
47
  data-variant-id="<%= image.viewable_id %>">
48
48
  <div class="product-carousel-item-squared <%= 'product-carousel-item-squared-only' if images.length == 1 %>">
49
49
  <% image_attrs = {
50
- src: main_app.url_for(image.url(zoomed ? :zoomed : :large)),
50
+ src: main_app.cdn_image_url(image.url(zoomed ? :zoomed : :large)),
51
51
  alt: image.alt || @product.name,
52
52
  class: "d-block w-100",
53
53
  width: zoomed ? 650 : 475,
@@ -66,7 +66,7 @@
66
66
  data-slide-to="<%= imageIndex %>"
67
67
  class="product-carousel-indicators-indicator product-carousel-indicators-indicator--visible<%= ' active' if imageIndex == 0 %>">
68
68
  <%= lazy_image(
69
- src: main_app.url_for(image.url(:pdp_thumbnail)),
69
+ src: main_app.cdn_image_url(image.url(:pdp_thumbnail)),
70
70
  class: 'd-block w-100',
71
71
  alt: image.alt || @product.name,
72
72
  width: image.style(:pdp_thumbnail)[:width],
@@ -20,7 +20,7 @@
20
20
  data-variant-is-master="<%= image.viewable_id == @product.master.id %>"
21
21
  data-variant-id="<%= image.viewable_id %>">
22
22
  <%= lazy_image(
23
- src: main_app.url_for(image.url(:pdp_thumbnail)),
23
+ src: main_app.cdn_image_url(image.url(:pdp_thumbnail)),
24
24
  class: 'd-block w-100',
25
25
  alt: image.alt || @product.name,
26
26
  width: 57,
@@ -10,30 +10,30 @@
10
10
  <div class="col-12 homepage-hero-image position-relative p-0 <%= section_padding %>">
11
11
 
12
12
  <div class="bg-light" style="--aspect-ratio:12/5;">
13
- <% if section.image_one.attached? %>
13
+ <% if section.image_one&.attachment&.attached? %>
14
14
 
15
15
  <!-- SM to MD -->
16
16
  <img class="d-block d-md-none lazyload"
17
- data-src="<%= main_app.url_for(section.img_one_sm) %>"
18
- data-srcset="<%= main_app.url_for(section.img_one_sm) %>"
17
+ data-src="<%= main_app.cdn_image_url(section.img_one_sm) %>"
18
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_sm) %>"
19
19
  alt="<%= section&.title %>">
20
20
 
21
21
  <!-- MD to LG -->
22
22
  <img class="d-none d-md-block d-lg-none lazyload"
23
- data-src="<%= main_app.url_for(section.img_one_md) %>"
24
- data-srcset="<%= main_app.url_for(section.img_one_md) %>"
23
+ data-src="<%= main_app.cdn_image_url(section.img_one_md) %>"
24
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_md) %>"
25
25
  alt="<%= section&.title %>">
26
26
 
27
27
  <!-- LG to XL -->
28
28
  <img class="d-none d-lg-block d-xl-none lazyload"
29
- data-src="<%= main_app.url_for(section.img_one_lg) %>"
30
- data-srcset="<%= main_app.url_for(section.img_one_lg) %>"
29
+ data-src="<%= main_app.cdn_image_url(section.img_one_lg) %>"
30
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_lg) %>"
31
31
  alt="<%= section&.title %>">
32
32
 
33
33
  <!-- XL UP -->
34
34
  <img class="d-none d-xl-block lazyload"
35
- data-src="<%= main_app.url_for(section.img_one_xl) %>"
36
- data-srcset="<%= main_app.url_for(section.img_one_xl) %>"
35
+ data-src="<%= main_app.cdn_image_url(section.img_one_xl) %>"
36
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_xl) %>"
37
37
  alt="<%= section&.title %>">
38
38
 
39
39
  <% else %>
@@ -64,24 +64,24 @@
64
64
  <div class="col-12">
65
65
 
66
66
  <%= link_to link_one, class: link_one_classes, style: '--aspect-ratio:18/13;' do %>
67
- <% if section.image_one.attached? && section.image_one.variable? %>
67
+ <% if section.image_one&.attachment&.attached? && section.image_one&.attachment&.variable? %>
68
68
 
69
69
  <!-- XS to MD -->
70
70
  <img class="d-md-none lazyload"
71
- data-src="<%= main_app.url_for(section.img_one_md) %>"
72
- data-srcset="<%= main_app.url_for(section.img_one_md) %>"
71
+ data-src="<%= main_app.cdn_image_url(section.img_one_md) %>"
72
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_md) %>"
73
73
  alt="<%= section&.title_one %>">
74
74
 
75
75
  <!-- MD to XL -->
76
76
  <img class="d-none d-md-block d-xl-none lazyload"
77
- data-src="<%= main_app.url_for(section.img_one_lg) %>"
78
- data-srcset="<%= main_app.url_for(section.img_one_lg) %>"
77
+ data-src="<%= main_app.cdn_image_url(section.img_one_lg) %>"
78
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_lg) %>"
79
79
  alt="<%= section&.title_one %>">
80
80
 
81
81
  <!-- XL UP -->
82
82
  <img class="d-none d-xl-block lazyload"
83
- data-src="<%= main_app.url_for(section.img_one_xl) %>"
84
- data-srcset="<%= main_app.url_for(section.img_one_xl) %>"
83
+ data-src="<%= main_app.cdn_image_url(section.img_one_xl) %>"
84
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_xl) %>"
85
85
  alt="<%= section&.title_one %>">
86
86
  <% else %>
87
87
  <%= icon( name: 'card-image',
@@ -102,24 +102,24 @@
102
102
  <div class="col-12">
103
103
 
104
104
  <%= link_to link_three, class: link_three_classes, style: '--aspect-ratio:18/13;' do %>
105
- <% if section.image_three.attached? && section.image_three.variable? %>
105
+ <% if section.image_three&.attachment&.attached? && section.image_three&.attachment&.variable? %>
106
106
 
107
107
  <!-- XS to MD -->
108
108
  <img class="d-md-none lazyload"
109
- data-src="<%= main_app.url_for(section.img_three_md) %>"
110
- data-srcset="<%= main_app.url_for(section.img_three_md) %>"
109
+ data-src="<%= main_app.cdn_image_url(section.img_three_md) %>"
110
+ data-srcset="<%= main_app.cdn_image_url(section.img_three_md) %>"
111
111
  alt="<%= section&.title_three %>">
112
112
 
113
113
  <!-- MD to XL -->
114
114
  <img class="d-none d-md-block d-xl-none lazyload"
115
- data-src="<%= main_app.url_for(section.img_three_lg) %>"
116
- data-srcset="<%= main_app.url_for(section.img_three_lg) %>"
115
+ data-src="<%= main_app.cdn_image_url(section.img_three_lg) %>"
116
+ data-srcset="<%= main_app.cdn_image_url(section.img_three_lg) %>"
117
117
  alt="<%= section&.title_three %>">
118
118
 
119
119
  <!-- XL UP -->
120
120
  <img class="d-none d-xl-block lazyload"
121
- data-src="<%= main_app.url_for(section.img_three_xl) %>"
122
- data-srcset="<%= main_app.url_for(section.img_three_xl) %>"
121
+ data-src="<%= main_app.cdn_image_url(section.img_three_xl) %>"
122
+ data-srcset="<%= main_app.cdn_image_url(section.img_three_xl) %>"
123
123
  alt="<%= section&.title_three %>">
124
124
  <% else %>
125
125
  <%= icon( name: 'card-image',
@@ -139,24 +139,24 @@
139
139
  <!-- Right Block TALL -->
140
140
  <div class="col-6 <%= section_two_padding %>">
141
141
  <%= link_to link_two, class: link_two_classes, style: '--aspect-ratio:27/40;' do %>
142
- <% if section.image_two.attached? && section.image_two.variable? %>
142
+ <% if section.image_two&.attachment&.attached? && section.image_two&.attachment&.variable? %>
143
143
 
144
144
  <!-- XS to MD -->
145
145
  <img class="d-md-none lazyload"
146
- data-src="<%= main_app.url_for(section.img_two_md) %>"
147
- data-srcset="<%= main_app.url_for(section.img_two_md) %>"
146
+ data-src="<%= main_app.cdn_image_url(section.img_two_md) %>"
147
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_md) %>"
148
148
  alt="<%= section&.title_two %>">
149
149
 
150
150
  <!-- MD to XL -->
151
151
  <img class="d-none d-md-block d-xl-none lazyload"
152
- data-src="<%= main_app.url_for(section.img_two_lg) %>"
153
- data-srcset="<%= main_app.url_for(section.img_two_lg) %>"
152
+ data-src="<%= main_app.cdn_image_url(section.img_two_lg) %>"
153
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_lg) %>"
154
154
  alt="<%= section&.title_two %>">
155
155
 
156
156
  <!-- XL UP -->
157
157
  <img class="d-none d-xl-block lazyload"
158
- data-src="<%= main_app.url_for(section.img_two_xl) %>"
159
- data-srcset="<%= main_app.url_for(section.img_two_xl) %>"
158
+ data-src="<%= main_app.cdn_image_url(section.img_two_xl) %>"
159
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_xl) %>"
160
160
  alt="<%= section&.title_two %>">
161
161
  <% else %>
162
162
  <%= icon( name: 'file-image',
@@ -36,23 +36,23 @@
36
36
  class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_one}",
37
37
  style: '--aspect-ratio:54/35;' do %>
38
38
 
39
- <% if section.image_one.attached? %>
39
+ <% if section.image_one&.attachment&.attached? %>
40
40
  <!-- XS to MD -->
41
41
  <img class="d-md-none lazyload"
42
- data-src="<%= main_app.url_for(section.img_one_md) %>"
43
- data-srcset="<%= main_app.url_for(section.img_one_md) %>"
42
+ data-src="<%= main_app.cdn_image_url(section.img_one_md) %>"
43
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_md) %>"
44
44
  alt="<%= section&.title_one %>">
45
45
 
46
46
  <!-- MD to XL -->
47
47
  <img class="d-none d-md-block d-xl-none lazyload"
48
- data-src="<%= main_app.url_for(section.img_one_lg) %>"
49
- data-srcset="<%= main_app.url_for(section.img_one_lg) %>"
48
+ data-src="<%= main_app.cdn_image_url(section.img_one_lg) %>"
49
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_lg) %>"
50
50
  alt="<%= section&.title_one %>">
51
51
 
52
52
  <!-- XL UP -->
53
53
  <img class="d-none d-xl-block lazyload"
54
- data-src="<%= main_app.url_for(section.img_one_xl) %>"
55
- data-srcset="<%= main_app.url_for(section.img_one_xl) %>"
54
+ data-src="<%= main_app.cdn_image_url(section.img_one_xl) %>"
55
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_xl) %>"
56
56
  alt="<%= section&.title_one %>">
57
57
  <% else %>
58
58
  <%= icon( name: 'card-image',
@@ -79,23 +79,23 @@
79
79
  class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_two}",
80
80
  style: '--aspect-ratio:54/35;' do %>
81
81
 
82
- <% if section.image_two.attached? %>
82
+ <% if section.image_two&.attachment&.attached? %>
83
83
  <!-- XS to MD -->
84
84
  <img class="d-md-none lazyload"
85
- data-src="<%= main_app.url_for(section.img_two_md) %>"
86
- data-srcset="<%= main_app.url_for(section.img_two_md) %>"
85
+ data-src="<%= main_app.cdn_image_url(section.img_two_md) %>"
86
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_md) %>"
87
87
  alt="<%= section&.title_two %>">
88
88
 
89
89
  <!-- MD to XL -->
90
90
  <img class="d-none d-md-block d-xl-none lazyload"
91
- data-src="<%= main_app.url_for(section.img_two_lg) %>"
92
- data-srcset="<%= main_app.url_for(section.img_two_lg) %>"
91
+ data-src="<%= main_app.cdn_image_url(section.img_two_lg) %>"
92
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_lg) %>"
93
93
  alt="<%= section&.title_two %>">
94
94
 
95
95
  <!-- XL UP -->
96
96
  <img class="d-none d-xl-block lazyload"
97
- data-src="<%= main_app.url_for(section.img_two_xl) %>"
98
- data-srcset="<%= main_app.url_for(section.img_two_xl) %>"
97
+ data-src="<%= main_app.cdn_image_url(section.img_two_xl) %>"
98
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_xl) %>"
99
99
  alt="<%= section&.title_two %>">
100
100
  <% else %>
101
101
  <%= icon( name: 'card-image',
@@ -13,7 +13,7 @@
13
13
  <% if @taxon.icon&.attachment %>
14
14
  <div class="d-none d-md-block pt-4 taxon-icon">
15
15
  <%= lazy_image(
16
- src: main_app.url_for(@taxon.icon.attachment),
16
+ src: main_app.cdn_image_url(@taxon.icon.attachment),
17
17
  alt: @taxon.description || Spree.t('taxon_missing_alt'),
18
18
  width: 1110,
19
19
  height: 300,
@@ -2,7 +2,7 @@
2
2
  <%= inline_svg_tag('edit.svg', width: 24, height: 24) %>
3
3
  <% end %>
4
4
 
5
- <%= link_to '#', class: 'js-delete-address-link ml-3', data: { turbolinks: false, hook: 'remove_address', address: spree.address_path(address) }, aria: { label: Spree.t('address_book.remove_address') } do %>
5
+ <%= link_to '#', class: 'js-delete-address-link ml-3', data: { turbo: false, hook: 'remove_address', address: spree.address_path(address) }, aria: { label: Spree.t('address_book.remove_address') } do %>
6
6
  <%= icon(name: 'garbage_2',
7
7
  classes: '',
8
8
  width: 24,
@@ -24,7 +24,7 @@ module Spree
24
24
  # SCSS theming
25
25
  template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
26
26
  # Sprockets 4 manifest
27
- template 'app/assets/config/manifest.js'
27
+ template 'app/assets/config/manifest.js', force: Rails.env.test?
28
28
  # home page template
29
29
  directory 'home', './app/views/spree/home'
30
30
  end
@@ -0,0 +1,18 @@
1
+ module Spree
2
+ module Frontend
3
+ class Configuration < Preferences::Configuration
4
+ preference :additional_filters_partials, :array, default: %w()
5
+ preference :always_put_site_name_in_title, :boolean, default: true
6
+ preference :coupon_codes_enabled, :boolean, default: true # Determines if we show coupon code form at cart and checkout
7
+ preference :http_cache_enabled, :boolean, default: true
8
+ preference :layout, :string, default: 'spree/layouts/spree_application'
9
+ preference :locale, :string, default: nil
10
+ preference :products_filters, :array, default: %w(keywords price sort_by)
11
+ preference :remember_me_enabled, :boolean, default: true
12
+ preference :shipping_instructions, :boolean, default: false # Request instructions/info for shipping
13
+ preference :show_raw_product_description, :boolean, default: false
14
+ preference :show_store_selector, :boolean, default: false
15
+ preference :title_site_name_separator, :string, default: '-' # When always_put_site_name_in_title is true, insert a separator character before the site name in the title
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,5 @@
1
+ require_relative 'configuration'
2
+
1
3
  module Spree
2
4
  module Frontend
3
5
  class Engine < ::Rails::Engine
@@ -15,14 +17,7 @@ module Spree
15
17
  end
16
18
 
17
19
  initializer 'spree.frontend.environment', before: :load_config_initializers do |_app|
18
- Spree::Frontend::Config = Spree::FrontendConfiguration.new
19
- end
20
-
21
- initializer 'spree.frontend.checking_deprecated_preferences' do
22
- Spree::Frontend::Config.deprecated_preferences.each do |pref|
23
- # FIXME: we should only notify about deprecated preferences that are in use, not all of them
24
- # warn "[DEPRECATION] Spree::Frontend::Config[:#{pref[:name]}] is deprecated. #{pref[:message]}"
25
- end
20
+ Spree::Frontend::Config = Spree::Frontend::Configuration.new
26
21
  end
27
22
  end
28
23
  end
@@ -1,6 +1,6 @@
1
1
  module Spree
2
2
  module Frontend
3
- VERSION = '4.4.0'.freeze
3
+ VERSION = '4.6.0'.freeze
4
4
 
5
5
  def self.version
6
6
  VERSION
@@ -9,7 +9,8 @@ require 'inline_svg'
9
9
  require 'popper_js'
10
10
  require 'canonical-rails'
11
11
  require 'jquery-rails'
12
- require 'turbolinks'
12
+ require 'jsbundling-rails'
13
+ require 'turbo-rails'
13
14
  require 'responders'
14
15
 
15
16
  require 'spree/frontend/middleware/seo_assist'
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Spree::Frontend.version
8
8
  s.authors = ['Sean Schofield', 'Spark Solutions']
9
9
  s.email = 'hello@spreecommerce.org'
10
- s.summary = 'The default Storefront built with Rails and Turbolinks for Spree eCommerce platform'
10
+ s.summary = 'The default Storefront built with Rails and Turbo/Hotwire for Spree eCommerce platform'
11
11
  s.description = s.summary
12
12
  s.homepage = 'https://spreecommerce.org'
13
13
  s.license = 'BSD-3-Clause'
@@ -33,11 +33,13 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency 'glyphicons', '~> 1.0'
34
34
  s.add_dependency 'canonical-rails', '~> 0.2', '>= 0.2.10'
35
35
  s.add_dependency 'inline_svg', '~> 1.5'
36
+ s.add_dependency 'jsbundling-rails'
36
37
  s.add_dependency 'jquery-rails', '~> 4.3'
37
38
  s.add_dependency 'sass-rails', '>= 5'
38
- s.add_dependency 'turbolinks', '~> 5.2'
39
+ s.add_dependency 'turbo-rails'
39
40
  s.add_dependency 'responders'
40
41
  s.add_dependency 'sprockets', '~> 4.0'
42
+ s.add_dependency 'flag-icons-rails', '~> 3.4'
41
43
 
42
44
  s.add_development_dependency 'capybara-accessible'
43
45
  end