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
@@ -26,7 +26,7 @@ Spree.loadsCarouselElements = function () {
26
26
  $('div[data-product-carousel-taxon-id]').each(function (_index, element) { Spree.loadCarousel(element, this) })
27
27
  }
28
28
 
29
- document.addEventListener('turbolinks:load', function () {
29
+ document.addEventListener('turbo:load', function () {
30
30
  var carouselPresent = $('div[data-product-carousel-taxon-id]')
31
31
 
32
32
  if (carouselPresent.length) {
@@ -9,7 +9,7 @@ Spree.fetchRelatedProducts = function (id, htmlContainer) {
9
9
  })
10
10
  }
11
11
 
12
- document.addEventListener('turbolinks:load', function () {
12
+ document.addEventListener('turbo:load', function () {
13
13
  var productDetailsPage = $('body#product-details')
14
14
 
15
15
  if (productDetailsPage.length) {
@@ -1,4 +1,4 @@
1
- //= require spree/api/storefront/cart
1
+ //= require spree/frontend/api/storefront/cart
2
2
  //= require ../shared/product_added_modal
3
3
  //= require ../shared/variant_select
4
4
 
@@ -89,7 +89,7 @@ function CartForm($, $cartForm) {
89
89
  this.selectedOptionValueIds.splice(
90
90
  optionTypeIndex,
91
91
  this.selectedOptionValueIds.length,
92
- parseInt($optionValue.val())
92
+ $optionValue.val().toString()
93
93
  )
94
94
  }
95
95
 
@@ -104,7 +104,7 @@ function CartForm($, $cartForm) {
104
104
  .find(OPTION_VALUE_SELECTOR)
105
105
  .each(function(_index, ov) {
106
106
  var $ov = $(ov)
107
- var id = parseInt($ov.val())
107
+ var id = $ov.val().toString()
108
108
 
109
109
  $ov.prop('checked', false)
110
110
  $ov.prop('disabled', !availableOptionValueIds.includes(id))
@@ -121,7 +121,7 @@ function CartForm($, $cartForm) {
121
121
 
122
122
  return this.variants.reduce(function(acc, variant) {
123
123
  var optionValues = variant.option_values.map(function(ov) {
124
- return ov.id
124
+ return ov.id.toString()
125
125
  })
126
126
 
127
127
  var isPossibleVariantFound = selectedOptionValueIds.every(function(ov) {
@@ -180,7 +180,7 @@ function CartForm($, $cartForm) {
180
180
 
181
181
  if (!this.withOptionValues) {
182
182
  return this.variants.find(function(variant) {
183
- return variant.id === parseInt(self.$variantIdInput.val())
183
+ return variant.id && self.$variantIdInput.val() && variant.id.toString() === self.$variantIdInput.val().toString()
184
184
  })
185
185
  }
186
186
 
@@ -190,7 +190,7 @@ function CartForm($, $cartForm) {
190
190
 
191
191
  return this.variants.find(function(variant) {
192
192
  var optionValueIds = variant.option_values.map(function(ov) {
193
- return ov.id
193
+ return ov.id.toString()
194
194
  })
195
195
 
196
196
  return self.areArraysEqual(optionValueIds, self.selectedOptionValueIds)
@@ -298,7 +298,7 @@ Spree.ready(function($) {
298
298
  quantity,
299
299
  options, // options hash - you can pass additional parameters here, your backend
300
300
  // needs to be aware of those, see API docs:
301
- // https://github.com/spree/spree/blob/master/api/docs/v2/storefront/index.yaml#L42
301
+ // https://github.com/spree/spree/blob/d894358e49b8c3a7f6944e838de7cd92510e31d0/api/docs/v2/storefront/index.yaml#L442
302
302
  function(response) {
303
303
  $addToCart.prop('disabled', false)
304
304
  Spree.fetchCart()
@@ -331,7 +331,7 @@ Spree.ready(function($) {
331
331
  CartForm($, $cartForm)
332
332
  })
333
333
 
334
- document.addEventListener('turbolinks:request-start', function () {
334
+ document.addEventListener('turbo:request-start', function () {
335
335
  Spree.hideProductAddedModal()
336
336
  })
337
337
  })
@@ -1,4 +1,4 @@
1
- document.addEventListener('turbolinks:load', function () {
1
+ document.addEventListener('turbo:load', function () {
2
2
  $('#product-description-arrow').click(function () {
3
3
  document.getElementById('product-description-long').classList.remove('d-none')
4
4
  document.getElementById('product-description-short').classList.add('d-none')
@@ -35,7 +35,7 @@ Spree.ready(function ($) {
35
35
  '?' +
36
36
  customEncodeURI(decodeURIComponent(searchParams.toString()))
37
37
  );
38
- Turbolinks.visit(location);
38
+ Turbo.visit(location);
39
39
  }
40
40
 
41
41
  function updateFilters(event, $this, removeValue) {
@@ -21,7 +21,7 @@ Spree.ready(function($) {
21
21
  this.closeAllCategories = this.closeAllCategories.bind(this);
22
22
 
23
23
  window.addEventListener('resize', this.onResize);
24
- window.addEventListener('turbolinks:request-start', this.onCloseClick);
24
+ window.addEventListener('turbo:request-start', this.onCloseClick);
25
25
 
26
26
  this.burgerButton.addEventListener('click', this.onBurgerClick, false);
27
27
  this.closeButton.addEventListener('click', this.onCloseClick, false);
@@ -77,7 +77,7 @@ Spree.ready(function($) {
77
77
 
78
78
  MobileNavigationManager.prototype.openCategory = function(category) {
79
79
  this.openedCategories.push(category);
80
- var subList = document.querySelector('ul[data-category=' + category + ']');
80
+ var subList = document.querySelector('ul[data-category="' + category + '"]');
81
81
  if (subList) {
82
82
  this.mobileNavigationList.classList.add('mobile-navigation-list-subcategory-shown');
83
83
  this.mobileNavigationList.scrollTop = 0
@@ -89,7 +89,7 @@ Spree.ready(function($) {
89
89
 
90
90
  MobileNavigationManager.prototype.closeCurrentCategory = function() {
91
91
  var category = this.openedCategories.pop();
92
- var subList = document.querySelector('ul[data-category=' + category + ']');
92
+ var subList = document.querySelector('ul[data-category="' + category + '"]');
93
93
  if (subList) {
94
94
  subList.classList.remove('shown');
95
95
  }
@@ -101,7 +101,7 @@ Spree.ready(function($) {
101
101
  }
102
102
 
103
103
  MobileNavigationManager.prototype.closeCategory = function(category) {
104
- var subList = document.querySelector('ul[data-category=' + category + ']');
104
+ var subList = document.querySelector('ul[data-category="' + category + '"]');
105
105
  subList.style.transition = 'none';
106
106
  subList.classList.remove('shown');
107
107
  setTimeout(function(){ subList.style.transition = ''; }, 500);
@@ -8,7 +8,7 @@ this.initializeQueryParamsCheck = function () {
8
8
 
9
9
  function verifyVariantIdMatch() {
10
10
  this.variants.forEach(function(variant) {
11
- if (parseInt(variant.id) === parseInt(variantIdFromUrl)) this.urlQueryMatchFound = true
11
+ if (variant.id.toString() === variantIdFromUrl.toString()) this.urlQueryMatchFound = true
12
12
  })
13
13
  }
14
14
 
@@ -23,7 +23,7 @@ this.setSelectedVariantFromUrl = function () {
23
23
 
24
24
  this.getVariantOptionsById = function(variantIdFromUrl) {
25
25
  this.variants.forEach(function(variant) {
26
- if (parseInt(variant.id) === parseInt(variantIdFromUrl)) this.sortOptionValues(variant.option_values)
26
+ if (variant.id.toString() === variantIdFromUrl.toString()) this.sortOptionValues(variant.option_values)
27
27
  })
28
28
  }
29
29
 
@@ -36,7 +36,7 @@ function buildArray(item) {
36
36
  var target = container.querySelectorAll('.product-variants-variant-values-radio')
37
37
 
38
38
  target.forEach(function(inputTag) {
39
- if (parseInt(inputTag.value) === item.id && inputTag.dataset.presentation === item.presentation) {
39
+ if (inputTag.value.toString() === item.id.toString() && inputTag.dataset.presentation === item.presentation) {
40
40
  this.selectedOptions.push(inputTag)
41
41
  }
42
42
  })
@@ -4,14 +4,13 @@
4
4
  //= require bootstrap
5
5
  //= require jquery.payment
6
6
  //= require cleave
7
- //= require spree
7
+ //= require spree/frontend/main
8
8
  //= require polyfill.min
9
9
  //= require fetch.umd
10
- //= require spree/api/main
10
+ //= require spree/frontend/api/main
11
11
  //= require ./lazysizes.config
12
12
  //= require lazysizes.min
13
13
  //= require accounting.min
14
- //= require turbolinks
15
14
  //= require spree/frontend/account
16
15
  //= require spree/frontend/api_tokens
17
16
  //= require spree/frontend/carousel-noconflict
@@ -40,31 +39,25 @@
40
39
  //= require spree/frontend/views/spree/shared/nav_bar
41
40
  //= require spree/frontend/views/spree/shared/product_added_modal
42
41
  //= require spree/frontend/views/spree/shared/quantity_select
43
- //= require spree/frontend/turbolinks_scroll_fix
42
+ //= require spree/frontend/turbo_scroll_fix
44
43
  //= require spree/frontend/main_nav_bar
45
44
  //= require spree/frontend/login
46
45
 
47
- Spree.routes.api_tokens = Spree.pathFor('api_tokens')
48
- Spree.routes.ensure_cart = Spree.pathFor('ensure_cart')
46
+ Spree.routes.api_tokens = Spree.localizedPathFor('api_tokens')
47
+ Spree.routes.ensure_cart = Spree.localizedPathFor('ensure_cart')
49
48
  Spree.routes.api_v2_storefront_cart_apply_coupon_code = Spree.localizedPathFor('api/v2/storefront/cart/apply_coupon_code')
50
49
  Spree.routes.api_v2_storefront_cart_remove_coupon_code = function(couponCode) { return Spree.localizedPathFor('api/v2/storefront/cart/remove_coupon_code/' + couponCode) }
51
50
  Spree.routes.api_v2_storefront_destroy_credit_card = function(id) { return Spree.localizedPathFor('api/v2/storefront/account/credit_cards/' + id) }
52
51
  Spree.routes.product = function(id) { return Spree.localizedPathFor('products/' + id) }
53
52
  Spree.routes.product_related = function(id) { return Spree.localizedPathFor('products/' + id + '/related') }
54
53
  Spree.routes.product_carousel = function (taxonId) { return Spree.localizedPathFor('product_carousel/' + taxonId) }
55
- Spree.routes.set_locale = function(locale) { return Spree.pathFor('locale/set?switch_to_locale=' + locale) }
56
- Spree.routes.set_currency = function(currency) { return Spree.pathFor('currency/set?switch_to_currency=' + currency) }
57
-
58
- Spree.showProgressBar = function () {
59
- if (!Turbolinks.supported) { return }
60
- Turbolinks.controller.adapter.progressBar.setValue(0)
61
- Turbolinks.controller.adapter.progressBar.show()
62
- }
54
+ Spree.routes.set_locale = function(locale) { return Spree.localizedPathFor('locale/set?switch_to_locale=' + locale) }
55
+ Spree.routes.set_currency = function(currency) { return Spree.localizedPathFor('currency/set?switch_to_currency=' + currency) }
63
56
 
64
57
  Spree.clearCache = function () {
65
- if (!Turbolinks.supported) { return }
58
+ if (!window.Turbo) { return }
66
59
 
67
- Turbolinks.clearCache()
60
+ Turbo.clearCache()
68
61
  }
69
62
 
70
63
  Spree.setCurrency = function (currency) {
@@ -81,5 +74,5 @@ Spree.setCurrency = function (currency) {
81
74
 
82
75
  SPREE_CURRENCY = currency
83
76
 
84
- Turbolinks.visit(window.location.pathname + queryString, { action: 'replace' })
77
+ Turbo.visit(window.location.pathname + queryString, { action: 'replace' })
85
78
  }
@@ -10,7 +10,7 @@ module Spree
10
10
  flash[:notice] = I18n.t(:successfully_created, scope: :address_book)
11
11
  redirect_to spree.account_path
12
12
  else
13
- render action: 'new'
13
+ render action: 'new', status: :unprocessable_entity
14
14
  end
15
15
  end
16
16
 
@@ -27,7 +27,7 @@ module Spree
27
27
  flash[:notice] = Spree.t(:successfully_updated, scope: :address_book)
28
28
  redirect_back_or_default(addresses_path)
29
29
  else
30
- render :edit
30
+ render :edit, status: :unprocessable_entity
31
31
  end
32
32
  end
33
33
 
@@ -46,7 +46,7 @@ module Spree
46
46
  redirect_to spree.checkout_state_path(@order.state)
47
47
  end
48
48
  else
49
- render :edit
49
+ render :edit, status: :unprocessable_entity
50
50
  end
51
51
  end
52
52
 
@@ -190,7 +190,7 @@ module Spree
190
190
  def rescue_from_spree_gateway_error(exception)
191
191
  flash.now[:error] = Spree.t(:spree_gateway_error_flash_for_checkout)
192
192
  @order.errors.add(:base, exception.message)
193
- render :edit
193
+ render :edit, status: :unprocessable_entity
194
194
  end
195
195
 
196
196
  def check_authorization
@@ -10,6 +10,11 @@ module Spree
10
10
  new_locale = (params[:switch_to_locale] || params[:locale]).to_s
11
11
 
12
12
  if new_locale.present? && supported_locale?(new_locale)
13
+
14
+ if try_spree_current_user && try_spree_current_user.selected_locale != new_locale
15
+ try_spree_current_user.update!(selected_locale: new_locale)
16
+ end
17
+
13
18
  if should_build_new_url?
14
19
  redirect_to BuildLocalizedRedirectUrl.call(
15
20
  url: request.env['HTTP_REFERER'],
@@ -27,10 +32,11 @@ module Spree
27
32
  private
28
33
 
29
34
  def should_build_new_url?
35
+ return false if request.env['HTTP_REFERER'].blank?
30
36
  if request.env['HTTP_REFERER'].match(REDIRECT_TO_ROOT)
31
37
  false
32
38
  else
33
- request.env['HTTP_REFERER'].present? && request.env['HTTP_REFERER'] != request.env['REQUEST_URI']
39
+ request.env['HTTP_REFERER'] != request.env['REQUEST_URI']
34
40
  end
35
41
  end
36
42
  end
@@ -25,7 +25,7 @@ module Spree
25
25
  end
26
26
  end
27
27
  else
28
- respond_with(@order)
28
+ respond_with(@order, status: :unprocessable_entity)
29
29
  end
30
30
  end
31
31
 
@@ -52,7 +52,7 @@ module Spree
52
52
  end
53
53
 
54
54
  def load_product
55
- @product = current_store.products.for_user(try_spree_current_user).friendly.find(params[:id])
55
+ @product = find_with_fallback_default_locale { current_store.products.for_user(try_spree_current_user).friendly.find(params[:id]) }
56
56
  end
57
57
 
58
58
  def load_taxon
@@ -30,7 +30,7 @@ module Spree
30
30
  end
31
31
 
32
32
  def load_taxon
33
- @taxon = current_store.taxons.friendly.find(params[:id])
33
+ @taxon = find_with_fallback_default_locale { current_store.taxons.friendly.find(params[:id]) }
34
34
  end
35
35
 
36
36
  def load_products
@@ -9,12 +9,18 @@ module Spree
9
9
  end
10
10
 
11
11
  def logo(image_path = nil, options = {})
12
- image_path ||= if current_store.logo.attached? && current_store.logo.variable?
13
- main_app.url_for(current_store.logo.variant(resize: '244x104>'))
14
- elsif current_store.logo.attached? && current_store.logo.image?
15
- main_app.url_for(current_store.logo)
12
+ logo_attachment = if defined?(Spree::StoreLogo) && current_store.logo.is_a?(Spree::StoreLogo)
13
+ current_store.logo.attachment # Spree v5
14
+ else
15
+ current_store.logo # Spree 4.x
16
+ end
17
+
18
+ image_path ||= if logo_attachment&.attached? && logo_attachment&.variable?
19
+ main_app.cdn_image_url(logo_attachment.variant(resize: '244x104>'))
20
+ elsif logo_attachment&.attached? && logo_attachment&.image?
21
+ main_app.cdn_image_url(current_store.logo)
16
22
  else
17
- 'logo/spree_50.png'
23
+ asset_path('logo/spree_50.png')
18
24
  end
19
25
 
20
26
  path = spree.respond_to?(:root_path) ? spree.root_path : main_app.root_path
@@ -165,7 +171,7 @@ module Spree
165
171
  image = default_image_for_product_or_variant(product)
166
172
 
167
173
  image_url = if image.present?
168
- main_app.url_for(image.url('plp'))
174
+ main_app.cdn_image_url(image.url('plp'))
169
175
  else
170
176
  asset_path('noimage/plp.svg')
171
177
  end
@@ -200,7 +206,7 @@ module Spree
200
206
  widths = { lg: 1200, md: 992, sm: 768, xs: 576 }
201
207
  set = []
202
208
  widths.each do |key, value|
203
- file = main_app.url_for(image.url("plp_and_carousel_#{key}"))
209
+ file = main_app.cdn_image_url(image.url("plp_and_carousel_#{key}"))
204
210
 
205
211
  set << "#{file} #{value}w"
206
212
  end
@@ -352,7 +358,7 @@ module Spree
352
358
  def spree_social_link(service)
353
359
  return '' if current_store.send(service).blank?
354
360
 
355
- link_to "https://#{service}.com/#{current_store.send(service)}", target: :blank, rel: 'nofollow noopener', 'aria-label': service do
361
+ link_to "https://#{service}.com/#{current_store.send(service)}", target: '_blank', rel: 'nofollow noopener', 'aria-label': service do
356
362
  content_tag :figure, id: service, class: 'px-2' do
357
363
  icon(name: service, width: 22, height: 22)
358
364
  end
@@ -67,7 +67,7 @@ module Spree
67
67
  "/#{I18n.locale}"
68
68
  end
69
69
 
70
- if Spree::MenuItem::DYNAMIC_RESOURCE_TYPE.include? item.linked_resource_type
70
+ if ['Spree::Product', 'Spree::Taxon', 'Spree::CmsPage'].include?(item.linked_resource_type)
71
71
  output_locale.to_s + item.link
72
72
  elsif item.linked_resource_type == 'Home Page'
73
73
  "/#{locale_param}"
@@ -67,7 +67,7 @@ module Spree
67
67
  }
68
68
  end
69
69
  else
70
- filter_content_tag(option_value.name, opts.merge(is_selected: is_selected))
70
+ filter_content_tag(option_value.presentation, opts.merge(is_selected: is_selected))
71
71
  end
72
72
  end
73
73
  end
@@ -4,9 +4,12 @@ module Spree
4
4
  class BuildLocalizedRedirectUrl
5
5
  prepend Spree::ServiceModule::Base
6
6
 
7
- LOCALE_REGEX = /^\/[A-Za-z]{2}\/|^\/[A-Za-z]{2}-[A-Za-z]{2}\/|^\/[A-Za-z]{2}$|^\/[A-Za-z]{2}-[A-Za-z]{2}$/.freeze
7
+ LOCALE_REGEX = /^\/([A-Za-z]{2})\/|^\/([A-Za-z]{2}-[A-Za-z]{2})\/|^\/([A-Za-z]{2})$|^\/([A-Za-z]{2}-[A-Za-z]{2})$/.freeze
8
8
 
9
- SUPPORTED_PATHS_REGEX = /\/(products|t\/|cart|checkout|addresses|content|pages)/.freeze
9
+ SUPPORTED_PATHS_REGEX = /\/(products|t\/|cart|checkout|addresses|content|pages|login|account|logout|signup|users)/.freeze
10
+
11
+ PRODUCT_PATH_REGEX = /\/products\/(\S+)/.freeze
12
+ TAXON_PATH_REGEX = /\/t\/(\S+)/.freeze
10
13
 
11
14
  # rubocop:disable Lint/UnusedMethodArgument
12
15
  def call(url:, locale:, default_locale: nil)
@@ -23,11 +26,12 @@ module Spree
23
26
  success(
24
27
  url: URI(url),
25
28
  locale: locale,
29
+ default_locale: default_locale,
26
30
  default_locale_supplied: default_locale_supplied?(locale, default_locale)
27
31
  )
28
32
  end
29
33
 
30
- def generate_new_path(url:, locale:, default_locale_supplied:)
34
+ def generate_new_path(url:, locale:, default_locale:, default_locale_supplied:)
31
35
  unless supported_path?(url.path)
32
36
  return success(
33
37
  url: url,
@@ -38,11 +42,20 @@ module Spree
38
42
  )
39
43
  end
40
44
 
41
- new_path = if default_locale_supplied
42
- maches_locale_regex?(url.path) ? url.path.gsub(LOCALE_REGEX, '/') : url.path
43
- else
44
- maches_locale_regex?(url.path) ? url.path.gsub(LOCALE_REGEX, "/#{locale}/") : "/#{locale}#{url.path}"
45
- end
45
+
46
+ locale_url_match = url.path.match(LOCALE_REGEX)
47
+ previous_locale = locale_url_match ? locale_url_match[1] || default_locale : default_locale
48
+
49
+ product_path_match = url.path.match(PRODUCT_PATH_REGEX)
50
+ taxon_path_match = url.path.match(TAXON_PATH_REGEX)
51
+
52
+ if product_path_match
53
+ new_path = generate_product_path(product_path_match, previous_locale, locale, default_locale, default_locale_supplied)
54
+ elsif url.path.match(TAXON_PATH_REGEX)
55
+ new_path = generate_taxon_path(taxon_path_match, previous_locale, locale, default_locale, default_locale_supplied)
56
+ else
57
+ new_path = generate_regular_page_path(default_locale_supplied, url, locale)
58
+ end
46
59
 
47
60
  success(
48
61
  url: url,
@@ -97,5 +110,32 @@ module Spree
97
110
  def builder_class(url)
98
111
  url.scheme == 'http' ? URI::HTTP : URI::HTTPS
99
112
  end
113
+
114
+ def generate_product_path(product_path_match, previous_locale, locale, default_locale, default_locale_supplied)
115
+ product = begin
116
+ Mobility.with_locale(previous_locale) { Spree::Product.friendly.find(product_path_match[1]) }
117
+ rescue ActiveRecord::RecordNotFound
118
+ Mobility.with_locale(default_locale) { Spree::Product.friendly.find(product_path_match[1]) }
119
+ end
120
+
121
+ new_slug = Mobility.with_locale(locale) { product.slug(fallbacks: default_locale) }
122
+ new_path_slug = "/products/#{new_slug}"
123
+ default_locale_supplied ? new_path_slug : "/#{locale}/#{new_path_slug}"
124
+ end
125
+
126
+ def generate_taxon_path(taxon_path_match, previous_locale, locale, default_locale, default_locale_supplied)
127
+ taxon = Mobility.with_locale(previous_locale) { Spree::Taxon.friendly.find(taxon_path_match[1]) }
128
+ new_slug = Mobility.with_locale(locale) { taxon.permalink(fallbacks: default_locale) }
129
+ new_path_slug = "/t/#{new_slug}"
130
+ default_locale_supplied ? new_path_slug : "/#{locale}/#{new_path_slug}"
131
+ end
132
+
133
+ def generate_regular_page_path(default_locale_supplied, url, locale)
134
+ if default_locale_supplied
135
+ maches_locale_regex?(url.path) ? url.path.gsub(LOCALE_REGEX, '/') : url.path
136
+ else
137
+ maches_locale_regex?(url.path) ? url.path.gsub(LOCALE_REGEX, "/#{locale}/") : "/#{locale}#{url.path}"
138
+ end
139
+ end
100
140
  end
101
141
  end
@@ -1,7 +1,7 @@
1
1
  <%= render 'spree/shared/error_messages', target: @address %>
2
2
  <div class="col-lg-6 offset-lg-3">
3
3
  <h3 class="spree-header spree-mb-large spree-mt-large"><%= Spree.t(:new_address, scope: :address_book) %></h3>
4
- <%= form_for @address, html: { id: 'checkout_form_address' } do |f| %>
4
+ <%= form_for @address, url: spree.addresses_path, html: { id: 'checkout_form_address' } do |f| %>
5
5
  <div class="form-group checkout-content-inner-field mb-5 has-float-label">
6
6
  <%= f.text_field :label, class: 'spree-flat-input', placeholder: Spree.t(:address_name_placeholder, scope: :address_book) %>
7
7
  <%= f.label :address_name, Spree.t(:label, scope: :address_book) %>
@@ -33,7 +33,7 @@ end
33
33
  </div>
34
34
 
35
35
  <div class="row checkout-content" data-hook="checkout_content">
36
- <%= form_for @order, url: spree.update_checkout_path(@order.state), html: { id: "checkout_form_#{@order.state}", class: "w-100 d-lg-flex align-items-lg-baseline flex-wrap position-relative" } do |form| %>
36
+ <%= form_for @order, url: spree.update_checkout_path(@order.state), html: { id: "checkout_form_#{@order.state}", class: "w-100 d-lg-flex align-items-lg-baseline flex-wrap position-relative", data: { turbo: false } } do |form| %>
37
37
  <div class="<%= if @order.state != 'confirm' then 'col-lg-6' else 'col-md-12' end %>" data-hook="checkout_form_wrapper">
38
38
  <%= form.hidden_field :state_lock_version %>
39
39
  <%= render @order.state, form: form %>
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  <% path = spree.respond_to?(:update_checkout_registration_path) ? spree.update_checkout_registration_path : spree_signup_path %>
17
17
 
18
- <%= form_for @order, url: path, method: :put, html: { id: 'checkout_form_registration' } do |f| %>
18
+ <%= form_for @order, url: path, method: :put, html: { id: 'checkout_form_registration', data: { turbo: false } } do |f| %>
19
19
  <div class="form-group">
20
20
  <p class="form-group checkout-content-inner-field">
21
21
  <%= f.email_field :email, class: 'spree-flat-input', placeholder: Spree.t(:email) %>
@@ -16,7 +16,7 @@
16
16
  <% variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
17
17
  <li class="item-details">
18
18
  <% # TODO: rework option values so options_text method can be used here %>
19
- <%= "#{ov.option_type.presentation}: #{ov.name.titleize}" %>
19
+ <%= "#{ov.option_type.presentation}: #{ov.presentation}" %>
20
20
  </li>
21
21
  <% end %>
22
22
  </ul>
@@ -22,7 +22,7 @@
22
22
  <% end %>
23
23
 
24
24
  <div class="shopping-cart-item-delete <%= additional_classes %>" data-hook="cart_item_delete">
25
- <%= link_to '#', class: 'delete', id: "delete_#{dom_id(line_item)}", data: { turbolinks: false, id: dom_id(line_item), variant_sku: line_item.sku, variant_name: line_item.name, variant_price: line_item.price, variant_options: line_item.options_text }, aria: { label: Spree.t('cart_page.remove_from_cart') } do %>
25
+ <%= link_to '#', class: 'delete', id: "delete_#{dom_id(line_item)}", data: { turbo: false, id: dom_id(line_item), variant_sku: line_item.sku, variant_name: line_item.name, variant_price: line_item.price, variant_options: line_item.options_text }, aria: { label: Spree.t('cart_page.remove_from_cart') } do %>
26
26
  <%= icon(name: 'garbage',
27
27
  classes: 'shopping-cart-item-delete-icon',
28
28
  width: 18.9,
@@ -9,14 +9,14 @@
9
9
  <li>
10
10
  <%= label_tag "variant_option_value_id_#{option_type[:id]}_#{option_value[:id]}",
11
11
  class: "m-1 m-sm-2 m-md-1 color-select-label",
12
- title: option_value[:name]&.humanize,
12
+ title: option_value[:presentation],
13
13
  data: { toggle: "tooltip", placement: "bottom" } do %>
14
14
 
15
15
  <%= radio_button_tag "variant_option_value_id_#{option_type[:id]}",
16
16
  option_value[:id],
17
17
  option_value[:is_default] && index == 0,
18
18
  class: "product-variants-variant-values-radio",
19
- aria: { label: option_value[:name] },
19
+ aria: { label: option_value[:presentation] },
20
20
  data: {
21
21
  "option-type-index" => index,
22
22
  "presentation" => option_value[:presentation],
@@ -9,7 +9,7 @@
9
9
  <% option_type_name = ot_filter_param.titleize %>
10
10
  <% collapsed = params[ot_filter_param].blank? %>
11
11
 
12
- <button class="card-header <%= 'collapsed' if collapsed %> px-1 plp-filters-card-header" id="filters<%= option_type_name %>" data-toggle="collapse" data-target="#collapseFilter<%= option_type_name %>" aria-expanded="<%= !collapsed %>" aria-controls="collapseFilter<%= option_type_name %>" role="heading" aria-level="2">
12
+ <button class="card-header <%= 'collapsed' if collapsed %> px-1 plp-filters-card-header" id="filters<%= ot_filter_param %>" data-toggle="collapse" data-target="#collapseFilter<%= ot_filter_param %>" aria-expanded="<%= !collapsed %>" aria-controls="collapseFilter<%= ot_filter_param %>" role="heading" aria-level="2">
13
13
  <%= option_type.presentation %>
14
14
  <%= icon(name: 'plus',
15
15
  classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--plus',
@@ -20,7 +20,7 @@
20
20
  width: 16,
21
21
  height: 16) %>
22
22
  </button>
23
- <div id="collapseFilter<%= option_type_name %>" class="collapse <%= 'show' unless collapsed %>" aria-labelledby="filters<%= option_type_name %>">
23
+ <div id="collapseFilter<%= ot_filter_param %>" class="collapse <%= 'show' unless collapsed %>" aria-labelledby="filters<%= ot_filter_param %>">
24
24
  <div class="card-body px-0 pt-1">
25
25
  <%= render 'spree/shared/option_values',
26
26
  option_type: option_type,
@@ -36,7 +36,7 @@
36
36
  <% property_name = property.name %>
37
37
  <% collapsed = params.dig(:properties, property.filter_param).blank? %>
38
38
  <button class="card-header <%= 'collapsed' if collapsed %> px-1 plp-filters-card-header" id="filters<%= property_name %>" data-toggle="collapse" data-target="#collapseFilter<%= property_name %>" aria-expanded="<%= !collapsed %>" aria-controls="collapseFilter<%= property_name %>" role="heading" aria-level="2">
39
- <%= property.presentation.titleize %>
39
+ <%= property.presentation %>
40
40
  <%= icon(name: 'plus',
41
41
  classes: 'mt-1 float-right arrow plp-filters-card-header-arrow--plus',
42
42
  width: 16,
@@ -16,7 +16,7 @@
16
16
 
17
17
  <div class="card plp-overlay-card">
18
18
  <div class="card-header text-uppercase <%= 'collapsed' if params[ot_downcase_name].blank? %> plp-overlay-card-header" data-toggle="collapse" id="filtersMobile<%= option_type_name %>" data-target="#collapseFilterMobile<%= option_type_name %>" aria-expanded="true" aria-controls="collapseFilterMobile<%= option_type_name %>" role="heading" aria-level="3">
19
- <%= option_type_name %>
19
+ <%= option_type.presentation %>
20
20
  <%= icon(name: 'arrow-right',
21
21
  classes: 'spree-icon-arrow spree-icon-arrow-right mt-1 float-right arrow plp-overlay-card-header-arrow',
22
22
  width: 16,
@@ -36,7 +36,7 @@
36
36
  <% collapsed = params.dig(:properties, property.filter_param).blank? %>
37
37
  <div class="card plp-overlay-card">
38
38
  <div class="card-header text-uppercase <%= 'collapsed' if collapsed %> plp-overlay-card-header" data-toggle="collapse" id="filtersMobile<%= property_name %>" data-target="#collapseFilterMobile<%= property_name %>" aria-expanded="true" aria-controls="collapseFilterMobile<%= property_name %>" role="heading" aria-level="3">
39
- <%= property_name %>
39
+ <%= property.presentation %>
40
40
  <%= icon(name: 'arrow-right',
41
41
  classes: 'spree-icon-arrow spree-icon-arrow-right mt-1 float-right arrow plp-overlay-card-header-arrow',
42
42
  width: 16,
@@ -3,7 +3,7 @@
3
3
  <ul id="product-thumbnails" class="thumbnails d-flex w-100 pl-0 my-4" data-hook>
4
4
  <% @product.images.each do |i| %>
5
5
  <li class='tmb-all mr-2 tmb-<%= i.viewable.id %>'>
6
- <%= link_to(image_tag(main_app.url_for(i.url(:mini)), class: "img-thumbnail d-inline-block"), main_app.url_for(i.url(:product))) %>
6
+ <%= link_to(image_tag(main_app.cdn_image_url(i.url(:mini)), class: "img-thumbnail d-inline-block"), main_app.cdn_image_url(i.url(:product))) %>
7
7
  </li>
8
8
  <% end %>
9
9
 
@@ -11,7 +11,7 @@
11
11
  <% @product.variant_images.each do |i| %>
12
12
  <% next if @product.images.include?(i) %>
13
13
  <li class='vtmb mr-2 tmb-<%= i.viewable.id %>'>
14
- <%= link_to(image_tag(main_app.url_for(i.url(:mini)), class: "img-thumbnail"), main_app.url_for(i.url(:product))) %>
14
+ <%= link_to(image_tag(main_app.cdn_image_url(i.url(:mini)), class: "img-thumbnail"), main_app.cdn_image_url(i.url(:product))) %>
15
15
  </li>
16
16
  <% end %>
17
17
  <% end %>
@@ -5,9 +5,10 @@
5
5
  <%== meta_robots %>
6
6
  <%= canonical_tag(current_store.url) %>
7
7
  <%= favicon_link_tag(spree_favicon_path) %>
8
- <%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', 'data-turbolinks-track': 'reload' %>
8
+ <%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', data: { turbo_track: 'reload' } %>
9
9
  <%= csrf_meta_tags %>
10
10
  <%= render 'spree/shared/paths' %>
11
11
  <%= render 'spree/shared/locale_and_currency' %>
12
- <%= javascript_include_tag 'spree/frontend/all', defer: true, 'data-turbolinks-track': 'reload' %>
12
+ <%= javascript_include_tag "application", defer: true, data: { turbo_track: 'reload' } %>
13
+ <%= javascript_include_tag 'spree/frontend/all', defer: true, data: { turbo_track: 'reload' } %>
13
14
  <%= yield :head %>